blob: c4c5b7be6ca5fcd681b19efee091ff5d3fc2e695 [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
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700665CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000666BASECFLAGS
667OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000668ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000669LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100670MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000671INSTALL_DATA
672INSTALL_SCRIPT
673INSTALL_PROGRAM
Kushal Das02d23a22014-04-15 23:50:06 +0530674OPCODEHGEN
Matthias Klosec4c48422012-10-21 23:05:35 +0200675PYTHON
676ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200677ac_ct_READELF
678READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000679ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200680ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000681AR
682RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000683USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000684GNULD
685LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000686LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000687RUNSHARED
688INSTSONAME
689LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000690PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000691BLDLIBRARY
692DLLLIBRARY
693LDLIBRARY
694LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100695MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000696BUILDEXEEXT
697EGREP
698GREP
699CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200700NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200701ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000702MAINCC
703CXX
704OBJEXT
705EXEEXT
706ac_ct_CC
707CPPFLAGS
708LDFLAGS
709CFLAGS
710CC
711EXPORT_MACOSX_DEPLOYMENT_TARGET
712CONFIGURE_MACOSX_DEPLOYMENT_TARGET
713SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200714_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000715MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000716FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000717FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800718FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000719FRAMEWORKALTINSTALLLAST
720FRAMEWORKALTINSTALLFIRST
721FRAMEWORKINSTALLLAST
722FRAMEWORKINSTALLFIRST
723PYTHONFRAMEWORKINSTALLDIR
724PYTHONFRAMEWORKPREFIX
725PYTHONFRAMEWORKDIR
726PYTHONFRAMEWORKIDENTIFIER
727PYTHONFRAMEWORK
728LIPO_32BIT_FLAGS
729ARCH_RUN_32BIT
730UNIVERSALSDK
731CONFIG_ARGS
732SOVERSION
733VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200734PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100735host_os
736host_vendor
737host_cpu
738host
739build_os
740build_vendor
741build_cpu
742build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500743HAS_HG
744HGBRANCH
745HGTAG
746HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400747BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000748target_alias
749host_alias
750build_alias
751LIBS
752ECHO_T
753ECHO_N
754ECHO_C
755DEFS
756mandir
757localedir
758libdir
759psdir
760pdfdir
761dvidir
762htmldir
763infodir
764docdir
765oldincludedir
766includedir
767localstatedir
768sharedstatedir
769sysconfdir
770datadir
771datarootdir
772libexecdir
773sbindir
774bindir
775program_transform_name
776prefix
777exec_prefix
778PACKAGE_URL
779PACKAGE_BUGREPORT
780PACKAGE_STRING
781PACKAGE_VERSION
782PACKAGE_TARNAME
783PACKAGE_NAME
784PATH_SEPARATOR
785SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000786ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000787ac_user_opts='
788enable_option_checking
789enable_universalsdk
790with_universal_archs
791with_framework_name
792enable_framework
793with_gcc
794with_cxx_main
795with_suffix
796enable_shared
797enable_profiling
798with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100799with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100800with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000801with_libs
802with_system_expat
803with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100804with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000805enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700806with_tcltk_includes
807with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000808with_dbmliborder
809with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000810with_threads
811with_thread
812enable_ipv6
813with_doc_strings
814with_tsc
815with_pymalloc
816with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000817with_fpectl
818with_libm
819with_libc
820enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800822with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000823'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000824 ac_precious_vars='build_alias
825host_alias
826target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100827MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000828CC
829CFLAGS
830LDFLAGS
831LIBS
832CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200833CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000834
Guido van Rossum627b2d71993-12-24 10:39:16 +0000835
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000837ac_init_help=
838ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000839ac_unrecognized_opts=
840ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841# The variables have the same names as the options, with
842# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000843cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000844exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000846no_recursion=
847prefix=NONE
848program_prefix=NONE
849program_suffix=NONE
850program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855x_includes=NONE
856x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000857
858# Installation directory options.
859# These are left unexpanded so users can "make install exec_prefix=/foo"
860# and all the variables that are supposed to be based on exec_prefix
861# by default will actually change.
862# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000863# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000864bindir='${exec_prefix}/bin'
865sbindir='${exec_prefix}/sbin'
866libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867datarootdir='${prefix}/share'
868datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000869sysconfdir='${prefix}/etc'
870sharedstatedir='${prefix}/com'
871localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000872includedir='${prefix}/include'
873oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000874docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
875infodir='${datarootdir}/info'
876htmldir='${docdir}'
877dvidir='${docdir}'
878pdfdir='${docdir}'
879psdir='${docdir}'
880libdir='${exec_prefix}/lib'
881localedir='${datarootdir}/locale'
882mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000883
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000885ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000887do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888 # If the previous option needs an argument, assign it.
889 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891 ac_prev=
892 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000893 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200896 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
897 *=) ac_optarg= ;;
898 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000899 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901 # Accept the important Cygnus configure options, so we can diagnose typos.
902
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903 case $ac_dashdash$ac_option in
904 --)
905 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000907 -bindir | --bindir | --bindi | --bind | --bin | --bi)
908 ac_prev=bindir ;;
909 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000910 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911
912 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000913 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000915 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000917 -cache-file | --cache-file | --cache-fil | --cache-fi \
918 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
919 ac_prev=cache_file ;;
920 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
921 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 cache_file=$ac_optarg ;;
923
924 --config-cache | -C)
925 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
933 | --dataroo | --dataro | --datar)
934 ac_prev=datarootdir ;;
935 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
936 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
937 datarootdir=$ac_optarg ;;
938
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000940 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000941 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000942 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200943 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000944 ac_useropt_orig=$ac_useropt
945 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
946 case $ac_user_opts in
947 *"
948"enable_$ac_useropt"
949"*) ;;
950 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
951 ac_unrecognized_sep=', ';;
952 esac
953 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954
955 -docdir | --docdir | --docdi | --doc | --do)
956 ac_prev=docdir ;;
957 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
958 docdir=$ac_optarg ;;
959
960 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
961 ac_prev=dvidir ;;
962 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
963 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964
965 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000967 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200969 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 ac_useropt_orig=$ac_useropt
971 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972 case $ac_user_opts in
973 *"
974"enable_$ac_useropt"
975"*) ;;
976 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
977 ac_unrecognized_sep=', ';;
978 esac
979 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
982 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
983 | --exec | --exe | --ex)
984 ac_prev=exec_prefix ;;
985 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
986 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
987 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000991 # Obsolete; use --with-gas.
992 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
Martin v. Löwis11437992002-04-12 09:54:03 +0000994 -help | --help | --hel | --he | -h)
995 ac_init_help=long ;;
996 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
997 ac_init_help=recursive ;;
998 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
999 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000
1001 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001006 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1007 ac_prev=htmldir ;;
1008 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1009 | --ht=*)
1010 htmldir=$ac_optarg ;;
1011
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012 -includedir | --includedir | --includedi | --included | --include \
1013 | --includ | --inclu | --incl | --inc)
1014 ac_prev=includedir ;;
1015 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1016 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001018
1019 -infodir | --infodir | --infodi | --infod | --info | --inf)
1020 ac_prev=infodir ;;
1021 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023
1024 -libdir | --libdir | --libdi | --libd)
1025 ac_prev=libdir ;;
1026 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
1029 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1030 | --libexe | --libex | --libe)
1031 ac_prev=libexecdir ;;
1032 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1033 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001036 -localedir | --localedir | --localedi | --localed | --locale)
1037 ac_prev=localedir ;;
1038 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1039 localedir=$ac_optarg ;;
1040
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001042 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043 ac_prev=localstatedir ;;
1044 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001045 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047
1048 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1049 ac_prev=mandir ;;
1050 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001054 # Obsolete; use --without-fp.
1055 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056
1057 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 no_create=yes ;;
1060
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001061 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1062 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1063 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1066 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1067 | --oldin | --oldi | --old | --ol | --o)
1068 ac_prev=oldincludedir ;;
1069 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1070 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1071 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1075 ac_prev=prefix ;;
1076 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
1079 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1080 | --program-pre | --program-pr | --program-p)
1081 ac_prev=program_prefix ;;
1082 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1083 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1087 | --program-suf | --program-su | --program-s)
1088 ac_prev=program_suffix ;;
1089 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1090 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -program-transform-name | --program-transform-name \
1094 | --program-transform-nam | --program-transform-na \
1095 | --program-transform-n | --program-transform- \
1096 | --program-transform | --program-transfor \
1097 | --program-transfo | --program-transf \
1098 | --program-trans | --program-tran \
1099 | --progr-tra | --program-tr | --program-t)
1100 ac_prev=program_transform_name ;;
1101 -program-transform-name=* | --program-transform-name=* \
1102 | --program-transform-nam=* | --program-transform-na=* \
1103 | --program-transform-n=* | --program-transform-=* \
1104 | --program-transform=* | --program-transfor=* \
1105 | --program-transfo=* | --program-transf=* \
1106 | --program-trans=* | --program-tran=* \
1107 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001110 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1111 ac_prev=pdfdir ;;
1112 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1113 pdfdir=$ac_optarg ;;
1114
1115 -psdir | --psdir | --psdi | --psd | --ps)
1116 ac_prev=psdir ;;
1117 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1118 psdir=$ac_optarg ;;
1119
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1121 | -silent | --silent | --silen | --sile | --sil)
1122 silent=yes ;;
1123
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001124 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1125 ac_prev=sbindir ;;
1126 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1127 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001129
1130 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1131 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1132 | --sharedst | --shareds | --shared | --share | --shar \
1133 | --sha | --sh)
1134 ac_prev=sharedstatedir ;;
1135 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1136 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1137 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1138 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001140
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001141 -site | --site | --sit)
1142 ac_prev=site ;;
1143 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001145
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1147 ac_prev=srcdir ;;
1148 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001151 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1152 | --syscon | --sysco | --sysc | --sys | --sy)
1153 ac_prev=sysconfdir ;;
1154 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1155 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001157
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001160 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001162
1163 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1164 verbose=yes ;;
1165
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 -version | --version | --versio | --versi | --vers | -V)
1167 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168
1169 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001170 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001172 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001173 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001174 ac_useropt_orig=$ac_useropt
1175 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1176 case $ac_user_opts in
1177 *"
1178"with_$ac_useropt"
1179"*) ;;
1180 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1181 ac_unrecognized_sep=', ';;
1182 esac
1183 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184
1185 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001186 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001187 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001188 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001189 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001190 ac_useropt_orig=$ac_useropt
1191 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1192 case $ac_user_opts in
1193 *"
1194"with_$ac_useropt"
1195"*) ;;
1196 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1197 ac_unrecognized_sep=', ';;
1198 esac
1199 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201 --x)
1202 # Obsolete; use --with-x.
1203 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204
1205 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1206 | --x-incl | --x-inc | --x-in | --x-i)
1207 ac_prev=x_includes ;;
1208 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1209 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001210 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
1212 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1213 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1214 ac_prev=x_libraries ;;
1215 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1216 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001218
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001219 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1220Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221 ;;
1222
Martin v. Löwis11437992002-04-12 09:54:03 +00001223 *=*)
1224 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1225 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 case $ac_envvar in #(
1227 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001228 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001229 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001230 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001231 export $ac_envvar ;;
1232
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001233 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001235 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001236 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001237 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001238 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239 ;;
1240
1241 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001242done
1243
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001246 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247fi
1248
Matthias Kloseb9621712010-04-24 17:59:49 +00001249if test -n "$ac_unrecognized_opts"; then
1250 case $enable_option_checking in
1251 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001252 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1254 esac
1255fi
1256
1257# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001258for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1259 datadir sysconfdir sharedstatedir localstatedir includedir \
1260 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1261 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001262do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001263 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 # Remove trailing slashes.
1265 case $ac_val in
1266 */ )
1267 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1268 eval $ac_var=\$ac_val;;
1269 esac
1270 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001272 [\\/$]* | ?:[\\/]* ) continue;;
1273 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001275 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001276done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277
Martin v. Löwis11437992002-04-12 09:54:03 +00001278# There might be people who depend on the old broken behavior: `$host'
1279# used to hold the argument of --host etc.
1280# FIXME: To remove some day.
1281build=$build_alias
1282host=$host_alias
1283target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001284
Martin v. Löwis11437992002-04-12 09:54:03 +00001285# FIXME: To remove some day.
1286if test "x$host_alias" != x; then
1287 if test "x$build_alias" = x; then
1288 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001289 elif test "x$build_alias" != "x$host_alias"; then
1290 cross_compiling=yes
1291 fi
1292fi
1293
1294ac_tool_prefix=
1295test -n "$host_alias" && ac_tool_prefix=$host_alias-
1296
1297test "$silent" = yes && exec 6>/dev/null
1298
Guido van Rossum627b2d71993-12-24 10:39:16 +00001299
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001300ac_pwd=`pwd` && test -n "$ac_pwd" &&
1301ac_ls_di=`ls -di .` &&
1302ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001303 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001304test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001305 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001306
1307
Guido van Rossum627b2d71993-12-24 10:39:16 +00001308# Find the source files, if location was not specified.
1309if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001310 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001311 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001312 ac_confdir=`$as_dirname -- "$as_myself" ||
1313$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1314 X"$as_myself" : 'X\(//\)[^/]' \| \
1315 X"$as_myself" : 'X\(//\)$' \| \
1316 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1317$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001318 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1319 s//\1/
1320 q
1321 }
1322 /^X\(\/\/\)[^/].*/{
1323 s//\1/
1324 q
1325 }
1326 /^X\(\/\/\)$/{
1327 s//\1/
1328 q
1329 }
1330 /^X\(\/\).*/{
1331 s//\1/
1332 q
1333 }
1334 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001335 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337 srcdir=..
1338 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001339else
1340 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342if test ! -r "$srcdir/$ac_unique_file"; then
1343 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001344 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1347ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001348 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001349 pwd)`
1350# When building in place, set srcdir=.
1351if test "$ac_abs_confdir" = "$ac_pwd"; then
1352 srcdir=.
1353fi
1354# Remove unnecessary trailing slashes from srcdir.
1355# Double slashes in file names in object file debugging info
1356# mess up M-x gdb in Emacs.
1357case $srcdir in
1358*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1359esac
1360for ac_var in $ac_precious_vars; do
1361 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1362 eval ac_env_${ac_var}_value=\$${ac_var}
1363 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1364 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1365done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001366
Martin v. Löwis11437992002-04-12 09:54:03 +00001367#
1368# Report the --help message.
1369#
1370if test "$ac_init_help" = "long"; then
1371 # Omit some internal or obsolete options to make the list less imposing.
1372 # This message is too long to be a string in the A/UX 3.1 sh.
1373 cat <<_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001374\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001375
1376Usage: $0 [OPTION]... [VAR=VALUE]...
1377
1378To assign environment variables (e.g., CC, CFLAGS...), specify them as
1379VAR=VALUE. See below for descriptions of some of the useful variables.
1380
1381Defaults for the options are specified in brackets.
1382
1383Configuration:
1384 -h, --help display this help and exit
1385 --help=short display options specific to this package
1386 --help=recursive display the short help of all the included packages
1387 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001388 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 --cache-file=FILE cache test results in FILE [disabled]
1390 -C, --config-cache alias for \`--cache-file=config.cache'
1391 -n, --no-create do not create output files
1392 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1393
Martin v. Löwis11437992002-04-12 09:54:03 +00001394Installation directories:
1395 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001396 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001397 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001398 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001399
1400By default, \`make install' will install all the files in
1401\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1402an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1403for instance \`--prefix=\$HOME'.
1404
1405For better control, use the options below.
1406
1407Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001408 --bindir=DIR user executables [EPREFIX/bin]
1409 --sbindir=DIR system admin executables [EPREFIX/sbin]
1410 --libexecdir=DIR program executables [EPREFIX/libexec]
1411 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1412 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1413 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1414 --libdir=DIR object code libraries [EPREFIX/lib]
1415 --includedir=DIR C header files [PREFIX/include]
1416 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1417 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1418 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1419 --infodir=DIR info documentation [DATAROOTDIR/info]
1420 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1421 --mandir=DIR man documentation [DATAROOTDIR/man]
1422 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1423 --htmldir=DIR html documentation [DOCDIR]
1424 --dvidir=DIR dvi documentation [DOCDIR]
1425 --pdfdir=DIR pdf documentation [DOCDIR]
1426 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001427_ACEOF
1428
1429 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001430
1431System types:
1432 --build=BUILD configure for building on BUILD [guessed]
1433 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434_ACEOF
1435fi
1436
1437if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001438 case $ac_init_help in
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001439 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001440 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001441 cat <<\_ACEOF
1442
1443Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001444 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001445 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1446 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001447 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001448 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001449 --enable-framework[=INSTALLDIR]
1450 Build (MacOSX|Darwin) framework
1451 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001452 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001453 --enable-loadable-sqlite-extensions
1454 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001455 --enable-ipv6 Enable ipv6 (with ipv4) support
1456 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001457 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001458 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001459
1460Optional Packages:
1461 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1462 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001463 --with-universal-archs=ARCH
1464 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001465 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001466 --with-framework-name=FRAMEWORK
1467 specify an alternate name of the framework built
1468 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001469 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001470 --with-cxx-main=<compiler>
1471 compile main() and link python executable with C++
1472 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001473 --with-suffix=.exe set executable suffix
1474 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001475 --with-hash-algorithm=[fnv|siphash24]
1476 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001477 --with-address-sanitizer
1478 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001479 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001480 --with-system-expat build pyexpat module using an installed expat
1481 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001482 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001483 --with-system-libmpdec build _decimal module using an installed libmpdec
1484 library
Ned Deilyd819b932013-09-06 01:07:05 -07001485 --with-tcltk-includes='-I...'
1486 override search for Tcl and Tk include files
1487 --with-tcltk-libs='-L...'
1488 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001489 --with-dbmliborder=db1:db2:...
1490 order to check db backends for dbm. Valid value is a
1491 colon separated string with the backend names
1492 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001493 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001494 --with(out)-threads[=DIRECTORY]
1495 disable/enable thread support
1496 --with(out)-thread[=DIRECTORY]
1497 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001498 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001499 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001500 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001501 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with-fpectl enable SIGFPE catching
1503 --with-libm=STRING math library
1504 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001505 --with(out)-computed-gotos
1506 Use computed gotos in evaluation loop (enabled by
1507 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001508 --with(out)-ensurepip=[=upgrade]
1509 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001510
1511Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001512 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001513 CC C compiler command
1514 CFLAGS C compiler flags
1515 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1516 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001517 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001518 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001519 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001520 CPP C preprocessor
1521
1522Use these variables to override the choices made by `configure' or to help
1523it to find libraries and programs with nonstandard names/locations.
1524
Georg Brandle2e15612009-05-20 18:25:10 +00001525Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001526_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001527ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001528fi
1529
1530if test "$ac_init_help" = "recursive"; then
1531 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001532 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001533 test -d "$ac_dir" ||
1534 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1535 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001536 ac_builddir=.
1537
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001538case "$ac_dir" in
1539.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1540*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001541 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001542 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001543 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001544 case $ac_top_builddir_sub in
1545 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1546 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1547 esac ;;
1548esac
1549ac_abs_top_builddir=$ac_pwd
1550ac_abs_builddir=$ac_pwd$ac_dir_suffix
1551# for backward compatibility:
1552ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001553
1554case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001557 ac_top_srcdir=$ac_top_builddir_sub
1558 ac_abs_top_srcdir=$ac_pwd ;;
1559 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001561 ac_top_srcdir=$srcdir
1562 ac_abs_top_srcdir=$srcdir ;;
1563 *) # Relative name.
1564 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1565 ac_top_srcdir=$ac_top_build_prefix$srcdir
1566 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001567esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001569
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001570 cd "$ac_dir" || { ac_status=$?; continue; }
1571 # Check for guested configure.
1572 if test -f "$ac_srcdir/configure.gnu"; then
1573 echo &&
1574 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1575 elif test -f "$ac_srcdir/configure"; then
1576 echo &&
1577 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 fi || ac_status=$?
1581 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001582 done
1583fi
1584
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001586if $ac_init_version; then
1587 cat <<\_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001588python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001589generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001590
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001591Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001592This configure script is free software; the Free Software Foundation
1593gives unlimited permission to copy, distribute and modify it.
1594_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001597
1598## ------------------------ ##
1599## Autoconf initialization. ##
1600## ------------------------ ##
1601
1602# ac_fn_c_try_compile LINENO
1603# --------------------------
1604# Try to compile conftest.$ac_ext, and return whether this succeeded.
1605ac_fn_c_try_compile ()
1606{
1607 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1608 rm -f conftest.$ac_objext
1609 if { { ac_try="$ac_compile"
1610case "(($ac_try" in
1611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1612 *) ac_try_echo=$ac_try;;
1613esac
1614eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1615$as_echo "$ac_try_echo"; } >&5
1616 (eval "$ac_compile") 2>conftest.err
1617 ac_status=$?
1618 if test -s conftest.err; then
1619 grep -v '^ *+' conftest.err >conftest.er1
1620 cat conftest.er1 >&5
1621 mv -f conftest.er1 conftest.err
1622 fi
1623 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1624 test $ac_status = 0; } && {
1625 test -z "$ac_c_werror_flag" ||
1626 test ! -s conftest.err
1627 } && test -s conftest.$ac_objext; then :
1628 ac_retval=0
1629else
1630 $as_echo "$as_me: failed program was:" >&5
1631sed 's/^/| /' conftest.$ac_ext >&5
1632
1633 ac_retval=1
1634fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001635 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001636 as_fn_set_status $ac_retval
1637
1638} # ac_fn_c_try_compile
1639
Matthias Kloseb9621712010-04-24 17:59:49 +00001640# ac_fn_c_try_link LINENO
1641# -----------------------
1642# Try to link conftest.$ac_ext, and return whether this succeeded.
1643ac_fn_c_try_link ()
1644{
1645 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1646 rm -f conftest.$ac_objext conftest$ac_exeext
1647 if { { ac_try="$ac_link"
1648case "(($ac_try" in
1649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1650 *) ac_try_echo=$ac_try;;
1651esac
1652eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1653$as_echo "$ac_try_echo"; } >&5
1654 (eval "$ac_link") 2>conftest.err
1655 ac_status=$?
1656 if test -s conftest.err; then
1657 grep -v '^ *+' conftest.err >conftest.er1
1658 cat conftest.er1 >&5
1659 mv -f conftest.er1 conftest.err
1660 fi
1661 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1662 test $ac_status = 0; } && {
1663 test -z "$ac_c_werror_flag" ||
1664 test ! -s conftest.err
1665 } && test -s conftest$ac_exeext && {
1666 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001667 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001668 }; then :
1669 ac_retval=0
1670else
1671 $as_echo "$as_me: failed program was:" >&5
1672sed 's/^/| /' conftest.$ac_ext >&5
1673
1674 ac_retval=1
1675fi
1676 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1677 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1678 # interfere with the next link command; also delete a directory that is
1679 # left behind by Apple's compiler. We do this before executing the actions.
1680 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001681 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001682 as_fn_set_status $ac_retval
1683
1684} # ac_fn_c_try_link
1685
Matthias Kloseb9621712010-04-24 17:59:49 +00001686# ac_fn_c_try_cpp LINENO
1687# ----------------------
1688# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1689ac_fn_c_try_cpp ()
1690{
1691 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1692 if { { ac_try="$ac_cpp conftest.$ac_ext"
1693case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1700 ac_status=$?
1701 if test -s conftest.err; then
1702 grep -v '^ *+' conftest.err >conftest.er1
1703 cat conftest.er1 >&5
1704 mv -f conftest.er1 conftest.err
1705 fi
1706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001707 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001708 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1709 test ! -s conftest.err
1710 }; then :
1711 ac_retval=0
1712else
1713 $as_echo "$as_me: failed program was:" >&5
1714sed 's/^/| /' conftest.$ac_ext >&5
1715
1716 ac_retval=1
1717fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001718 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001719 as_fn_set_status $ac_retval
1720
1721} # ac_fn_c_try_cpp
1722
1723# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1724# -------------------------------------------------------
1725# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1726# the include files in INCLUDES and setting the cache variable VAR
1727# accordingly.
1728ac_fn_c_check_header_mongrel ()
1729{
1730 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001731 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1733$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001734if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001735 $as_echo_n "(cached) " >&6
1736fi
1737eval ac_res=\$$3
1738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1739$as_echo "$ac_res" >&6; }
1740else
1741 # Is the header compilable?
1742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1743$as_echo_n "checking $2 usability... " >&6; }
1744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1745/* end confdefs.h. */
1746$4
1747#include <$2>
1748_ACEOF
1749if ac_fn_c_try_compile "$LINENO"; then :
1750 ac_header_compiler=yes
1751else
1752 ac_header_compiler=no
1753fi
1754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1756$as_echo "$ac_header_compiler" >&6; }
1757
1758# Is the header present?
1759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1760$as_echo_n "checking $2 presence... " >&6; }
1761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1762/* end confdefs.h. */
1763#include <$2>
1764_ACEOF
1765if ac_fn_c_try_cpp "$LINENO"; then :
1766 ac_header_preproc=yes
1767else
1768 ac_header_preproc=no
1769fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001770rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1772$as_echo "$ac_header_preproc" >&6; }
1773
1774# So? What about this header?
1775case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1776 yes:no: )
1777 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1778$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1779 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1780$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1781 ;;
1782 no:yes:* )
1783 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1784$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1786$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1788$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1790$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1791 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1792$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001793( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001794## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001795## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001796 ) | sed "s/^/$as_me: WARNING: /" >&2
1797 ;;
1798esac
1799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1800$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001801if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001802 $as_echo_n "(cached) " >&6
1803else
1804 eval "$3=\$ac_header_compiler"
1805fi
1806eval ac_res=\$$3
1807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1808$as_echo "$ac_res" >&6; }
1809fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001810 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001811
1812} # ac_fn_c_check_header_mongrel
1813
1814# ac_fn_c_try_run LINENO
1815# ----------------------
1816# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1817# that executables *can* be run.
1818ac_fn_c_try_run ()
1819{
1820 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1821 if { { ac_try="$ac_link"
1822case "(($ac_try" in
1823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1824 *) ac_try_echo=$ac_try;;
1825esac
1826eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1827$as_echo "$ac_try_echo"; } >&5
1828 (eval "$ac_link") 2>&5
1829 ac_status=$?
1830 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1831 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1832 { { case "(($ac_try" in
1833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1834 *) ac_try_echo=$ac_try;;
1835esac
1836eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1837$as_echo "$ac_try_echo"; } >&5
1838 (eval "$ac_try") 2>&5
1839 ac_status=$?
1840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1841 test $ac_status = 0; }; }; then :
1842 ac_retval=0
1843else
1844 $as_echo "$as_me: program exited with status $ac_status" >&5
1845 $as_echo "$as_me: failed program was:" >&5
1846sed 's/^/| /' conftest.$ac_ext >&5
1847
1848 ac_retval=$ac_status
1849fi
1850 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001851 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001852 as_fn_set_status $ac_retval
1853
1854} # ac_fn_c_try_run
1855
1856# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1857# -------------------------------------------------------
1858# Tests whether HEADER exists and can be compiled using the include files in
1859# INCLUDES, setting the cache variable VAR accordingly.
1860ac_fn_c_check_header_compile ()
1861{
1862 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1864$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001865if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001866 $as_echo_n "(cached) " >&6
1867else
1868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1869/* end confdefs.h. */
1870$4
1871#include <$2>
1872_ACEOF
1873if ac_fn_c_try_compile "$LINENO"; then :
1874 eval "$3=yes"
1875else
1876 eval "$3=no"
1877fi
1878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1879fi
1880eval ac_res=\$$3
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1882$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001883 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001884
1885} # ac_fn_c_check_header_compile
1886
Matthias Kloseb9621712010-04-24 17:59:49 +00001887# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1888# -------------------------------------------
1889# Tests whether TYPE exists after having included INCLUDES, setting cache
1890# variable VAR accordingly.
1891ac_fn_c_check_type ()
1892{
1893 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1895$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001896if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001897 $as_echo_n "(cached) " >&6
1898else
1899 eval "$3=no"
1900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1901/* end confdefs.h. */
1902$4
1903int
1904main ()
1905{
1906if (sizeof ($2))
1907 return 0;
1908 ;
1909 return 0;
1910}
1911_ACEOF
1912if ac_fn_c_try_compile "$LINENO"; then :
1913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1914/* end confdefs.h. */
1915$4
1916int
1917main ()
1918{
1919if (sizeof (($2)))
1920 return 0;
1921 ;
1922 return 0;
1923}
1924_ACEOF
1925if ac_fn_c_try_compile "$LINENO"; then :
1926
1927else
1928 eval "$3=yes"
1929fi
1930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1931fi
1932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1933fi
1934eval ac_res=\$$3
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1936$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001937 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001938
1939} # ac_fn_c_check_type
1940
1941# ac_fn_c_find_uintX_t LINENO BITS VAR
1942# ------------------------------------
1943# Finds an unsigned integer type with width BITS, setting cache variable VAR
1944# accordingly.
1945ac_fn_c_find_uintX_t ()
1946{
1947 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1949$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001950if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001951 $as_echo_n "(cached) " >&6
1952else
1953 eval "$3=no"
1954 # Order is important - never check a type that is potentially smaller
1955 # than half of the expected target width.
1956 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1957 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1959/* end confdefs.h. */
1960$ac_includes_default
1961int
1962main ()
1963{
1964static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001965test_array [0] = 0;
1966return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001967
1968 ;
1969 return 0;
1970}
1971_ACEOF
1972if ac_fn_c_try_compile "$LINENO"; then :
1973 case $ac_type in #(
1974 uint$2_t) :
1975 eval "$3=yes" ;; #(
1976 *) :
1977 eval "$3=\$ac_type" ;;
1978esac
1979fi
1980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001981 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001982
1983else
1984 break
1985fi
1986 done
1987fi
1988eval ac_res=\$$3
1989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1990$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001991 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001992
1993} # ac_fn_c_find_uintX_t
1994
1995# ac_fn_c_find_intX_t LINENO BITS VAR
1996# -----------------------------------
1997# Finds a signed integer type with width BITS, setting cache variable VAR
1998# accordingly.
1999ac_fn_c_find_intX_t ()
2000{
2001 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2003$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002004if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002005 $as_echo_n "(cached) " >&6
2006else
2007 eval "$3=no"
2008 # Order is important - never check a type that is potentially smaller
2009 # than half of the expected target width.
2010 for ac_type in int$2_t 'int' 'long int' \
2011 'long long int' 'short int' 'signed char'; do
2012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013/* end confdefs.h. */
2014$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002015 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002016int
2017main ()
2018{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002019static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002020test_array [0] = 0;
2021return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002022
2023 ;
2024 return 0;
2025}
2026_ACEOF
2027if ac_fn_c_try_compile "$LINENO"; then :
2028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2029/* end confdefs.h. */
2030$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002031 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002032int
2033main ()
2034{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002035static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002036 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002037test_array [0] = 0;
2038return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002039
2040 ;
2041 return 0;
2042}
2043_ACEOF
2044if ac_fn_c_try_compile "$LINENO"; then :
2045
2046else
2047 case $ac_type in #(
2048 int$2_t) :
2049 eval "$3=yes" ;; #(
2050 *) :
2051 eval "$3=\$ac_type" ;;
2052esac
2053fi
2054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2055fi
2056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002057 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002058
2059else
2060 break
2061fi
2062 done
2063fi
2064eval ac_res=\$$3
2065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2066$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002067 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002068
2069} # ac_fn_c_find_intX_t
2070
2071# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2072# --------------------------------------------
2073# Tries to find the compile-time value of EXPR in a program that includes
2074# INCLUDES, setting VAR accordingly. Returns whether the value could be
2075# computed
2076ac_fn_c_compute_int ()
2077{
2078 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2079 if test "$cross_compiling" = yes; then
2080 # Depending upon the size, compute the lo and hi bounds.
2081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2082/* end confdefs.h. */
2083$4
2084int
2085main ()
2086{
2087static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002088test_array [0] = 0;
2089return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002090
2091 ;
2092 return 0;
2093}
2094_ACEOF
2095if ac_fn_c_try_compile "$LINENO"; then :
2096 ac_lo=0 ac_mid=0
2097 while :; do
2098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2099/* end confdefs.h. */
2100$4
2101int
2102main ()
2103{
2104static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002105test_array [0] = 0;
2106return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002107
2108 ;
2109 return 0;
2110}
2111_ACEOF
2112if ac_fn_c_try_compile "$LINENO"; then :
2113 ac_hi=$ac_mid; break
2114else
2115 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2116 if test $ac_lo -le $ac_mid; then
2117 ac_lo= ac_hi=
2118 break
2119 fi
2120 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2121fi
2122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123 done
2124else
2125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2126/* end confdefs.h. */
2127$4
2128int
2129main ()
2130{
2131static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002132test_array [0] = 0;
2133return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002134
2135 ;
2136 return 0;
2137}
2138_ACEOF
2139if ac_fn_c_try_compile "$LINENO"; then :
2140 ac_hi=-1 ac_mid=-1
2141 while :; do
2142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2143/* end confdefs.h. */
2144$4
2145int
2146main ()
2147{
2148static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002149test_array [0] = 0;
2150return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002151
2152 ;
2153 return 0;
2154}
2155_ACEOF
2156if ac_fn_c_try_compile "$LINENO"; then :
2157 ac_lo=$ac_mid; break
2158else
2159 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2160 if test $ac_mid -le $ac_hi; then
2161 ac_lo= ac_hi=
2162 break
2163 fi
2164 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2165fi
2166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2167 done
2168else
2169 ac_lo= ac_hi=
2170fi
2171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2172fi
2173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2174# Binary search between lo and hi bounds.
2175while test "x$ac_lo" != "x$ac_hi"; do
2176 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178/* end confdefs.h. */
2179$4
2180int
2181main ()
2182{
2183static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002184test_array [0] = 0;
2185return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002186
2187 ;
2188 return 0;
2189}
2190_ACEOF
2191if ac_fn_c_try_compile "$LINENO"; then :
2192 ac_hi=$ac_mid
2193else
2194 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2195fi
2196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2197done
2198case $ac_lo in #((
2199?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2200'') ac_retval=1 ;;
2201esac
2202 else
2203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2204/* end confdefs.h. */
2205$4
2206static long int longval () { return $2; }
2207static unsigned long int ulongval () { return $2; }
2208#include <stdio.h>
2209#include <stdlib.h>
2210int
2211main ()
2212{
2213
2214 FILE *f = fopen ("conftest.val", "w");
2215 if (! f)
2216 return 1;
2217 if (($2) < 0)
2218 {
2219 long int i = longval ();
2220 if (i != ($2))
2221 return 1;
2222 fprintf (f, "%ld", i);
2223 }
2224 else
2225 {
2226 unsigned long int i = ulongval ();
2227 if (i != ($2))
2228 return 1;
2229 fprintf (f, "%lu", i);
2230 }
2231 /* Do not output a trailing newline, as this causes \r\n confusion
2232 on some platforms. */
2233 return ferror (f) || fclose (f) != 0;
2234
2235 ;
2236 return 0;
2237}
2238_ACEOF
2239if ac_fn_c_try_run "$LINENO"; then :
2240 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2241else
2242 ac_retval=1
2243fi
2244rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2245 conftest.$ac_objext conftest.beam conftest.$ac_ext
2246rm -f conftest.val
2247
2248 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002249 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002250 as_fn_set_status $ac_retval
2251
2252} # ac_fn_c_compute_int
2253
2254# ac_fn_c_check_func LINENO FUNC VAR
2255# ----------------------------------
2256# Tests whether FUNC exists, setting the cache variable VAR accordingly
2257ac_fn_c_check_func ()
2258{
2259 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2261$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002262if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002263 $as_echo_n "(cached) " >&6
2264else
2265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2266/* end confdefs.h. */
2267/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2268 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2269#define $2 innocuous_$2
2270
2271/* System header to define __stub macros and hopefully few prototypes,
2272 which can conflict with char $2 (); below.
2273 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2274 <limits.h> exists even on freestanding compilers. */
2275
2276#ifdef __STDC__
2277# include <limits.h>
2278#else
2279# include <assert.h>
2280#endif
2281
2282#undef $2
2283
2284/* Override any GCC internal prototype to avoid an error.
2285 Use char because int might match the return type of a GCC
2286 builtin and then its argument prototype would still apply. */
2287#ifdef __cplusplus
2288extern "C"
2289#endif
2290char $2 ();
2291/* The GNU C library defines this for functions which it implements
2292 to always fail with ENOSYS. Some functions are actually named
2293 something starting with __ and the normal name is an alias. */
2294#if defined __stub_$2 || defined __stub___$2
2295choke me
2296#endif
2297
2298int
2299main ()
2300{
2301return $2 ();
2302 ;
2303 return 0;
2304}
2305_ACEOF
2306if ac_fn_c_try_link "$LINENO"; then :
2307 eval "$3=yes"
2308else
2309 eval "$3=no"
2310fi
2311rm -f core conftest.err conftest.$ac_objext \
2312 conftest$ac_exeext conftest.$ac_ext
2313fi
2314eval ac_res=\$$3
2315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2316$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002317 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002318
2319} # ac_fn_c_check_func
2320
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002321# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2322# ---------------------------------------------
2323# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2324# accordingly.
2325ac_fn_c_check_decl ()
2326{
2327 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2328 as_decl_name=`echo $2|sed 's/ *(.*//'`
2329 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2331$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2332if eval \${$3+:} false; then :
2333 $as_echo_n "(cached) " >&6
2334else
2335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2336/* end confdefs.h. */
2337$4
2338int
2339main ()
2340{
2341#ifndef $as_decl_name
2342#ifdef __cplusplus
2343 (void) $as_decl_use;
2344#else
2345 (void) $as_decl_name;
2346#endif
2347#endif
2348
2349 ;
2350 return 0;
2351}
2352_ACEOF
2353if ac_fn_c_try_compile "$LINENO"; then :
2354 eval "$3=yes"
2355else
2356 eval "$3=no"
2357fi
2358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2359fi
2360eval ac_res=\$$3
2361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2362$as_echo "$ac_res" >&6; }
2363 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2364
2365} # ac_fn_c_check_decl
2366
Matthias Kloseb9621712010-04-24 17:59:49 +00002367# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2368# ----------------------------------------------------
2369# Tries to find if the field MEMBER exists in type AGGR, after including
2370# INCLUDES, setting cache variable VAR accordingly.
2371ac_fn_c_check_member ()
2372{
2373 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2375$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002376if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002377 $as_echo_n "(cached) " >&6
2378else
2379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2380/* end confdefs.h. */
2381$5
2382int
2383main ()
2384{
2385static $2 ac_aggr;
2386if (ac_aggr.$3)
2387return 0;
2388 ;
2389 return 0;
2390}
2391_ACEOF
2392if ac_fn_c_try_compile "$LINENO"; then :
2393 eval "$4=yes"
2394else
2395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2396/* end confdefs.h. */
2397$5
2398int
2399main ()
2400{
2401static $2 ac_aggr;
2402if (sizeof ac_aggr.$3)
2403return 0;
2404 ;
2405 return 0;
2406}
2407_ACEOF
2408if ac_fn_c_try_compile "$LINENO"; then :
2409 eval "$4=yes"
2410else
2411 eval "$4=no"
2412fi
2413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2414fi
2415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2416fi
2417eval ac_res=\$$4
2418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2419$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002420 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002421
2422} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002423cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002424This file contains any messages produced by compilers while
2425running configure, to aid debugging if configure makes a mistake.
2426
Larry Hastingsf5002bd2014-03-16 23:05:59 -07002427It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002428generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002429
2430 $ $0 $@
2431
2432_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002433exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002434{
2435cat <<_ASUNAME
2436## --------- ##
2437## Platform. ##
2438## --------- ##
2439
2440hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2441uname -m = `(uname -m) 2>/dev/null || echo unknown`
2442uname -r = `(uname -r) 2>/dev/null || echo unknown`
2443uname -s = `(uname -s) 2>/dev/null || echo unknown`
2444uname -v = `(uname -v) 2>/dev/null || echo unknown`
2445
2446/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2447/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2448
2449/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2450/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2451/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002452/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002453/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2454/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2455/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2456
2457_ASUNAME
2458
2459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2460for as_dir in $PATH
2461do
2462 IFS=$as_save_IFS
2463 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002464 $as_echo "PATH: $as_dir"
2465 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002467
2468} >&5
2469
2470cat >&5 <<_ACEOF
2471
2472
2473## ----------- ##
2474## Core tests. ##
2475## ----------- ##
2476
2477_ACEOF
2478
2479
2480# Keep a trace of the command line.
2481# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002482# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002483# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002484# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002485ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002486ac_configure_args0=
2487ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002488ac_must_keep_next=false
2489for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002490do
Skip Montanaro6dead952003-09-25 14:50:04 +00002491 for ac_arg
2492 do
2493 case $ac_arg in
2494 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2495 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2496 | -silent | --silent | --silen | --sile | --sil)
2497 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002500 esac
2501 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002502 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002504 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002506 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002507 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002508 case $ac_arg in
2509 *=* | --config-cache | -C | -disable-* | --disable-* \
2510 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2511 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2512 | -with-* | --with-* | -without-* | --without-* | --x)
2513 case "$ac_configure_args0 " in
2514 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2515 esac
2516 ;;
2517 -* ) ac_must_keep_next=true ;;
2518 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002519 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002520 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002521 ;;
2522 esac
2523 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002524done
Matthias Kloseb9621712010-04-24 17:59:49 +00002525{ ac_configure_args0=; unset ac_configure_args0;}
2526{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002527
2528# When interrupted or exit'd, cleanup temporary files, and complete
2529# config.log. We remove comments because anyway the quotes in there
2530# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531# WARNING: Use '\'' to represent an apostrophe within the trap.
2532# 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 +00002533trap 'exit_status=$?
2534 # Save into config.log some information that might help in debugging.
2535 {
2536 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002537
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002538 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002539## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002540## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 echo
2542 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543(
2544 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2545 eval ac_val=\$$ac_var
2546 case $ac_val in #(
2547 *${as_nl}*)
2548 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002549 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2550$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551 esac
2552 case $ac_var in #(
2553 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002554 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2555 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 esac ;;
2557 esac
2558 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002559 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002560 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2561 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563 "s/'\''/'\''\\\\'\'''\''/g;
2564 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2565 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002566 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002568 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569 esac |
2570 sort
2571)
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002573
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002574 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002575## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002576## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002577 echo
2578 for ac_var in $ac_subst_vars
2579 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580 eval ac_val=\$$ac_var
2581 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002582 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002585 done | sort
2586 echo
2587
2588 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002589 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002591## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002592 echo
2593 for ac_var in $ac_subst_files
2594 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595 eval ac_val=\$$ac_var
2596 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002599 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002600 done | sort
2601 echo
2602 fi
2603
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002605 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002606## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002607## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002609 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 echo
2611 fi
2612 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002613 $as_echo "$as_me: caught signal $ac_signal"
2614 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616 rm -f core *.core core.conftest.* &&
2617 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002620for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002621 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002622done
2623ac_signal=0
2624
2625# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002627
Matthias Kloseb9621712010-04-24 17:59:49 +00002628$as_echo "/* confdefs.h */" > confdefs.h
2629
Martin v. Löwis11437992002-04-12 09:54:03 +00002630# Predefined preprocessor variables.
2631
2632cat >>confdefs.h <<_ACEOF
2633#define PACKAGE_NAME "$PACKAGE_NAME"
2634_ACEOF
2635
Martin v. Löwis11437992002-04-12 09:54:03 +00002636cat >>confdefs.h <<_ACEOF
2637#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2638_ACEOF
2639
Martin v. Löwis11437992002-04-12 09:54:03 +00002640cat >>confdefs.h <<_ACEOF
2641#define PACKAGE_VERSION "$PACKAGE_VERSION"
2642_ACEOF
2643
Martin v. Löwis11437992002-04-12 09:54:03 +00002644cat >>confdefs.h <<_ACEOF
2645#define PACKAGE_STRING "$PACKAGE_STRING"
2646_ACEOF
2647
Martin v. Löwis11437992002-04-12 09:54:03 +00002648cat >>confdefs.h <<_ACEOF
2649#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2650_ACEOF
2651
Matthias Kloseb9621712010-04-24 17:59:49 +00002652cat >>confdefs.h <<_ACEOF
2653#define PACKAGE_URL "$PACKAGE_URL"
2654_ACEOF
2655
Martin v. Löwis11437992002-04-12 09:54:03 +00002656
2657# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002658# Prefer an explicitly selected file to automatically selected ones.
2659ac_site_file1=NONE
2660ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002661if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002662 # We do not want a PATH search for config.site.
2663 case $CONFIG_SITE in #((
2664 -*) ac_site_file1=./$CONFIG_SITE;;
2665 */*) ac_site_file1=$CONFIG_SITE;;
2666 *) ac_site_file1=./$CONFIG_SITE;;
2667 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002668elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 ac_site_file1=$prefix/share/config.site
2670 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002671else
Matthias Kloseb9621712010-04-24 17:59:49 +00002672 ac_site_file1=$ac_default_prefix/share/config.site
2673 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002675for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002676do
Matthias Kloseb9621712010-04-24 17:59:49 +00002677 test "x$ac_site_file" = xNONE && continue
2678 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2679 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2680$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002682 . "$ac_site_file" \
2683 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2685as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002686See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002687 fi
2688done
2689
2690if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002691 # Some versions of bash will fail to source /dev/null (special files
2692 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2693 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2694 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2695$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002697 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2698 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002699 esac
2700 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002701else
Matthias Kloseb9621712010-04-24 17:59:49 +00002702 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2703$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002704 >$cache_file
2705fi
2706
2707# Check that the precious variables saved in the cache have kept the same
2708# value.
2709ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002710for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002711 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2712 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002713 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2714 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002715 case $ac_old_set,$ac_new_set in
2716 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002717 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2718$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 +00002719 ac_cache_corrupted=: ;;
2720 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002721 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2722$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002723 ac_cache_corrupted=: ;;
2724 ,);;
2725 *)
2726 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002727 # differences in whitespace do not lead to failure.
2728 ac_old_val_w=`echo x $ac_old_val`
2729 ac_new_val_w=`echo x $ac_new_val`
2730 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2731 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2732$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2733 ac_cache_corrupted=:
2734 else
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2736$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2737 eval $ac_var=\$ac_old_val
2738 fi
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2740$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2742$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 fi;;
2744 esac
2745 # Pass precious variables to config.status.
2746 if test "$ac_new_set" = set; then
2747 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002748 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002749 *) ac_arg=$ac_var=$ac_new_val ;;
2750 esac
2751 case " $ac_configure_args " in
2752 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002753 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002754 esac
2755 fi
2756done
2757if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002758 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2759$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2761$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002762 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002764## -------------------- ##
2765## Main body of script. ##
2766## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002767
Guido van Rossum7f43da71994-08-01 12:15:30 +00002768ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002769ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002770ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2771ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2772ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002773
Guido van Rossum627b2d71993-12-24 10:39:16 +00002774
Michael W. Hudson54241132001-12-07 15:38:26 +00002775
Trent Nelson4d4ec652012-10-16 08:51:24 -04002776
Trent Nelson5595ab52012-10-17 04:47:31 -04002777if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002778 # If we're building out-of-tree, we need to make sure the following
2779 # resources get picked up before their $srcdir counterparts.
2780 # Objects/ -> typeslots.inc
2781 # Include/ -> Python-ast.h, graminit.h
2782 # Python/ -> importlib.h
2783 # (A side effect of this is that these resources will automatically be
2784 # regenerated when building out-of-tree, regardless of whether or not
2785 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2786 # off.)
2787 BASECPPFLAGS="-IObjects -IInclude -IPython"
2788else
2789 BASECPPFLAGS=""
2790fi
2791
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002792
2793
2794
2795
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002796if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002797then
2798# Extract the first word of "hg", so it can be a program name with args.
2799set dummy hg; ac_word=$2
2800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2801$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002802if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002803 $as_echo_n "(cached) " >&6
2804else
2805 if test -n "$HAS_HG"; then
2806 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2807else
2808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2809for as_dir in $PATH
2810do
2811 IFS=$as_save_IFS
2812 test -z "$as_dir" && as_dir=.
2813 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002814 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002815 ac_cv_prog_HAS_HG="found"
2816 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2817 break 2
2818 fi
2819done
2820 done
2821IFS=$as_save_IFS
2822
2823 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2824fi
2825fi
2826HAS_HG=$ac_cv_prog_HAS_HG
2827if test -n "$HAS_HG"; then
2828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2829$as_echo "$HAS_HG" >&6; }
2830else
2831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2832$as_echo "no" >&6; }
2833fi
2834
2835
2836else
2837HAS_HG=no-repository
2838fi
2839if test $HAS_HG = found
2840then
2841 HGVERSION="hg id -i \$(srcdir)"
2842 HGTAG="hg id -t \$(srcdir)"
2843 HGBRANCH="hg id -b \$(srcdir)"
2844else
2845 HGVERSION=""
2846 HGTAG=""
2847 HGBRANCH=""
2848fi
2849
2850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002851ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002852
2853
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002854ac_aux_dir=
2855for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2856 if test -f "$ac_dir/install-sh"; then
2857 ac_aux_dir=$ac_dir
2858 ac_install_sh="$ac_aux_dir/install-sh -c"
2859 break
2860 elif test -f "$ac_dir/install.sh"; then
2861 ac_aux_dir=$ac_dir
2862 ac_install_sh="$ac_aux_dir/install.sh -c"
2863 break
2864 elif test -f "$ac_dir/shtool"; then
2865 ac_aux_dir=$ac_dir
2866 ac_install_sh="$ac_aux_dir/shtool install -c"
2867 break
2868 fi
2869done
2870if test -z "$ac_aux_dir"; then
2871 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2872fi
2873
2874# These three variables are undocumented and unsupported,
2875# and are intended to be withdrawn in a future Autoconf release.
2876# They can cause serious problems if a builder's source tree is in a directory
2877# whose full name contains unusual characters.
2878ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2879ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2880ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2881
2882
2883# Make sure we can run config.sub.
2884$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2885 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2886
2887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2888$as_echo_n "checking build system type... " >&6; }
2889if ${ac_cv_build+:} false; then :
2890 $as_echo_n "(cached) " >&6
2891else
2892 ac_build_alias=$build_alias
2893test "x$ac_build_alias" = x &&
2894 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2895test "x$ac_build_alias" = x &&
2896 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2897ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2898 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2899
2900fi
2901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2902$as_echo "$ac_cv_build" >&6; }
2903case $ac_cv_build in
2904*-*-*) ;;
2905*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2906esac
2907build=$ac_cv_build
2908ac_save_IFS=$IFS; IFS='-'
2909set x $ac_cv_build
2910shift
2911build_cpu=$1
2912build_vendor=$2
2913shift; shift
2914# Remember, the first character of IFS is used to create $*,
2915# except with old shells:
2916build_os=$*
2917IFS=$ac_save_IFS
2918case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2919
2920
2921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2922$as_echo_n "checking host system type... " >&6; }
2923if ${ac_cv_host+:} false; then :
2924 $as_echo_n "(cached) " >&6
2925else
2926 if test "x$host_alias" = x; then
2927 ac_cv_host=$ac_cv_build
2928else
2929 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2930 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2931fi
2932
2933fi
2934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2935$as_echo "$ac_cv_host" >&6; }
2936case $ac_cv_host in
2937*-*-*) ;;
2938*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2939esac
2940host=$ac_cv_host
2941ac_save_IFS=$IFS; IFS='-'
2942set x $ac_cv_host
2943shift
2944host_cpu=$1
2945host_vendor=$2
2946shift; shift
2947# Remember, the first character of IFS is used to create $*,
2948# except with old shells:
2949host_os=$*
2950IFS=$ac_save_IFS
2951case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2952
2953
2954
doko@python.orga10e4a92013-01-25 18:45:12 +01002955
2956
Ned Deilyfcbc2462014-08-22 13:32:49 -07002957# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2958rm -f pybuilddir.txt
2959
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002960if test "$cross_compiling" = yes; then
2961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2962$as_echo_n "checking for python interpreter for cross build... " >&6; }
2963 if test -z "$PYTHON_FOR_BUILD"; then
2964 for interp in python$PACKAGE_VERSION python3 python; do
2965 which $interp >/dev/null 2>&1 || continue
2966 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2967 break
2968 fi
2969 interp=
2970 done
2971 if test x$interp = x; then
2972 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2973 fi
2974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2975$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002976 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 +02002977 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002978elif test "$cross_compiling" = maybe; then
2979 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002980else
2981 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2982fi
2983
2984
Martin v. Löwis11437992002-04-12 09:54:03 +00002985
Benjamin Petersond23f8222009-04-05 19:13:16 +00002986if test "$prefix" != "/"; then
2987 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2988fi
2989
2990
Martin v. Löwis11437992002-04-12 09:54:03 +00002991
2992
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002993# We don't use PACKAGE_ variables, and they cause conflicts
2994# with other autoconf-based packages that include Python.h
2995grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2996rm confdefs.h
2997mv confdefs.h.new confdefs.h
2998
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002999
Larry Hastingsf5002bd2014-03-16 23:05:59 -07003000VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003001
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003002# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003003
3004SOVERSION=1.0
3005
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003006# The later defininition of _XOPEN_SOURCE disables certain features
3007# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3008
Matthias Kloseb9621712010-04-24 17:59:49 +00003009$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003010
3011
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003012# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3013# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3014# them.
3015
Matthias Kloseb9621712010-04-24 17:59:49 +00003016$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003017
3018
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003019# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3020# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3021# them.
3022
Matthias Kloseb9621712010-04-24 17:59:49 +00003023$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003024
3025
Martin v. Löwisd6320502004-08-12 13:45:08 +00003026# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3027# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3028
Matthias Kloseb9621712010-04-24 17:59:49 +00003029$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003030
3031
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003032# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3033# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3034# them.
3035
Matthias Kloseb9621712010-04-24 17:59:49 +00003036$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003037
3038
3039
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003040define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003041
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003042# Arguments passed to configure.
3043
3044CONFIG_ARGS="$ac_configure_args"
3045
Matthias Kloseb9621712010-04-24 17:59:49 +00003046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3047$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003048# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003049if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003050 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003051 case $enableval in
3052 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003053 # Locate the best usable SDK, see Mac/README.txt for more
3054 # information
3055 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003056 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003057 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003058 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3059 if test ! -d "${enableval}"
3060 then
3061 enableval=/
3062 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003064 ;;
3065 esac
3066 case $enableval in
3067 no)
3068 UNIVERSALSDK=
3069 enable_universalsdk=
3070 ;;
3071 *)
3072 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003073 if test ! -d "${UNIVERSALSDK}"
3074 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003075 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003076 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003077 ;;
3078 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003079
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003080
Thomas Wouters477c8d52006-05-27 19:21:47 +00003081else
3082
3083 UNIVERSALSDK=
3084 enable_universalsdk=
3085
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003086fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003087
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003088if test -n "${UNIVERSALSDK}"
3089then
Matthias Kloseb9621712010-04-24 17:59:49 +00003090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3091$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003092else
Matthias Kloseb9621712010-04-24 17:59:49 +00003093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3094$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003095fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003096
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003097
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003098
Ned Deily87adb6e2013-10-18 21:09:56 -07003099ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003100
Ned Deilycbfb9a52012-06-23 16:02:19 -07003101# For backward compatibility reasons we prefer to select '32-bit' if available,
3102# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003103UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003104if test "`uname -s`" = "Darwin"
3105then
3106 if test -n "${UNIVERSALSDK}"
3107 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003108 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003109 then
3110 UNIVERSAL_ARCHS="intel"
3111 fi
3112 fi
3113fi
3114
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003115
Matthias Kloseb9621712010-04-24 17:59:49 +00003116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3117$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003118
3119# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003120if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003121 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003122 UNIVERSAL_ARCHS="$withval"
3123
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003124fi
3125
Ned Deily87adb6e2013-10-18 21:09:56 -07003126if test -n "${UNIVERSALSDK}"
3127then
3128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3129$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3130else
3131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3132$as_echo "no" >&6; }
3133fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003134
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003135
3136# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003137if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003138 withval=$with_framework_name;
3139 PYTHONFRAMEWORK=${withval}
3140 PYTHONFRAMEWORKDIR=${withval}.framework
3141 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3142
3143else
3144
3145 PYTHONFRAMEWORK=Python
3146 PYTHONFRAMEWORKDIR=Python.framework
3147 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3148
3149fi
3150
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003151# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003152if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003153 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003154 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003155 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003156 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003157 esac
3158 case $enableval in
3159 no)
3160 PYTHONFRAMEWORK=
3161 PYTHONFRAMEWORKDIR=no-framework
3162 PYTHONFRAMEWORKPREFIX=
3163 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003164 FRAMEWORKINSTALLFIRST=
3165 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003166 FRAMEWORKALTINSTALLFIRST=
3167 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003168 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003169 if test "x${prefix}" = "xNONE"; then
3170 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3171 else
3172 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3173 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003174 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003175 ;;
3176 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003177 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003178 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003179 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003180 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003181 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3182 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003183 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003184 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003185
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003186 if test "x${prefix}" = "xNONE" ; then
3187 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003188
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003189 else
3190 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3191 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003192
3193 case "${enableval}" in
3194 /System*)
3195 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3196 if test "${prefix}" = "NONE" ; then
3197 # See below
3198 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3199 fi
3200 ;;
3201
3202 /Library*)
3203 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3204 ;;
3205
3206 */Library/Frameworks)
3207 MDIR="`dirname "${enableval}"`"
3208 MDIR="`dirname "${MDIR}"`"
3209 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3210
3211 if test "${prefix}" = "NONE"; then
3212 # User hasn't specified the
3213 # --prefix option, but wants to install
3214 # the framework in a non-default location,
3215 # ensure that the compatibility links get
3216 # installed relative to that prefix as well
3217 # instead of in /usr/local.
3218 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3219 fi
3220 ;;
3221
3222 *)
3223 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3224 ;;
3225 esac
3226
Jack Jansen127e56e2001-09-11 14:41:54 +00003227 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003228
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003229 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003230 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003232
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003233 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003234
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003235 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3236
3237 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3238
Jack Jansene578a632001-08-15 01:27:14 +00003239 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003240
Guido van Rossum563e7081996-09-10 18:20:48 +00003241else
Martin v. Löwis11437992002-04-12 09:54:03 +00003242
Jack Jansene578a632001-08-15 01:27:14 +00003243 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003244 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003245 PYTHONFRAMEWORKPREFIX=
3246 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003247 FRAMEWORKINSTALLFIRST=
3248 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003249 FRAMEWORKALTINSTALLFIRST=
3250 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003251 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003252 if test "x${prefix}" = "xNONE" ; then
3253 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3254 else
3255 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3256 fi
Jack Jansene578a632001-08-15 01:27:14 +00003257 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003258
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003259
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003260fi
3261
Thomas Wouters477c8d52006-05-27 19:21:47 +00003262
3263
Michael W. Hudson54241132001-12-07 15:38:26 +00003264
3265
3266
3267
Jack Jansene578a632001-08-15 01:27:14 +00003268
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003269
3270
3271
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003272
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003273
Ned Deilyb8f944f2013-11-21 22:42:25 -08003274
Jack Jansene578a632001-08-15 01:27:14 +00003275##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003276## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003277## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003278##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003279# Set name for machine-dependent library files
3280
Matthias Kloseb9621712010-04-24 17:59:49 +00003281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3282$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003283if test -z "$MACHDEP"
3284then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003285 # avoid using uname for cross builds
3286 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003287 # ac_sys_system and ac_sys_release are used for setting
3288 # a lot of different things including 'define_xopen_source'
3289 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003290 case "$host" in
3291 *-*-linux*)
3292 ac_sys_system=Linux
3293 ;;
3294 *-*-cygwin*)
3295 ac_sys_system=Cygwin
3296 ;;
3297 *)
3298 # for now, limit cross builds to known configurations
3299 MACHDEP="unknown"
3300 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3301 esac
3302 ac_sys_release=
3303 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003304 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003305 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003306 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003307 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003308 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003309 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003310 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003311 fi
3312 ac_md_system=`echo $ac_sys_system |
3313 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3314 ac_md_release=`echo $ac_sys_release |
3315 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3316 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003317
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003318 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003319 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003320 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003321 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003322 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003323 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003324 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003325fi
Guido van Rossum91922671997-10-09 20:24:13 +00003326
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003327
3328if test "$cross_compiling" = yes; then
3329 case "$host" in
3330 *-*-linux*)
3331 case "$host_cpu" in
3332 arm*)
3333 _host_cpu=arm
3334 ;;
3335 *)
3336 _host_cpu=$host_cpu
3337 esac
3338 ;;
3339 *-*-cygwin*)
3340 _host_cpu=
3341 ;;
3342 *)
3343 # for now, limit cross builds to known configurations
3344 MACHDEP="unknown"
3345 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3346 esac
3347 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3348fi
3349
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003350# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3351# disable features if it is defined, without any means to access these
3352# features as extensions. For these systems, we skip the definition of
3353# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3354# some feature, make sure there is no alternative way to access this
3355# feature. Also, when using wildcards, make sure you have verified the
3356# need for not defining _XOPEN_SOURCE on all systems matching the
3357# wildcard, and that the wildcard does not include future systems
3358# (which may remove their limitations).
3359case $ac_sys_system/$ac_sys_release in
3360 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3361 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003362 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003363 # In addition, Stefan Krah confirms that issue #1244610 exists through
3364 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003365 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003366 define_xopen_source=no
3367 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3368 # also defined. This can be overridden by defining _BSD_SOURCE
3369 # As this has a different meaning on Linux, only define it on OpenBSD
3370
Matthias Kloseb9621712010-04-24 17:59:49 +00003371$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003372
3373 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003374 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003375 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3376 # also defined. This can be overridden by defining _BSD_SOURCE
3377 # As this has a different meaning on Linux, only define it on OpenBSD
3378
Matthias Kloseb9621712010-04-24 17:59:49 +00003379$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003380
3381 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003382 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3383 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3384 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003385 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 +00003386 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003387 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3388 # request to enable features supported by the standard as a request
3389 # to disable features not supported by the standard. The best way
3390 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3391 # entirely and define __EXTENSIONS__ instead.
3392 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003393 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003394 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3395 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003396 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003397 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003398 define_xopen_source=no;;
3399 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003400 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003401 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003402 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003403 # On FreeBSD 4, the math functions C89 does not cover are never defined
3404 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3405 FreeBSD/4.*)
3406 define_xopen_source=no;;
3407 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3408 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3409 # identifies itself as Darwin/7.*
3410 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3411 # disables platform specific features beyond repair.
3412 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3413 # has no effect, don't bother defining them
3414 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003415 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003416 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003417 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003418 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3419 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3420 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003421 AIX/4)
3422 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003423 AIX/5)
3424 if test `uname -r` -eq 1; then
3425 define_xopen_source=no
3426 fi
3427 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003428 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3429 # defining NI_NUMERICHOST.
3430 QNX/6.3.2)
3431 define_xopen_source=no
3432 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003433
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003434esac
3435
3436if test $define_xopen_source = yes
3437then
Victor Stinner14d098d2011-09-07 22:29:43 +02003438 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003439
Victor Stinner14d098d2011-09-07 22:29:43 +02003440$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003441
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003442
3443 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3444 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3445 # several APIs are not declared. Since this is also needed in some
3446 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003447
Matthias Kloseb9621712010-04-24 17:59:49 +00003448$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003449
3450
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003451
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003452$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003453
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003454fi
3455
Christian Heimes647cd872013-12-07 23:39:33 +01003456# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3457case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003458 hp*|HP*)
3459 define_stdc_a1=yes;;
3460 *)
3461 define_stdc_a1=no;;
3462esac
3463
3464if test $define_stdc_a1 = yes
3465then
Christian Heimes647cd872013-12-07 23:39:33 +01003466
3467$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3468
Christian Heimesb02bcae2013-12-08 15:21:08 +01003469fi
Christian Heimes647cd872013-12-07 23:39:33 +01003470
Guido van Rossum91922671997-10-09 20:24:13 +00003471#
3472# SGI compilers allow the specification of the both the ABI and the
3473# ISA on the command line. Depending on the values of these switches,
3474# different and often incompatable code will be generated.
3475#
3476# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3477# thus supply support for various ABI/ISA combinations. The MACHDEP
3478# variable is also adjusted.
3479#
3480
3481if test ! -z "$SGI_ABI"
3482then
3483 CC="cc $SGI_ABI"
3484 LDFLAGS="$SGI_ABI $LDFLAGS"
3485 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3488$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003489
Jack Jansen6b08a402004-06-03 12:41:45 +00003490# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3491# it may influence the way we can build extensions, so distutils
3492# needs to check it
3493
Thomas Wouters477c8d52006-05-27 19:21:47 +00003494
Jack Jansen6b08a402004-06-03 12:41:45 +00003495CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003496EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003497
Guido van Rossum627b2d71993-12-24 10:39:16 +00003498# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003499
3500# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3501# for debug/optimization stuff. BASECFLAGS is for flags that are required
3502# just to get things to compile and link. Users are free to override OPT
3503# when running configure or make. The build should not break if they do.
3504# BASECFLAGS should generally not be messed with, however.
3505
3506# XXX shouldn't some/most/all of this code be merged with the stuff later
3507# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3509$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003510
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003511# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003512if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003513 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003514 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003515 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003516 without_gcc=yes;;
3517 yes) CC=gcc
3518 without_gcc=no;;
3519 *) CC=$withval
3520 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003521 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003522else
Martin v. Löwis11437992002-04-12 09:54:03 +00003523
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003524 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003525 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003526 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003527 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003528 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003529fi
3530
Matthias Kloseb9621712010-04-24 17:59:49 +00003531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3532$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003533
Guido van Rossum8b131c51995-03-09 14:10:13 +00003534# If the user switches compilers, we can't believe the cache
3535if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3536then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003537 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003538(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003539fi
3540
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003541# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3542# when the compiler supports them, but we don't always want -O2, and
3543# we set -g later.
3544if test -z "$CFLAGS"; then
3545 CFLAGS=
3546fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003547
3548if test "$ac_sys_system" = "Darwin"
3549then
3550 # Compiler selection on MacOSX is more complicated than
3551 # AC_PROG_CC can handle, see Mac/README.txt for more
3552 # information
3553 if test -z "${CC}"
3554 then
3555 found_gcc=
3556 found_clang=
3557 as_save_IFS=$IFS; IFS=:
3558 for as_dir in $PATH
3559 do
3560 IFS=$as_save_IFS
3561 if test -x $as_dir/gcc; then
3562 if test -z "${found_gcc}"; then
3563 found_gcc=$as_dir/gcc
3564 fi
3565 fi
3566 if test -x $as_dir/clang; then
3567 if test -z "${found_clang}"; then
3568 found_clang=$as_dir/clang
3569 fi
3570 fi
3571 done
3572 IFS=$as_save_IFS
3573
3574 if test -n "$found_gcc" -a -n "$found_clang"
3575 then
3576 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3577 then
3578 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3579$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3580 CC="$found_clang"
3581 CXX="$found_clang++"
3582 fi
3583
3584
3585 elif test -z "$found_gcc" -a -n "$found_clang"
3586 then
3587 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3588$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3589 CC="$found_clang"
3590 CXX="$found_clang++"
3591
3592 elif test -z "$found_gcc" -a -z "$found_clang"
3593 then
3594 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3595 if test -n "${found_clang}"
3596 then
3597 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3598$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3599 CC="${found_clang}"
3600 CXX="`/usr/bin/xcrun -find clang++`"
3601
3602 # else: use default behaviour
3603 fi
3604 fi
3605 fi
3606fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003607ac_ext=c
3608ac_cpp='$CPP $CPPFLAGS'
3609ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3610ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3611ac_compiler_gnu=$ac_cv_c_compiler_gnu
3612if test -n "$ac_tool_prefix"; then
3613 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3614set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3616$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003617if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003619else
3620 if test -n "$CC"; then
3621 ac_cv_prog_CC="$CC" # Let the user override the test.
3622else
Martin v. Löwis11437992002-04-12 09:54:03 +00003623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3624for as_dir in $PATH
3625do
3626 IFS=$as_save_IFS
3627 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003629 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 $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 +00003632 break 2
3633 fi
3634done
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003636IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003637
Jack Jansendd19cf82001-12-06 22:36:17 +00003638fi
3639fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003640CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003641if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3643$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003644else
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3646$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003647fi
3648
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003649
Martin v. Löwis11437992002-04-12 09:54:03 +00003650fi
3651if test -z "$ac_cv_prog_CC"; then
3652 ac_ct_CC=$CC
3653 # Extract the first word of "gcc", so it can be a program name with args.
3654set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3656$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003657if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003658 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003659else
3660 if test -n "$ac_ct_CC"; then
3661 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3662else
3663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3664for as_dir in $PATH
3665do
3666 IFS=$as_save_IFS
3667 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003669 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003670 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 $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 +00003672 break 2
3673 fi
3674done
Matthias Kloseb9621712010-04-24 17:59:49 +00003675 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003676IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003677
3678fi
3679fi
3680ac_ct_CC=$ac_cv_prog_ac_ct_CC
3681if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3683$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003684else
Matthias Kloseb9621712010-04-24 17:59:49 +00003685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3686$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003687fi
3688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003689 if test "x$ac_ct_CC" = x; then
3690 CC=""
3691 else
3692 case $cross_compiling:$ac_tool_warned in
3693yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003694{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3695$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696ac_tool_warned=yes ;;
3697esac
3698 CC=$ac_ct_CC
3699 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003700else
3701 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003702fi
3703
Jack Jansendd19cf82001-12-06 22:36:17 +00003704if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003705 if test -n "$ac_tool_prefix"; then
3706 # 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 +00003707set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3709$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003710if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003712else
3713 if test -n "$CC"; then
3714 ac_cv_prog_CC="$CC" # Let the user override the test.
3715else
Martin v. Löwis11437992002-04-12 09:54:03 +00003716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3717for as_dir in $PATH
3718do
3719 IFS=$as_save_IFS
3720 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003722 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003723 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 $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 +00003725 break 2
3726 fi
3727done
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003730
3731fi
3732fi
3733CC=$ac_cv_prog_CC
3734if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3736$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003737else
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3739$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003740fi
3741
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003742
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003744fi
3745if test -z "$CC"; then
3746 # Extract the first word of "cc", so it can be a program name with args.
3747set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3749$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003750if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003751 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003752else
3753 if test -n "$CC"; then
3754 ac_cv_prog_CC="$CC" # Let the user override the test.
3755else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003756 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3758for as_dir in $PATH
3759do
3760 IFS=$as_save_IFS
3761 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003762 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003763 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003764 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3765 ac_prog_rejected=yes
3766 continue
3767 fi
3768 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 $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 +00003770 break 2
3771 fi
3772done
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003774IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003775
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003776if test $ac_prog_rejected = yes; then
3777 # We found a bogon in the path, so make sure we never use it.
3778 set dummy $ac_cv_prog_CC
3779 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003780 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003781 # We chose a different compiler from the bogus one.
3782 # However, it has the same basename, so the bogon will be chosen
3783 # first if we set CC to just the basename; use the full file name.
3784 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003785 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003786 fi
3787fi
3788fi
3789fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003790CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003791if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3793$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003794else
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3796$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003797fi
3798
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799
Martin v. Löwis11437992002-04-12 09:54:03 +00003800fi
3801if test -z "$CC"; then
3802 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003803 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003804 do
3805 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3806set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3808$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003809if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003811else
3812 if test -n "$CC"; then
3813 ac_cv_prog_CC="$CC" # Let the user override the test.
3814else
Martin v. Löwis11437992002-04-12 09:54:03 +00003815as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3816for as_dir in $PATH
3817do
3818 IFS=$as_save_IFS
3819 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003821 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003822 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 $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 +00003824 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003825 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003826done
Matthias Kloseb9621712010-04-24 17:59:49 +00003827 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003828IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003829
3830fi
3831fi
3832CC=$ac_cv_prog_CC
3833if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3835$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003836else
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3838$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003839fi
3840
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003841
Martin v. Löwis11437992002-04-12 09:54:03 +00003842 test -n "$CC" && break
3843 done
3844fi
3845if test -z "$CC"; then
3846 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003848do
3849 # Extract the first word of "$ac_prog", so it can be a program name with args.
3850set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3852$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003853if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003854 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003855else
3856 if test -n "$ac_ct_CC"; then
3857 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3858else
3859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3860for as_dir in $PATH
3861do
3862 IFS=$as_save_IFS
3863 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003865 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003866 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003867 $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 +00003868 break 2
3869 fi
3870done
Matthias Kloseb9621712010-04-24 17:59:49 +00003871 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003872IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003873
Martin v. Löwis11437992002-04-12 09:54:03 +00003874fi
3875fi
3876ac_ct_CC=$ac_cv_prog_ac_ct_CC
3877if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3879$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003880else
Matthias Kloseb9621712010-04-24 17:59:49 +00003881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3882$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003883fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003885
Martin v. Löwis11437992002-04-12 09:54:03 +00003886 test -n "$ac_ct_CC" && break
3887done
Michael W. Hudson54241132001-12-07 15:38:26 +00003888
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003889 if test "x$ac_ct_CC" = x; then
3890 CC=""
3891 else
3892 case $cross_compiling:$ac_tool_warned in
3893yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003894{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3895$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003896ac_tool_warned=yes ;;
3897esac
3898 CC=$ac_ct_CC
3899 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003900fi
3901
3902fi
3903
3904
Matthias Kloseb9621712010-04-24 17:59:49 +00003905test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3906$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003907as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003908See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003909
3910# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003911$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3912set X $ac_compile
3913ac_compiler=$2
3914for ac_option in --version -v -V -qversion; do
3915 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003916case "(($ac_try" in
3917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3918 *) ac_try_echo=$ac_try;;
3919esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003920eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3921$as_echo "$ac_try_echo"; } >&5
3922 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003923 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003924 if test -s conftest.err; then
3925 sed '10a\
3926... rest of stderr output deleted ...
3927 10q' conftest.err >conftest.er1
3928 cat conftest.er1 >&5
3929 fi
3930 rm -f conftest.er1 conftest.err
3931 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3932 test $ac_status = 0; }
3933done
Martin v. Löwis11437992002-04-12 09:54:03 +00003934
Matthias Kloseb9621712010-04-24 17:59:49 +00003935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003936/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003937
Martin v. Löwis11437992002-04-12 09:54:03 +00003938int
3939main ()
3940{
3941
3942 ;
3943 return 0;
3944}
3945_ACEOF
3946ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003947ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003948# Try to create an executable without -o first, disregard a.out.
3949# It will help us diagnose broken compilers, and finding out an intuition
3950# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3952$as_echo_n "checking whether the C compiler works... " >&6; }
3953ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3954
3955# The possible output files:
3956ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3957
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958ac_rmfiles=
3959for ac_file in $ac_files
3960do
3961 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003962 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3964 esac
3965done
3966rm -f $ac_rmfiles
3967
Matthias Kloseb9621712010-04-24 17:59:49 +00003968if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003969case "(($ac_try" in
3970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3971 *) ac_try_echo=$ac_try;;
3972esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003973eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3974$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003976 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003977 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3978 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003979 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3980# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3981# in a Makefile. We should not override ac_cv_exeext if it was cached,
3982# so that the user can short-circuit this test for compilers unknown to
3983# Autoconf.
3984for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003985do
3986 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003987 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003988 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003989 ;;
3990 [ab].out )
3991 # We found the default executable, but exeext='' is most
3992 # certainly right.
3993 break;;
3994 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003995 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003996 then :; else
3997 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3998 fi
3999 # We set ac_cv_exeext here because the later test for it is not
4000 # safe: cross compilers may not add the suffix if given an `-o'
4001 # argument, so we may need to know it at that point already.
4002 # Even if this section looks crufty: it has the advantage of
4003 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004004 break;;
4005 * )
4006 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004007 esac
4008done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004009test "$ac_cv_exeext" = no && ac_cv_exeext=
4010
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004011else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004012 ac_file=''
4013fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004014if test -z "$ac_file"; then :
4015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4016$as_echo "no" >&6; }
4017$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004018sed 's/^/| /' conftest.$ac_ext >&5
4019
Matthias Kloseb9621712010-04-24 17:59:49 +00004020{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4021$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004022as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004023See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004024else
4025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4026$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004027fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4029$as_echo_n "checking for C compiler default output file name... " >&6; }
4030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4031$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004032ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004033
Matthias Kloseb9621712010-04-24 17:59:49 +00004034rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004035ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4037$as_echo_n "checking for suffix of executables... " >&6; }
4038if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004039case "(($ac_try" in
4040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4041 *) ac_try_echo=$ac_try;;
4042esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004043eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4044$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004045 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004046 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004047 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4048 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004049 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4050# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4051# work properly (i.e., refer to `conftest.exe'), while it won't with
4052# `rm'.
4053for ac_file in conftest.exe conftest conftest.*; do
4054 test -f "$ac_file" || continue
4055 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004056 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004057 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4058 break;;
4059 * ) break;;
4060 esac
4061done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004062else
Matthias Kloseb9621712010-04-24 17:59:49 +00004063 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4064$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004065as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004066See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004067fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004068rm -f conftest conftest$ac_cv_exeext
4069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4070$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004071
4072rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004073EXEEXT=$ac_cv_exeext
4074ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4076/* end confdefs.h. */
4077#include <stdio.h>
4078int
4079main ()
4080{
4081FILE *f = fopen ("conftest.out", "w");
4082 return ferror (f) || fclose (f) != 0;
4083
4084 ;
4085 return 0;
4086}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004088ac_clean_files="$ac_clean_files conftest.out"
4089# Check that the compiler produces executables we can run. If not, either
4090# the compiler is broken, or we cross compile.
4091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4092$as_echo_n "checking whether we are cross compiling... " >&6; }
4093if test "$cross_compiling" != yes; then
4094 { { ac_try="$ac_link"
4095case "(($ac_try" in
4096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4097 *) ac_try_echo=$ac_try;;
4098esac
4099eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4100$as_echo "$ac_try_echo"; } >&5
4101 (eval "$ac_link") 2>&5
4102 ac_status=$?
4103 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4104 test $ac_status = 0; }
4105 if { ac_try='./conftest$ac_cv_exeext'
4106 { { case "(($ac_try" in
4107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4108 *) ac_try_echo=$ac_try;;
4109esac
4110eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4111$as_echo "$ac_try_echo"; } >&5
4112 (eval "$ac_try") 2>&5
4113 ac_status=$?
4114 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4115 test $ac_status = 0; }; }; then
4116 cross_compiling=no
4117 else
4118 if test "$cross_compiling" = maybe; then
4119 cross_compiling=yes
4120 else
4121 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4122$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004123as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004124If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004125See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 fi
4127 fi
4128fi
4129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4130$as_echo "$cross_compiling" >&6; }
4131
4132rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4133ac_clean_files=$ac_clean_files_save
4134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4135$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004136if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 $as_echo_n "(cached) " >&6
4138else
4139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004140/* end confdefs.h. */
4141
4142int
4143main ()
4144{
4145
4146 ;
4147 return 0;
4148}
4149_ACEOF
4150rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004151if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004152case "(($ac_try" in
4153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4154 *) ac_try_echo=$ac_try;;
4155esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004156eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4157$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004159 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004160 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4161 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004162 for ac_file in conftest.o conftest.obj conftest.*; do
4163 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004164 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004165 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004166 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4167 break;;
4168 esac
4169done
4170else
Matthias Kloseb9621712010-04-24 17:59:49 +00004171 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004172sed 's/^/| /' conftest.$ac_ext >&5
4173
Matthias Kloseb9621712010-04-24 17:59:49 +00004174{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4175$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004176as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004177See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004178fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004179rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4182$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004183OBJEXT=$ac_cv_objext
4184ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4186$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004187if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004188 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004189else
Matthias Kloseb9621712010-04-24 17:59:49 +00004190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004191/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004192
Martin v. Löwis11437992002-04-12 09:54:03 +00004193int
4194main ()
4195{
4196#ifndef __GNUC__
4197 choke me
4198#endif
4199
4200 ;
4201 return 0;
4202}
4203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004204if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004205 ac_compiler_gnu=yes
4206else
Matthias Kloseb9621712010-04-24 17:59:49 +00004207 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004210ac_cv_c_compiler_gnu=$ac_compiler_gnu
4211
4212fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4214$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4215if test $ac_compiler_gnu = yes; then
4216 GCC=yes
4217else
4218 GCC=
4219fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004220ac_test_CFLAGS=${CFLAGS+set}
4221ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4223$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004224if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004225 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004226else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227 ac_save_c_werror_flag=$ac_c_werror_flag
4228 ac_c_werror_flag=yes
4229 ac_cv_prog_cc_g=no
4230 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004232/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004233
Martin v. Löwis11437992002-04-12 09:54:03 +00004234int
4235main ()
4236{
4237
4238 ;
4239 return 0;
4240}
4241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004242if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004243 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004244else
Matthias Kloseb9621712010-04-24 17:59:49 +00004245 CFLAGS=""
4246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004247/* end confdefs.h. */
4248
4249int
4250main ()
4251{
4252
4253 ;
4254 return 0;
4255}
4256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004257if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004258
Matthias Kloseb9621712010-04-24 17:59:49 +00004259else
4260 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263/* end confdefs.h. */
4264
4265int
4266main ()
4267{
4268
4269 ;
4270 return 0;
4271}
4272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004273if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4281 ac_c_werror_flag=$ac_save_c_werror_flag
4282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4284$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004285if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004286 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004287elif test $ac_cv_prog_cc_g = yes; then
4288 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004289 CFLAGS="-g -O2"
4290 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004291 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004292 fi
4293else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004294 if test "$GCC" = yes; then
4295 CFLAGS="-O2"
4296 else
4297 CFLAGS=
4298 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4301$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004302if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004303 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004304else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004306ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004308/* end confdefs.h. */
4309#include <stdarg.h>
4310#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004311struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004312/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4313struct buf { int x; };
4314FILE * (*rcsopen) (struct buf *, struct stat *, int);
4315static char *e (p, i)
4316 char **p;
4317 int i;
4318{
4319 return p[i];
4320}
4321static char *f (char * (*g) (char **, int), char **p, ...)
4322{
4323 char *s;
4324 va_list v;
4325 va_start (v,p);
4326 s = g (p, va_arg (v,int));
4327 va_end (v);
4328 return s;
4329}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004330
4331/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4332 function prototypes and stuff, but not '\xHH' hex character constants.
4333 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004335 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4336 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004338int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4339
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4341 inside strings and character constants. */
4342#define FOO(x) 'x'
4343int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4344
Skip Montanaro6dead952003-09-25 14:50:04 +00004345int test (int i, double x);
4346struct s1 {int (*f) (int a);};
4347struct s2 {int (*f) (double a);};
4348int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4349int argc;
4350char **argv;
4351int
4352main ()
4353{
4354return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4355 ;
4356 return 0;
4357}
4358_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4360 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004361do
4362 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004363 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366rm -f core conftest.err conftest.$ac_objext
4367 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004368done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004370CC=$ac_save_CC
4371
4372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004373# AC_CACHE_VAL
4374case "x$ac_cv_prog_cc_c89" in
4375 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4377$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4380$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004381 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004382 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4384$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004385esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004386if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004387
Matthias Kloseb9621712010-04-24 17:59:49 +00004388fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004389
Martin v. Löwis11437992002-04-12 09:54:03 +00004390ac_ext=c
4391ac_cpp='$CPP $CPPFLAGS'
4392ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4393ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4394ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004395
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004396
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004397
4398
Matthias Kloseb9621712010-04-24 17:59:49 +00004399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4400$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004401
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004402# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004403if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004404 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004405
4406 case $withval in
4407 no) with_cxx_main=no
4408 MAINCC='$(CC)';;
4409 yes) with_cxx_main=yes
4410 MAINCC='$(CXX)';;
4411 *) with_cxx_main=yes
4412 MAINCC=$withval
4413 if test -z "$CXX"
4414 then
4415 CXX=$withval
4416 fi;;
4417 esac
4418else
4419
4420 with_cxx_main=no
4421 MAINCC='$(CC)'
4422
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004423fi
4424
Matthias Kloseb9621712010-04-24 17:59:49 +00004425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4426$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004427
4428preset_cxx="$CXX"
4429if test -z "$CXX"
4430then
4431 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004432 gcc) if test -n "$ac_tool_prefix"; then
4433 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4434set dummy ${ac_tool_prefix}g++; ac_word=$2
4435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4436$as_echo_n "checking for $ac_word... " >&6; }
4437if ${ac_cv_path_CXX+:} false; then :
4438 $as_echo_n "(cached) " >&6
4439else
4440 case $CXX in
4441 [\\/]* | ?:[\\/]*)
4442 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4443 ;;
4444 *)
4445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4446for as_dir in notfound
4447do
4448 IFS=$as_save_IFS
4449 test -z "$as_dir" && as_dir=.
4450 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004451 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004452 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4454 break 2
4455 fi
4456done
4457 done
4458IFS=$as_save_IFS
4459
4460 ;;
4461esac
4462fi
4463CXX=$ac_cv_path_CXX
4464if test -n "$CXX"; then
4465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4466$as_echo "$CXX" >&6; }
4467else
4468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4469$as_echo "no" >&6; }
4470fi
4471
4472
4473fi
4474if test -z "$ac_cv_path_CXX"; then
4475 ac_pt_CXX=$CXX
4476 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004477set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4479$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004480if ${ac_cv_path_ac_pt_CXX+:} false; then :
4481 $as_echo_n "(cached) " >&6
4482else
4483 case $ac_pt_CXX in
4484 [\\/]* | ?:[\\/]*)
4485 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4486 ;;
4487 *)
4488 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4489for as_dir in notfound
4490do
4491 IFS=$as_save_IFS
4492 test -z "$as_dir" && as_dir=.
4493 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004494 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004495 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4496 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4497 break 2
4498 fi
4499done
4500 done
4501IFS=$as_save_IFS
4502
4503 ;;
4504esac
4505fi
4506ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4507if test -n "$ac_pt_CXX"; then
4508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4509$as_echo "$ac_pt_CXX" >&6; }
4510else
4511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4512$as_echo "no" >&6; }
4513fi
4514
4515 if test "x$ac_pt_CXX" = x; then
4516 CXX="g++"
4517 else
4518 case $cross_compiling:$ac_tool_warned in
4519yes:)
4520{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4521$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4522ac_tool_warned=yes ;;
4523esac
4524 CXX=$ac_pt_CXX
4525 fi
4526else
4527 CXX="$ac_cv_path_CXX"
4528fi
4529 ;;
4530 cc) if test -n "$ac_tool_prefix"; then
4531 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4532set dummy ${ac_tool_prefix}c++; ac_word=$2
4533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4534$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004535if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004536 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004537else
4538 case $CXX in
4539 [\\/]* | ?:[\\/]*)
4540 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4541 ;;
4542 *)
4543 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4544for as_dir in notfound
4545do
4546 IFS=$as_save_IFS
4547 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004548 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004549 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004550 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004551 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004552 break 2
4553 fi
4554done
Matthias Kloseb9621712010-04-24 17:59:49 +00004555 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004556IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004557
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004558 ;;
4559esac
4560fi
4561CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004562if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4564$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004565else
Matthias Kloseb9621712010-04-24 17:59:49 +00004566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4567$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004569
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004570
4571fi
4572if test -z "$ac_cv_path_CXX"; then
4573 ac_pt_CXX=$CXX
4574 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004575set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4577$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004578if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004579 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004580else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004581 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004582 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004583 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 +00004584 ;;
4585 *)
4586 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4587for as_dir in notfound
4588do
4589 IFS=$as_save_IFS
4590 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004591 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004592 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004593 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004594 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004595 break 2
4596 fi
4597done
Matthias Kloseb9621712010-04-24 17:59:49 +00004598 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004599IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004600
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004601 ;;
4602esac
4603fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004604ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4605if test -n "$ac_pt_CXX"; then
4606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4607$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004608else
Matthias Kloseb9621712010-04-24 17:59:49 +00004609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4610$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004612
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004613 if test "x$ac_pt_CXX" = x; then
4614 CXX="c++"
4615 else
4616 case $cross_compiling:$ac_tool_warned in
4617yes:)
4618{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4619$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4620ac_tool_warned=yes ;;
4621esac
4622 CXX=$ac_pt_CXX
4623 fi
4624else
4625 CXX="$ac_cv_path_CXX"
4626fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004627 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004628 clang|*/clang) if test -n "$ac_tool_prefix"; then
4629 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4630set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4632$as_echo_n "checking for $ac_word... " >&6; }
4633if ${ac_cv_path_CXX+:} false; then :
4634 $as_echo_n "(cached) " >&6
4635else
4636 case $CXX in
4637 [\\/]* | ?:[\\/]*)
4638 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4639 ;;
4640 *)
4641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4642for as_dir in notfound
4643do
4644 IFS=$as_save_IFS
4645 test -z "$as_dir" && as_dir=.
4646 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004647 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004648 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4649 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4650 break 2
4651 fi
4652done
4653 done
4654IFS=$as_save_IFS
4655
Ned Deilycbfb9a52012-06-23 16:02:19 -07004656 ;;
4657esac
4658fi
4659CXX=$ac_cv_path_CXX
4660if test -n "$CXX"; then
4661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4662$as_echo "$CXX" >&6; }
4663else
4664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4665$as_echo "no" >&6; }
4666fi
4667
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004668
4669fi
4670if test -z "$ac_cv_path_CXX"; then
4671 ac_pt_CXX=$CXX
4672 # Extract the first word of "clang++", so it can be a program name with args.
4673set dummy clang++; ac_word=$2
4674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4675$as_echo_n "checking for $ac_word... " >&6; }
4676if ${ac_cv_path_ac_pt_CXX+:} false; then :
4677 $as_echo_n "(cached) " >&6
4678else
4679 case $ac_pt_CXX in
4680 [\\/]* | ?:[\\/]*)
4681 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4682 ;;
4683 *)
4684 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4685for as_dir in notfound
4686do
4687 IFS=$as_save_IFS
4688 test -z "$as_dir" && as_dir=.
4689 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004690 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004691 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4692 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4693 break 2
4694 fi
4695done
4696 done
4697IFS=$as_save_IFS
4698
4699 ;;
4700esac
4701fi
4702ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4703if test -n "$ac_pt_CXX"; then
4704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4705$as_echo "$ac_pt_CXX" >&6; }
4706else
4707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4708$as_echo "no" >&6; }
4709fi
4710
4711 if test "x$ac_pt_CXX" = x; then
4712 CXX="clang++"
4713 else
4714 case $cross_compiling:$ac_tool_warned in
4715yes:)
4716{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4717$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4718ac_tool_warned=yes ;;
4719esac
4720 CXX=$ac_pt_CXX
4721 fi
4722else
4723 CXX="$ac_cv_path_CXX"
4724fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004725 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004726 esac
4727 if test "$CXX" = "notfound"
4728 then
4729 CXX=""
4730 fi
4731fi
4732if test -z "$CXX"
4733then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004734 if test -n "$ac_tool_prefix"; then
4735 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4736 do
4737 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4738set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4740$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004741if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004742 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004743else
4744 if test -n "$CXX"; then
4745 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4746else
4747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4748for as_dir in $PATH
4749do
4750 IFS=$as_save_IFS
4751 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004752 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004753 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004754 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004755 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004756 break 2
4757 fi
4758done
Matthias Kloseb9621712010-04-24 17:59:49 +00004759 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004760IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004761
4762fi
4763fi
4764CXX=$ac_cv_prog_CXX
4765if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4767$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004768else
Matthias Kloseb9621712010-04-24 17:59:49 +00004769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4770$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004771fi
4772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004773
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004774 test -n "$CXX" && break
4775 done
4776fi
4777if test -z "$CXX"; then
4778 ac_ct_CXX=$CXX
4779 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4780do
4781 # Extract the first word of "$ac_prog", so it can be a program name with args.
4782set dummy $ac_prog; ac_word=$2
4783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4784$as_echo_n "checking for $ac_word... " >&6; }
4785if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4786 $as_echo_n "(cached) " >&6
4787else
4788 if test -n "$ac_ct_CXX"; then
4789 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4790else
4791as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4792for as_dir in $PATH
4793do
4794 IFS=$as_save_IFS
4795 test -z "$as_dir" && as_dir=.
4796 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004797 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004798 ac_cv_prog_ac_ct_CXX="$ac_prog"
4799 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4800 break 2
4801 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004802done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004803 done
4804IFS=$as_save_IFS
4805
4806fi
4807fi
4808ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4809if test -n "$ac_ct_CXX"; then
4810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4811$as_echo "$ac_ct_CXX" >&6; }
4812else
4813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4814$as_echo "no" >&6; }
4815fi
4816
4817
4818 test -n "$ac_ct_CXX" && break
4819done
4820
4821 if test "x$ac_ct_CXX" = x; then
4822 CXX="notfound"
4823 else
4824 case $cross_compiling:$ac_tool_warned in
4825yes:)
4826{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4827$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4828ac_tool_warned=yes ;;
4829esac
4830 CXX=$ac_ct_CXX
4831 fi
4832fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004833
4834 if test "$CXX" = "notfound"
4835 then
4836 CXX=""
4837 fi
4838fi
4839if test "$preset_cxx" != "$CXX"
4840then
Christian Heimesfe32aec2013-11-20 01:18:26 +01004841 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004842
4843 By default, distutils will build C++ extension modules with \"$CXX\".
4844 If this is not intended, then set CXX on the configure command line.
4845 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01004846$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847
4848 By default, distutils will build C++ extension modules with \"$CXX\".
4849 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01004850 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004851fi
4852
4853
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4855$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4856save_LDFLAGS="$LDFLAGS"
4857LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004858
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4860/* end confdefs.h. */
4861
4862int
4863main ()
4864{
4865
4866 ;
4867 return 0;
4868}
4869_ACEOF
4870if ac_fn_c_try_link "$LINENO"; then :
4871 NO_AS_NEEDED="-Wl,--no-as-needed"
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4873$as_echo "yes" >&6; }
4874else
4875 NO_AS_NEEDED=""
4876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4877$as_echo "no" >&6; }
4878fi
4879rm -f core conftest.err conftest.$ac_objext \
4880 conftest$ac_exeext conftest.$ac_ext
4881LDFLAGS="$save_LDFLAGS"
4882
4883
4884
4885# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004886ac_ext=c
4887ac_cpp='$CPP $CPPFLAGS'
4888ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4889ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4890ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4892$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004893# On Suns, sometimes $CPP names a directory.
4894if test -n "$CPP" && test -d "$CPP"; then
4895 CPP=
4896fi
4897if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004898 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004899 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004900else
Martin v. Löwis11437992002-04-12 09:54:03 +00004901 # Double quotes because CPP needs to be expanded
4902 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4903 do
4904 ac_preproc_ok=false
4905for ac_c_preproc_warn_flag in '' yes
4906do
4907 # Use a header file that comes with gcc, so configuring glibc
4908 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004909 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4910 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004911 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004912 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004914/* end confdefs.h. */
4915#ifdef __STDC__
4916# include <limits.h>
4917#else
4918# include <assert.h>
4919#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004920 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004922if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004923
Matthias Kloseb9621712010-04-24 17:59:49 +00004924else
Martin v. Löwis11437992002-04-12 09:54:03 +00004925 # Broken: fails on valid input.
4926continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004927fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004928rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004929
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004930 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004931 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004933/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004934#include <ac_nonexistent.h>
4935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004936if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004937 # Broken: success on invalid input.
4938continue
4939else
Martin v. Löwis11437992002-04-12 09:54:03 +00004940 # Passes both tests.
4941ac_preproc_ok=:
4942break
4943fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004944rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004945
4946done
4947# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004948rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004949if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004950 break
4951fi
4952
4953 done
4954 ac_cv_prog_CPP=$CPP
4955
4956fi
4957 CPP=$ac_cv_prog_CPP
4958else
4959 ac_cv_prog_CPP=$CPP
4960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4962$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004963ac_preproc_ok=false
4964for ac_c_preproc_warn_flag in '' yes
4965do
4966 # Use a header file that comes with gcc, so configuring glibc
4967 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004968 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4969 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004970 # On the NeXT, cc -E runs the code through the compiler's parser,
4971 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004973/* end confdefs.h. */
4974#ifdef __STDC__
4975# include <limits.h>
4976#else
4977# include <assert.h>
4978#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004979 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004981if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004982
Matthias Kloseb9621712010-04-24 17:59:49 +00004983else
Martin v. Löwis11437992002-04-12 09:54:03 +00004984 # Broken: fails on valid input.
4985continue
4986fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004987rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004989 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004990 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004992/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004993#include <ac_nonexistent.h>
4994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004995if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004996 # Broken: success on invalid input.
4997continue
4998else
Martin v. Löwis11437992002-04-12 09:54:03 +00004999 # Passes both tests.
5000ac_preproc_ok=:
5001break
5002fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005003rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005004
5005done
5006# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005007rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005008if $ac_preproc_ok; then :
5009
Martin v. Löwis11437992002-04-12 09:54:03 +00005010else
Matthias Kloseb9621712010-04-24 17:59:49 +00005011 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5012$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005013as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02005014See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005015fi
5016
5017ac_ext=c
5018ac_cpp='$CPP $CPPFLAGS'
5019ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5020ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5021ac_compiler_gnu=$ac_cv_c_compiler_gnu
5022
5023
Matthias Kloseb9621712010-04-24 17:59:49 +00005024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5025$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005026if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005027 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00005028else
Matthias Kloseb9621712010-04-24 17:59:49 +00005029 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005030 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 # Loop through the user's path and test for each of PROGNAME-LIST
5032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005033for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5034do
5035 IFS=$as_save_IFS
5036 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005037 for ac_prog in grep ggrep; do
5038 for ac_exec_ext in '' $ac_executable_extensions; do
5039 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005040 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005041# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005042 # Check for GNU $ac_path_GREP
5043case `"$ac_path_GREP" --version 2>&1` in
5044*GNU*)
5045 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5046*)
5047 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005048 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005049 while :
5050 do
5051 cat "conftest.in" "conftest.in" >"conftest.tmp"
5052 mv "conftest.tmp" "conftest.in"
5053 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005054 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005055 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5056 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005057 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005058 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5059 # Best one so far, save it but keep looking for a better one
5060 ac_cv_path_GREP="$ac_path_GREP"
5061 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005062 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005063 # 10*(2^10) chars as input seems more than enough
5064 test $ac_count -gt 10 && break
5065 done
5066 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5067esac
5068
Matthias Kloseb9621712010-04-24 17:59:49 +00005069 $ac_path_GREP_found && break 3
5070 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005071 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005073IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005074 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005075 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 +00005076 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005077else
5078 ac_cv_path_GREP=$GREP
5079fi
5080
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005081fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5083$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005084 GREP="$ac_cv_path_GREP"
5085
5086
Matthias Kloseb9621712010-04-24 17:59:49 +00005087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5088$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005089if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005091else
5092 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5093 then ac_cv_path_EGREP="$GREP -E"
5094 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005095 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005096 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005097 # Loop through the user's path and test for each of PROGNAME-LIST
5098 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005099for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5100do
5101 IFS=$as_save_IFS
5102 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 for ac_prog in egrep; do
5104 for ac_exec_ext in '' $ac_executable_extensions; do
5105 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005106 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005107# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005108 # Check for GNU $ac_path_EGREP
5109case `"$ac_path_EGREP" --version 2>&1` in
5110*GNU*)
5111 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5112*)
5113 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005114 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005115 while :
5116 do
5117 cat "conftest.in" "conftest.in" >"conftest.tmp"
5118 mv "conftest.tmp" "conftest.in"
5119 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005120 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005121 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5122 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005123 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005124 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5125 # Best one so far, save it but keep looking for a better one
5126 ac_cv_path_EGREP="$ac_path_EGREP"
5127 ac_path_EGREP_max=$ac_count
5128 fi
5129 # 10*(2^10) chars as input seems more than enough
5130 test $ac_count -gt 10 && break
5131 done
5132 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5133esac
5134
Matthias Kloseb9621712010-04-24 17:59:49 +00005135 $ac_path_EGREP_found && break 3
5136 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005137 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005138 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005139IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005140 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005141 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 +00005142 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005143else
5144 ac_cv_path_EGREP=$EGREP
5145fi
5146
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005147 fi
5148fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5150$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005151 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005152
5153
Matthias Kloseb9621712010-04-24 17:59:49 +00005154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5155$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005156if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005157 $as_echo_n "(cached) " >&6
5158else
5159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005160/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005161#include <stdlib.h>
5162#include <stdarg.h>
5163#include <string.h>
5164#include <float.h>
5165
5166int
5167main ()
5168{
5169
5170 ;
5171 return 0;
5172}
5173_ACEOF
5174if ac_fn_c_try_compile "$LINENO"; then :
5175 ac_cv_header_stdc=yes
5176else
5177 ac_cv_header_stdc=no
5178fi
5179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5180
5181if test $ac_cv_header_stdc = yes; then
5182 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5184/* end confdefs.h. */
5185#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005186
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005187_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005188if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005189 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005190
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005191else
Matthias Kloseb9621712010-04-24 17:59:49 +00005192 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005193fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005194rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005195
Matthias Kloseb9621712010-04-24 17:59:49 +00005196fi
5197
5198if test $ac_cv_header_stdc = yes; then
5199 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5201/* end confdefs.h. */
5202#include <stdlib.h>
5203
5204_ACEOF
5205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5206 $EGREP "free" >/dev/null 2>&1; then :
5207
5208else
5209 ac_cv_header_stdc=no
5210fi
5211rm -f conftest*
5212
5213fi
5214
5215if test $ac_cv_header_stdc = yes; then
5216 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5217 if test "$cross_compiling" = yes; then :
5218 :
5219else
5220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5221/* end confdefs.h. */
5222#include <ctype.h>
5223#include <stdlib.h>
5224#if ((' ' & 0x0FF) == 0x020)
5225# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5226# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5227#else
5228# define ISLOWER(c) \
5229 (('a' <= (c) && (c) <= 'i') \
5230 || ('j' <= (c) && (c) <= 'r') \
5231 || ('s' <= (c) && (c) <= 'z'))
5232# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5233#endif
5234
5235#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5236int
5237main ()
5238{
5239 int i;
5240 for (i = 0; i < 256; i++)
5241 if (XOR (islower (i), ISLOWER (i))
5242 || toupper (i) != TOUPPER (i))
5243 return 2;
5244 return 0;
5245}
5246_ACEOF
5247if ac_fn_c_try_run "$LINENO"; then :
5248
5249else
5250 ac_cv_header_stdc=no
5251fi
5252rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5253 conftest.$ac_objext conftest.beam conftest.$ac_ext
5254fi
5255
5256fi
5257fi
5258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5259$as_echo "$ac_cv_header_stdc" >&6; }
5260if test $ac_cv_header_stdc = yes; then
5261
5262$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5263
5264fi
5265
5266# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5267for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5268 inttypes.h stdint.h unistd.h
5269do :
5270 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5271ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5272"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005273if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005274 cat >>confdefs.h <<_ACEOF
5275#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5276_ACEOF
5277
5278fi
5279
5280done
5281
5282
5283
5284 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 +02005285if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005286 MINIX=yes
5287else
5288 MINIX=
5289fi
5290
5291
5292 if test "$MINIX" = yes; then
5293
5294$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5295
5296
5297$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5298
5299
5300$as_echo "#define _MINIX 1" >>confdefs.h
5301
5302 fi
5303
5304
5305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5306$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005307if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005308 $as_echo_n "(cached) " >&6
5309else
5310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5311/* end confdefs.h. */
5312
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005313# define __EXTENSIONS__ 1
5314 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005315int
5316main ()
5317{
5318
5319 ;
5320 return 0;
5321}
5322_ACEOF
5323if ac_fn_c_try_compile "$LINENO"; then :
5324 ac_cv_safe_to_define___extensions__=yes
5325else
5326 ac_cv_safe_to_define___extensions__=no
5327fi
5328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5329fi
5330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5331$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5332 test $ac_cv_safe_to_define___extensions__ = yes &&
5333 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5334
5335 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5336
5337 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5338
5339 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5340
5341 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5342
5343
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005344
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005345# Check for unsupported systems
5346case $ac_sys_system/$ac_sys_release in
5347atheos*|Linux*/1*)
5348 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5349 echo See README for details.
5350 exit 1;;
5351esac
5352
5353
Matthias Kloseb9621712010-04-24 17:59:49 +00005354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5355$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005356
5357# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005358if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005359 withval=$with_suffix;
5360 case $withval in
5361 no) EXEEXT=;;
5362 yes) EXEEXT=.exe;;
5363 *) EXEEXT=$withval;;
5364 esac
5365fi
5366
Matthias Kloseb9621712010-04-24 17:59:49 +00005367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5368$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005369
5370# Test whether we're running on a non-case-sensitive system, in which
5371# case we give a warning if no ext is given
5372
Matthias Kloseb9621712010-04-24 17:59:49 +00005373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5374$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005375if test ! -d CaseSensitiveTestDir; then
5376mkdir CaseSensitiveTestDir
5377fi
5378
5379if test -d casesensitivetestdir
5380then
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5382$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383 BUILDEXEEXT=.exe
5384else
Matthias Kloseb9621712010-04-24 17:59:49 +00005385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5386$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005387 BUILDEXEEXT=$EXEEXT
5388fi
5389rmdir CaseSensitiveTestDir
5390
5391case $MACHDEP in
5392bsdos*)
5393 case $CC in
5394 gcc) CC="$CC -D_HAVE_BSDI";;
5395 esac;;
5396esac
5397
5398case $ac_sys_system in
5399hp*|HP*)
5400 case $CC in
5401 cc|*/cc) CC="$CC -Ae";;
5402 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005403esac
5404
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005405MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5406
5407
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408
5409
Matthias Kloseb9621712010-04-24 17:59:49 +00005410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5411$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005412if test -z "$LIBRARY"
5413then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005414 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5417$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418
5419# LDLIBRARY is the name of the library to link against (as opposed to the
5420# name of the library into which to insert object files). BLDLIBRARY is also
5421# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5422# is blank as the main program is not linked directly against LDLIBRARY.
5423# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5424# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5425# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5426# DLLLIBRARY is the shared (i.e., DLL) library.
5427#
5428# RUNSHARED is used to run shared python without installed libraries
5429#
5430# INSTSONAME is the name of the shared library that will be use to install
5431# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005432#
5433# LDVERSION is the shared library version number, normally the Python version
5434# with the ABI build flags appended.
5435
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436
5437
5438
5439
5440
5441
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005442
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005443LDLIBRARY="$LIBRARY"
5444BLDLIBRARY='$(LDLIBRARY)'
5445INSTSONAME='$(LDLIBRARY)'
5446DLLLIBRARY=''
5447LDLIBRARYDIR=''
5448RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005449LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005450
5451# LINKCC is the command that links the python executable -- default is $(CC).
5452# If CXX is set, and if it is needed to link a main function that was
5453# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5454# python might then depend on the C++ runtime
5455# This is altered for AIX in order to build the export list before
5456# linking.
5457
Matthias Kloseb9621712010-04-24 17:59:49 +00005458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5459$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005460if test -z "$LINKCC"
5461then
5462 LINKCC='$(PURIFY) $(MAINCC)'
5463 case $ac_sys_system in
5464 AIX*)
5465 exp_extra="\"\""
5466 if test $ac_sys_release -ge 5 -o \
5467 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5468 exp_extra="."
5469 fi
5470 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005471 QNX*)
5472 # qcc must be used because the other compilers do not
5473 # support -N.
5474 LINKCC=qcc;;
5475 esac
5476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5478$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005479
5480# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5481# make sure we default having it set to "no": this is used by
5482# distutils.unixccompiler to know if it should add --enable-new-dtags
5483# to linker command lines, and failing to detect GNU ld simply results
5484# in the same bahaviour as before.
5485
Matthias Kloseb9621712010-04-24 17:59:49 +00005486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5487$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005488ac_prog=ld
5489if test "$GCC" = yes; then
5490 ac_prog=`$CC -print-prog-name=ld`
5491fi
5492case `"$ac_prog" -V 2>&1 < /dev/null` in
5493 *GNU*)
5494 GNULD=yes;;
5495 *)
5496 GNULD=no;;
5497esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5499$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005500
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5502$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005503if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005504 $as_echo_n "(cached) " >&6
5505else
5506 ac_cv_c_inline=no
5507for ac_kw in inline __inline__ __inline; do
5508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5509/* end confdefs.h. */
5510#ifndef __cplusplus
5511typedef int foo_t;
5512static $ac_kw foo_t static_foo () {return 0; }
5513$ac_kw foo_t foo () {return 0; }
5514#endif
5515
5516_ACEOF
5517if ac_fn_c_try_compile "$LINENO"; then :
5518 ac_cv_c_inline=$ac_kw
5519fi
5520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5521 test "$ac_cv_c_inline" != no && break
5522done
5523
5524fi
5525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5526$as_echo "$ac_cv_c_inline" >&6; }
5527
5528case $ac_cv_c_inline in
5529 inline | yes) ;;
5530 *)
5531 case $ac_cv_c_inline in
5532 no) ac_val=;;
5533 *) ac_val=$ac_cv_c_inline;;
5534 esac
5535 cat >>confdefs.h <<_ACEOF
5536#ifndef __cplusplus
5537#define inline $ac_val
5538#endif
5539_ACEOF
5540 ;;
5541esac
5542
5543if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005544
5545$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005546
5547
5548fi
5549
5550
Matthias Kloseb9621712010-04-24 17:59:49 +00005551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5552$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005553# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005554if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005555 enableval=$enable_shared;
5556fi
5557
5558
5559if test -z "$enable_shared"
5560then
5561 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005562 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005563 enable_shared="yes";;
5564 *)
5565 enable_shared="no";;
5566 esac
5567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5569$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005570
Matthias Kloseb9621712010-04-24 17:59:49 +00005571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5572$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005573# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005574if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005575 enableval=$enable_profiling;
5576fi
5577
5578if test "x$enable_profiling" = xyes; then
5579 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005580 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005582/* end confdefs.h. */
5583int main() { return 0; }
5584_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005585if ac_fn_c_try_link "$LINENO"; then :
5586
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005587else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005588 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005589fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005590rm -f core conftest.err conftest.$ac_objext \
5591 conftest$ac_exeext conftest.$ac_ext
5592 CC="$ac_save_cc"
5593else
5594 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005595fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5597$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598
doko@ubuntu.comba015832012-06-30 16:52:05 +02005599if test "x$enable_profiling" = xyes; then
5600 BASECFLAGS="-pg $BASECFLAGS"
5601 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602fi
5603
Matthias Kloseb9621712010-04-24 17:59:49 +00005604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5605$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005606
5607# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5608# library that we build, but we do not want to link against it (we
5609# will find it with a -framework option). For this reason there is an
5610# extra variable BLDLIBRARY against which Python and the extension
5611# modules are linked, BLDLIBRARY. This is normally the same as
5612# LDLIBRARY, but empty for MacOSX framework builds.
5613if test "$enable_framework"
5614then
5615 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005616 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005617 BLDLIBRARY=''
5618else
5619 BLDLIBRARY='$(LDLIBRARY)'
5620fi
5621
5622# Other platforms follow
5623if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005624 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625
Matthias Kloseb9621712010-04-24 17:59:49 +00005626$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627
5628 case $ac_sys_system in
5629 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005630 LDLIBRARY='libpython$(LDVERSION).dll.a'
5631 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005632 ;;
5633 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005634 LDLIBRARY='libpython$(LDVERSION).so'
5635 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005636 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005637 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005638 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005639 then
5640 PY3LIBRARY=libpython3.so
5641 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005642 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005643 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005644 LDLIBRARY='libpython$(LDVERSION).so'
5645 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005646 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647 case $ac_sys_system in
5648 FreeBSD*)
5649 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5650 ;;
5651 esac
5652 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005653 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005654 then
5655 PY3LIBRARY=libpython3.so
5656 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657 ;;
5658 hp*|HP*)
5659 case `uname -m` in
5660 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005661 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662 ;;
5663 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005664 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665 ;;
5666 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005667 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005668 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005671 LDLIBRARY='libpython$(LDVERSION).dylib'
5672 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005673 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005675 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005676 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005677 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005678 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679
5680 esac
5681else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005682 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683 case $ac_sys_system in
5684 CYGWIN*)
5685 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005686 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687 ;;
5688 esac
5689fi
5690
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005691if test "$cross_compiling" = yes; then
5692 RUNSHARED=
5693fi
5694
Matthias Kloseb9621712010-04-24 17:59:49 +00005695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5696$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697
5698if test -n "$ac_tool_prefix"; then
5699 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5700set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5702$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005703if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005704 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705else
5706 if test -n "$RANLIB"; then
5707 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5708else
5709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5710for as_dir in $PATH
5711do
5712 IFS=$as_save_IFS
5713 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005714 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005715 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005717 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718 break 2
5719 fi
5720done
Matthias Kloseb9621712010-04-24 17:59:49 +00005721 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722IFS=$as_save_IFS
5723
5724fi
5725fi
5726RANLIB=$ac_cv_prog_RANLIB
5727if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5729$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730else
Matthias Kloseb9621712010-04-24 17:59:49 +00005731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5732$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733fi
5734
5735
5736fi
5737if test -z "$ac_cv_prog_RANLIB"; then
5738 ac_ct_RANLIB=$RANLIB
5739 # Extract the first word of "ranlib", so it can be a program name with args.
5740set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5742$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005743if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005744 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745else
5746 if test -n "$ac_ct_RANLIB"; then
5747 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5748else
5749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5750for as_dir in $PATH
5751do
5752 IFS=$as_save_IFS
5753 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005754 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005755 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005757 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758 break 2
5759 fi
5760done
Matthias Kloseb9621712010-04-24 17:59:49 +00005761 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762IFS=$as_save_IFS
5763
5764fi
5765fi
5766ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5767if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5769$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770else
Matthias Kloseb9621712010-04-24 17:59:49 +00005771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5772$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773fi
5774
5775 if test "x$ac_ct_RANLIB" = x; then
5776 RANLIB=":"
5777 else
5778 case $cross_compiling:$ac_tool_warned in
5779yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005780{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5781$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782ac_tool_warned=yes ;;
5783esac
5784 RANLIB=$ac_ct_RANLIB
5785 fi
5786else
5787 RANLIB="$ac_cv_prog_RANLIB"
5788fi
5789
5790
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005791if test -n "$ac_tool_prefix"; then
5792 for ac_prog in ar aal
5793 do
5794 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5795set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5797$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005798if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005799 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800else
5801 if test -n "$AR"; then
5802 ac_cv_prog_AR="$AR" # Let the user override the test.
5803else
5804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5805for as_dir in $PATH
5806do
5807 IFS=$as_save_IFS
5808 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005809 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005810 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005811 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005812 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813 break 2
5814 fi
5815done
Matthias Kloseb9621712010-04-24 17:59:49 +00005816 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817IFS=$as_save_IFS
5818
5819fi
5820fi
5821AR=$ac_cv_prog_AR
5822if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5824$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825else
Matthias Kloseb9621712010-04-24 17:59:49 +00005826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5827$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828fi
5829
5830
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005831 test -n "$AR" && break
5832 done
5833fi
5834if test -z "$AR"; then
5835 ac_ct_AR=$AR
5836 for ac_prog in ar aal
5837do
5838 # Extract the first word of "$ac_prog", so it can be a program name with args.
5839set dummy $ac_prog; ac_word=$2
5840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5841$as_echo_n "checking for $ac_word... " >&6; }
5842if ${ac_cv_prog_ac_ct_AR+:} false; then :
5843 $as_echo_n "(cached) " >&6
5844else
5845 if test -n "$ac_ct_AR"; then
5846 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5847else
5848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5849for as_dir in $PATH
5850do
5851 IFS=$as_save_IFS
5852 test -z "$as_dir" && as_dir=.
5853 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005854 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005855 ac_cv_prog_ac_ct_AR="$ac_prog"
5856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5857 break 2
5858 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005860 done
5861IFS=$as_save_IFS
5862
5863fi
5864fi
5865ac_ct_AR=$ac_cv_prog_ac_ct_AR
5866if test -n "$ac_ct_AR"; then
5867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5868$as_echo "$ac_ct_AR" >&6; }
5869else
5870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5871$as_echo "no" >&6; }
5872fi
5873
5874
5875 test -n "$ac_ct_AR" && break
5876done
5877
5878 if test "x$ac_ct_AR" = x; then
5879 AR="ar"
5880 else
5881 case $cross_compiling:$ac_tool_warned in
5882yes:)
5883{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5884$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5885ac_tool_warned=yes ;;
5886esac
5887 AR=$ac_ct_AR
5888 fi
5889fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890
5891
5892# tweak ARFLAGS only if the user didn't set it on the command line
5893
5894if test -z "$ARFLAGS"
5895then
5896 ARFLAGS="rc"
5897fi
5898
doko@ubuntu.com58844492012-06-30 18:25:32 +02005899if test -n "$ac_tool_prefix"; then
5900 for ac_prog in readelf
5901 do
5902 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5903set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5905$as_echo_n "checking for $ac_word... " >&6; }
5906if ${ac_cv_prog_READELF+:} false; then :
5907 $as_echo_n "(cached) " >&6
5908else
5909 if test -n "$READELF"; then
5910 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5911else
5912as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5913for as_dir in $PATH
5914do
5915 IFS=$as_save_IFS
5916 test -z "$as_dir" && as_dir=.
5917 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005918 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005919 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5920 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5921 break 2
5922 fi
5923done
5924 done
5925IFS=$as_save_IFS
5926
5927fi
5928fi
5929READELF=$ac_cv_prog_READELF
5930if test -n "$READELF"; then
5931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5932$as_echo "$READELF" >&6; }
5933else
5934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5935$as_echo "no" >&6; }
5936fi
5937
5938
5939 test -n "$READELF" && break
5940 done
5941fi
5942if test -z "$READELF"; then
5943 ac_ct_READELF=$READELF
5944 for ac_prog in readelf
5945do
5946 # Extract the first word of "$ac_prog", so it can be a program name with args.
5947set dummy $ac_prog; ac_word=$2
5948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5949$as_echo_n "checking for $ac_word... " >&6; }
5950if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5951 $as_echo_n "(cached) " >&6
5952else
5953 if test -n "$ac_ct_READELF"; then
5954 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5955else
5956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5957for as_dir in $PATH
5958do
5959 IFS=$as_save_IFS
5960 test -z "$as_dir" && as_dir=.
5961 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005962 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005963 ac_cv_prog_ac_ct_READELF="$ac_prog"
5964 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5965 break 2
5966 fi
5967done
5968 done
5969IFS=$as_save_IFS
5970
5971fi
5972fi
5973ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5974if test -n "$ac_ct_READELF"; then
5975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5976$as_echo "$ac_ct_READELF" >&6; }
5977else
5978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5979$as_echo "no" >&6; }
5980fi
5981
5982
5983 test -n "$ac_ct_READELF" && break
5984done
5985
5986 if test "x$ac_ct_READELF" = x; then
5987 READELF=":"
5988 else
5989 case $cross_compiling:$ac_tool_warned in
5990yes:)
5991{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5992$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5993ac_tool_warned=yes ;;
5994esac
5995 READELF=$ac_ct_READELF
5996 fi
5997fi
5998
5999if test "$cross_compiling" = yes; then
6000 case "$READELF" in
6001 readelf|:)
6002 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6003 ;;
6004 esac
6005fi
6006
6007
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008
Matthias Klosec4c48422012-10-21 23:05:35 +02006009for ac_prog in python$PACKAGE_VERSION python3 python
6010do
6011 # Extract the first word of "$ac_prog", so it can be a program name with args.
6012set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6014$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006015if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006016 $as_echo_n "(cached) " >&6
6017else
Matthias Klosec4c48422012-10-21 23:05:35 +02006018 if test -n "$PYTHON"; then
6019 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006020else
6021as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6022for as_dir in $PATH
6023do
6024 IFS=$as_save_IFS
6025 test -z "$as_dir" && as_dir=.
6026 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006027 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006028 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006029 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6030 break 2
6031 fi
6032done
6033 done
6034IFS=$as_save_IFS
6035
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006036fi
6037fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006038PYTHON=$ac_cv_prog_PYTHON
6039if test -n "$PYTHON"; then
6040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6041$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006042else
6043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6044$as_echo "no" >&6; }
6045fi
6046
6047
Matthias Klosec4c48422012-10-21 23:05:35 +02006048 test -n "$PYTHON" && break
6049done
6050test -n "$PYTHON" || PYTHON="not-found"
6051
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006052if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006053 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6054else
6055 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006056fi
6057
6058
Kushal Das02d23a22014-04-15 23:50:06 +05306059for ac_prog in python$PACKAGE_VERSION python3 python
6060do
6061 # Extract the first word of "$ac_prog", so it can be a program name with args.
6062set dummy $ac_prog; ac_word=$2
6063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6064$as_echo_n "checking for $ac_word... " >&6; }
6065if ${ac_cv_prog_PYTHON+:} false; then :
6066 $as_echo_n "(cached) " >&6
6067else
6068 if test -n "$PYTHON"; then
6069 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6070else
6071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6072for as_dir in $PATH
6073do
6074 IFS=$as_save_IFS
6075 test -z "$as_dir" && as_dir=.
6076 for ac_exec_ext in '' $ac_executable_extensions; do
6077 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6078 ac_cv_prog_PYTHON="$ac_prog"
6079 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6080 break 2
6081 fi
6082done
6083 done
6084IFS=$as_save_IFS
6085
6086fi
6087fi
6088PYTHON=$ac_cv_prog_PYTHON
6089if test -n "$PYTHON"; then
6090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6091$as_echo "$PYTHON" >&6; }
6092else
6093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6094$as_echo "no" >&6; }
6095fi
6096
6097
6098 test -n "$PYTHON" && break
6099done
6100test -n "$PYTHON" || PYTHON="not-found"
6101
6102if test "$PYTHON" = not-found; then
6103 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6104else
6105 OPCODEHGEN="$PYTHON"
6106fi
6107
6108
6109
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006110case $MACHDEP in
6111bsdos*|hp*|HP*)
6112 # install -d does not work on BSDI or HP-UX
6113 if test -z "$INSTALL"
6114 then
6115 INSTALL="${srcdir}/install-sh -c"
6116 fi
6117esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006118# Find a good install program. We prefer a C program (faster),
6119# so one script is as good as another. But avoid the broken or
6120# incompatible versions:
6121# SysV /etc/install, /usr/sbin/install
6122# SunOS /usr/etc/install
6123# IRIX /sbin/install
6124# AIX /bin/install
6125# AmigaOS /C/install, which installs bootblocks on floppy discs
6126# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6127# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6128# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6129# OS/2's system install, which has a completely different semantic
6130# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006131# Reject install programs that cannot install multiple files.
6132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6133$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006134if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006135if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006136 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006137else
6138 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6139for as_dir in $PATH
6140do
6141 IFS=$as_save_IFS
6142 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006143 # Account for people who put trailing slashes in PATH elements.
6144case $as_dir/ in #((
6145 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006146 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006147 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006148 /usr/ucb/* ) ;;
6149 *)
6150 # OSF1 and SCO ODT 3.0 have their own names for install.
6151 # Don't use installbsd from OSF since it installs stuff as root
6152 # by default.
6153 for ac_prog in ginstall scoinst install; do
6154 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006155 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156 if test $ac_prog = install &&
6157 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6158 # AIX install. It has an incompatible calling convention.
6159 :
6160 elif test $ac_prog = install &&
6161 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6162 # program-specific install script used by HP pwplus--don't use.
6163 :
6164 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006165 rm -rf conftest.one conftest.two conftest.dir
6166 echo one > conftest.one
6167 echo two > conftest.two
6168 mkdir conftest.dir
6169 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6170 test -s conftest.one && test -s conftest.two &&
6171 test -s conftest.dir/conftest.one &&
6172 test -s conftest.dir/conftest.two
6173 then
6174 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6175 break 3
6176 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006177 fi
6178 fi
6179 done
6180 done
6181 ;;
6182esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006183
6184 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006185IFS=$as_save_IFS
6186
Matthias Kloseb9621712010-04-24 17:59:49 +00006187rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006188
6189fi
6190 if test "${ac_cv_path_install+set}" = set; then
6191 INSTALL=$ac_cv_path_install
6192 else
6193 # As a last resort, use the slow shell script. Don't cache a
6194 # value for INSTALL within a source directory, because that will
6195 # break other packages using the cache if that directory is
6196 # removed, or if the value is a relative name.
6197 INSTALL=$ac_install_sh
6198 fi
6199fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6201$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006202
6203# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6204# It thinks the first close brace ends the variable substitution.
6205test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6206
6207test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6208
6209test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6210
Matthias Klose93a0ef12012-03-15 18:08:34 +01006211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6212$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6213if test -z "$MKDIR_P"; then
6214 if ${ac_cv_path_mkdir+:} false; then :
6215 $as_echo_n "(cached) " >&6
6216else
6217 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6218for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6219do
6220 IFS=$as_save_IFS
6221 test -z "$as_dir" && as_dir=.
6222 for ac_prog in mkdir gmkdir; do
6223 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006224 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006225 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6226 'mkdir (GNU coreutils) '* | \
6227 'mkdir (coreutils) '* | \
6228 'mkdir (fileutils) '4.1*)
6229 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6230 break 3;;
6231 esac
6232 done
6233 done
6234 done
6235IFS=$as_save_IFS
6236
6237fi
6238
6239 test -d ./--version && rmdir ./--version
6240 if test "${ac_cv_path_mkdir+set}" = set; then
6241 MKDIR_P="$ac_cv_path_mkdir -p"
6242 else
6243 # As a last resort, use the slow shell script. Don't cache a
6244 # value for MKDIR_P within a source directory, because that will
6245 # break other packages using the cache if that directory is
6246 # removed, or if the value is a relative name.
6247 MKDIR_P="$ac_install_sh -d"
6248 fi
6249fi
6250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6251$as_echo "$MKDIR_P" >&6; }
6252
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006253
6254# Not every filesystem supports hard links
6255
6256if test -z "$LN" ; then
6257 case $ac_sys_system in
6258 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006259 *) LN=ln;;
6260 esac
6261fi
6262
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006263# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006264
6265ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006266
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006267# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6269$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006270
6271# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006272if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006273 withval=$with_pydebug;
6274if test "$withval" != no
6275then
6276
Matthias Kloseb9621712010-04-24 17:59:49 +00006277$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006278
Matthias Kloseb9621712010-04-24 17:59:49 +00006279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6280$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006281 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006282 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006283else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6284$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006285fi
6286else
Matthias Kloseb9621712010-04-24 17:59:49 +00006287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6288$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006289fi
6290
6291
6292# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6293# merged with this chunk of code?
6294
6295# Optimizer/debugger flags
6296# ------------------------
6297# (The following bit of code is complicated enough - please keep things
6298# indented properly. Just pretend you're editing Python code. ;-)
6299
6300# There are two parallel sets of case statements below, one that checks to
6301# see if OPT was set and one that does BASECFLAGS setting based upon
6302# compiler and platform. BASECFLAGS tweaks need to be made even if the
6303# user set OPT.
6304
6305# tweak OPT based on compiler and platform, only if the user didn't set
6306# it on the command line
6307
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006308if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006309then
6310 case $GCC in
6311 yes)
6312 if test "$CC" != 'g++' ; then
6313 STRICT_PROTO="-Wstrict-prototypes"
6314 fi
6315 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6316 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6317 WRAP="-fwrapv"
6318 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006319
6320 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006321 case $CC in
6322 *clang*) WRAP="-fwrapv"
6323 ;;
6324 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006325
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006326 case $ac_cv_prog_cc_g in
6327 yes)
6328 if test "$Py_DEBUG" = 'true' ; then
6329 # Optimization messes up debuggers, so turn it off for
6330 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006331 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332 else
6333 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6334 fi
6335 ;;
6336 *)
6337 OPT="-O3 -Wall $STRICT_PROTO"
6338 ;;
6339 esac
6340 case $ac_sys_system in
6341 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6342 ;;
6343 esac
6344 ;;
6345
6346 *)
6347 OPT="-O"
6348 ;;
6349 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006350fi
6351
6352
6353
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006354
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006355# The -arch flags for universal builds on OSX
6356UNIVERSAL_ARCH_FLAGS=
6357
6358
6359# tweak BASECFLAGS based on compiler and platform
6360case $GCC in
6361yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006362 # Python doesn't violate C99 aliasing rules, but older versions of
6363 # GCC produce warnings for legal Python code. Enable
6364 # -fno-strict-aliasing on versions of GCC that support but produce
6365 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6367$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006368 ac_save_cc="$CC"
6369 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006370 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006371 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006372 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006373else
Matthias Kloseb9621712010-04-24 17:59:49 +00006374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006375/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006376
Matthias Kloseb159a552010-04-25 21:00:44 +00006377
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006378int
6379main ()
6380{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006381
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006382 ;
6383 return 0;
6384}
Matthias Kloseb159a552010-04-25 21:00:44 +00006385
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006387if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006388
6389 CC="$ac_save_cc -fstrict-aliasing"
6390 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006392/* end confdefs.h. */
6393
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006394 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006395int
6396main ()
6397{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006398double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006399 ;
6400 return 0;
6401}
Matthias Kloseb159a552010-04-25 21:00:44 +00006402
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006404if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006405
6406 ac_cv_no_strict_aliasing=no
6407
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408else
Matthias Kloseb159a552010-04-25 21:00:44 +00006409
6410 ac_cv_no_strict_aliasing=yes
6411
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006412fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006414
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006415else
Matthias Kloseb159a552010-04-25 21:00:44 +00006416
6417 ac_cv_no_strict_aliasing=no
6418
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006419fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006421fi
6422
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006423 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006424 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6426$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006427 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006428 then
6429 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6430 fi
6431
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6433$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6434 ac_save_cc="$CC"
6435 CC="$CC -Wunused-result -Werror"
6436 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006437 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006438 $as_echo_n "(cached) " >&6
6439else
6440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6441/* end confdefs.h. */
6442
6443
6444int
6445main ()
6446{
6447
6448 ;
6449 return 0;
6450}
6451
6452_ACEOF
6453if ac_fn_c_try_compile "$LINENO"; then :
6454
6455 ac_cv_disable_unused_result_warning=yes
6456
6457else
6458
6459 ac_cv_disable_unused_result_warning=no
6460
6461fi
6462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6463fi
6464
6465 CFLAGS="$save_CFLAGS"
6466 CC="$ac_save_cc"
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6468$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6469
6470 if test $ac_cv_disable_unused_result_warning = yes
6471 then
6472 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6473 fi
6474
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6476$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6477 ac_save_cc="$CC"
6478 CC="$CC -Werror=declaration-after-statement"
6479 save_CFLAGS="$CFLAGS"
6480 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6481 $as_echo_n "(cached) " >&6
6482else
6483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6484/* end confdefs.h. */
6485
6486
6487int
6488main ()
6489{
6490
6491 ;
6492 return 0;
6493}
6494
6495_ACEOF
6496if ac_fn_c_try_compile "$LINENO"; then :
6497
6498 ac_cv_declaration_after_statement_warning=yes
6499
6500else
6501
6502 ac_cv_declaration_after_statement_warning=no
6503
6504fi
6505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6506fi
6507
6508 CFLAGS="$save_CFLAGS"
6509 CC="$ac_save_cc"
6510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6511$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6512
6513 if test $ac_cv_declaration_after_statement_warning = yes
6514 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006515 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006516 fi
6517
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6519$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6520 ac_save_cc="$CC"
6521 CC="$CC -Wsign-compare"
6522 save_CFLAGS="$CFLAGS"
6523 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6524 $as_echo_n "(cached) " >&6
6525else
6526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6527/* end confdefs.h. */
6528
6529
6530int
6531main ()
6532{
6533
6534 ;
6535 return 0;
6536}
6537
6538_ACEOF
6539if ac_fn_c_try_compile "$LINENO"; then :
6540
6541 ac_cv_enable_sign_compare_warning=yes
6542
6543else
6544
6545 ac_cv_enable_sign_compare_warning=no
6546
6547fi
6548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6549fi
6550
6551 CFLAGS="$save_CFLAGS"
6552 CC="$ac_save_cc"
6553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6554$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6555
6556 if test $ac_cv_enable_sign_compare_warning = yes
6557 then
6558 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6559 fi
6560
6561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6562$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6563 ac_save_cc="$CC"
6564 CC="$CC -Wunreachable-code"
6565 save_CFLAGS="$CFLAGS"
6566 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6567 $as_echo_n "(cached) " >&6
6568else
6569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6570/* end confdefs.h. */
6571
6572
6573int
6574main ()
6575{
6576
6577 ;
6578 return 0;
6579}
6580
6581_ACEOF
6582if ac_fn_c_try_compile "$LINENO"; then :
6583
6584 ac_cv_enable_unreachable_code_warning=yes
6585
6586else
6587
6588 ac_cv_enable_unreachable_code_warning=no
6589
6590fi
6591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6592fi
6593
6594 CFLAGS="$save_CFLAGS"
6595 CC="$ac_save_cc"
6596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6597$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
6598
6599 # Don't enable unreachable code warning in debug mode, since it usually
6600 # results in non-standard code paths.
6601 if test $ac_cv_enable_unreachable_code_warning = yes && test "$Py_DEBUG" != "true"
6602 then
6603 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
6604 fi
6605
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006606 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6607 # support. Without this, treatment of subnormals doesn't follow
6608 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006609 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006610 alpha*)
6611 BASECFLAGS="$BASECFLAGS -mieee"
6612 ;;
6613 esac
6614
6615 case $ac_sys_system in
6616 SCO_SV*)
6617 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6618 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006619
6620 # is there any other compiler on Darwin besides gcc?
6621 Darwin*)
6622 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6623 # used to be here, but non-Apple gcc doesn't accept them.
6624 if test "${CC}" = gcc
6625 then
6626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006627$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006628 case "${UNIVERSALSDK}" in
6629 */MacOSX10.4u.sdk)
6630 # Build using 10.4 SDK, force usage of gcc when the
6631 # compiler is gcc, otherwise the user will get very
6632 # confusing error messages when building on OSX 10.6
6633 CC=gcc-4.0
6634 CPP=cpp-4.0
6635 ;;
6636 esac
6637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006638$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006639 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006640
Ned Deily87adb6e2013-10-18 21:09:56 -07006641 if test "${enable_universalsdk}"
6642 then
6643 case "$UNIVERSAL_ARCHS" in
6644 32-bit)
6645 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6646 LIPO_32BIT_FLAGS=""
6647 ARCH_RUN_32BIT=""
6648 ;;
6649 64-bit)
6650 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6651 LIPO_32BIT_FLAGS=""
6652 ARCH_RUN_32BIT="true"
6653 ;;
6654 all)
6655 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6656 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6657 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6658 ;;
6659 intel)
6660 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6661 LIPO_32BIT_FLAGS="-extract i386"
6662 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6663 ;;
6664 intel-32)
6665 UNIVERSAL_ARCH_FLAGS="-arch i386"
6666 LIPO_32BIT_FLAGS=""
6667 ARCH_RUN_32BIT=""
6668 ;;
6669 3-way)
6670 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6671 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6672 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6673 ;;
6674 *)
6675 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6676 ;;
6677 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006678
Ned Deily87adb6e2013-10-18 21:09:56 -07006679 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6680 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6681 if test "${UNIVERSALSDK}" != "/"
6682 then
6683 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6684 fi
6685 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006686
Ned Deily87adb6e2013-10-18 21:09:56 -07006687 # Calculate an appropriate deployment target for this build:
6688 # The deployment target value is used explicitly to enable certain
6689 # features are enabled (such as builtin libedit support for readline)
6690 # through the use of Apple's Availabiliy Macros and is used as a
6691 # component of the string returned by distutils.get_platform().
6692 #
6693 # Use the value from:
6694 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6695 # 2. the operating system version of the build machine if >= 10.6
6696 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6697 # below to pick either 10.3, 10.4, or 10.5 as the target.
6698 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006699
Ned Deily87adb6e2013-10-18 21:09:56 -07006700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6701$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07006702 cur_target_major=`sw_vers -productVersion | \
6703 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6704 cur_target_minor=`sw_vers -productVersion | \
6705 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6706 cur_target="${cur_target_major}.${cur_target_minor}"
6707 if test ${cur_target_major} -eq 10 && \
6708 test ${cur_target_minor} -ge 3 && \
6709 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07006710 then
Ned Deily36820b62014-06-25 13:44:22 -07006711 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07006712 cur_target=10.3
6713 if test ${enable_universalsdk}
6714 then
6715 case "$UNIVERSAL_ARCHS" in
6716 all|3-way|intel|64-bit)
6717 # These configurations were first supported in 10.5
6718 cur_target='10.5'
6719 ;;
6720 esac
6721 else
6722 if test `/usr/bin/arch` = "i386"
6723 then
6724 # 10.4 was the first release to support Intel archs
6725 cur_target="10.4"
6726 fi
6727 fi
6728 fi
6729 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006730
Ned Deily87adb6e2013-10-18 21:09:56 -07006731 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6732 # environment with a value that is the same as what we'll use
6733 # in the Makefile to ensure that we'll get the same compiler
6734 # environment during configure and build time.
6735 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6736 export MACOSX_DEPLOYMENT_TARGET
6737 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6739$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006740
Ned Deily87adb6e2013-10-18 21:09:56 -07006741 # end of Darwin* tests
6742 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006743 esac
6744 ;;
6745
6746*)
6747 case $ac_sys_system in
6748 OpenUNIX*|UnixWare*)
6749 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6750 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006751 SCO_SV*)
6752 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6753 ;;
6754 esac
6755 ;;
6756esac
6757
6758if test "$Py_DEBUG" = 'true'; then
6759 :
6760else
6761 OPT="-DNDEBUG $OPT"
6762fi
6763
6764if test "$ac_arch_flags"
6765then
6766 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6767fi
6768
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006769# On some compilers, pthreads are available without further options
6770# (e.g. MacOS X). On some of these systems, the compiler will not
6771# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6772# So we have to see first whether pthreads are available without
6773# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6775$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006776if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006777 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006778else
Matthias Kloseb9621712010-04-24 17:59:49 +00006779 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006780 ac_cv_pthread_is_default=no
6781else
Matthias Kloseb9621712010-04-24 17:59:49 +00006782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006783/* end confdefs.h. */
6784
Stefan Krah7dba5942012-11-22 22:49:11 +01006785#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006786#include <pthread.h>
6787
6788void* routine(void* p){return NULL;}
6789
6790int main(){
6791 pthread_t p;
6792 if(pthread_create(&p,NULL,routine,NULL)!=0)
6793 return 1;
6794 (void)pthread_detach(p);
6795 return 0;
6796}
6797
6798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006799if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006800
6801 ac_cv_pthread_is_default=yes
6802 ac_cv_kthread=no
6803 ac_cv_pthread=no
6804
6805else
Matthias Kloseb9621712010-04-24 17:59:49 +00006806 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6809 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006810fi
6811
6812
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006813fi
6814
Matthias Kloseb9621712010-04-24 17:59:49 +00006815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6816$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006817
6818
6819if test $ac_cv_pthread_is_default = yes
6820then
6821 ac_cv_kpthread=no
6822else
6823# -Kpthread, if available, provides the right #defines
6824# and linker options to make pthread_create available
6825# Some compilers won't report that they do not support -Kpthread,
6826# so we need to run a program to see whether it really made the
6827# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6829$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006830if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006831 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006832else
6833 ac_save_cc="$CC"
6834CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006835if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006836 ac_cv_kpthread=no
6837else
Matthias Kloseb9621712010-04-24 17:59:49 +00006838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006839/* end confdefs.h. */
6840
Stefan Krah7dba5942012-11-22 22:49:11 +01006841#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006842#include <pthread.h>
6843
6844void* routine(void* p){return NULL;}
6845
6846int main(){
6847 pthread_t p;
6848 if(pthread_create(&p,NULL,routine,NULL)!=0)
6849 return 1;
6850 (void)pthread_detach(p);
6851 return 0;
6852}
6853
6854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006855if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006856 ac_cv_kpthread=yes
6857else
Matthias Kloseb9621712010-04-24 17:59:49 +00006858 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6861 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006862fi
6863
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006864CC="$ac_save_cc"
6865fi
6866
Matthias Kloseb9621712010-04-24 17:59:49 +00006867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6868$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006869fi
6870
6871if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6872then
6873# -Kthread, if available, provides the right #defines
6874# and linker options to make pthread_create available
6875# Some compilers won't report that they do not support -Kthread,
6876# so we need to run a program to see whether it really made the
6877# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6879$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006880if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006881 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006882else
6883 ac_save_cc="$CC"
6884CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006885if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006886 ac_cv_kthread=no
6887else
Matthias Kloseb9621712010-04-24 17:59:49 +00006888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006889/* end confdefs.h. */
6890
Stefan Krah7dba5942012-11-22 22:49:11 +01006891#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006892#include <pthread.h>
6893
6894void* routine(void* p){return NULL;}
6895
6896int main(){
6897 pthread_t p;
6898 if(pthread_create(&p,NULL,routine,NULL)!=0)
6899 return 1;
6900 (void)pthread_detach(p);
6901 return 0;
6902}
6903
6904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006905if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006906 ac_cv_kthread=yes
6907else
Matthias Kloseb9621712010-04-24 17:59:49 +00006908 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6911 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006912fi
6913
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006914CC="$ac_save_cc"
6915fi
6916
Matthias Kloseb9621712010-04-24 17:59:49 +00006917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6918$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006919fi
6920
6921if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6922then
6923# -pthread, if available, provides the right #defines
6924# and linker options to make pthread_create available
6925# Some compilers won't report that they do not support -pthread,
6926# so we need to run a program to see whether it really made the
6927# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6929$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006930if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006931 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006932else
6933 ac_save_cc="$CC"
6934CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006935if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006936 ac_cv_pthread=no
6937else
Matthias Kloseb9621712010-04-24 17:59:49 +00006938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006939/* end confdefs.h. */
6940
Stefan Krah7dba5942012-11-22 22:49:11 +01006941#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006942#include <pthread.h>
6943
6944void* routine(void* p){return NULL;}
6945
6946int main(){
6947 pthread_t p;
6948 if(pthread_create(&p,NULL,routine,NULL)!=0)
6949 return 1;
6950 (void)pthread_detach(p);
6951 return 0;
6952}
6953
6954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006955if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006956 ac_cv_pthread=yes
6957else
Matthias Kloseb9621712010-04-24 17:59:49 +00006958 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006960rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6961 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006962fi
6963
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006964CC="$ac_save_cc"
6965fi
6966
Matthias Kloseb9621712010-04-24 17:59:49 +00006967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6968$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006969fi
6970
6971# If we have set a CC compiler flag for thread support then
6972# check if it works for CXX, too.
6973ac_cv_cxx_thread=no
6974if test ! -z "$CXX"
6975then
Matthias Kloseb9621712010-04-24 17:59:49 +00006976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6977$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006978ac_save_cxx="$CXX"
6979
6980if test "$ac_cv_kpthread" = "yes"
6981then
6982 CXX="$CXX -Kpthread"
6983 ac_cv_cxx_thread=yes
6984elif test "$ac_cv_kthread" = "yes"
6985then
6986 CXX="$CXX -Kthread"
6987 ac_cv_cxx_thread=yes
6988elif test "$ac_cv_pthread" = "yes"
6989then
6990 CXX="$CXX -pthread"
6991 ac_cv_cxx_thread=yes
6992fi
6993
6994if test $ac_cv_cxx_thread = yes
6995then
6996 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6997 $CXX -c conftest.$ac_ext 2>&5
6998 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6999 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7000 then
7001 ac_cv_cxx_thread=yes
7002 else
7003 ac_cv_cxx_thread=no
7004 fi
7005 rm -fr conftest*
7006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7008$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007009fi
7010CXX="$ac_save_cxx"
7011
7012
7013# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7015$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007016if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007017 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007018else
Matthias Kloseb9621712010-04-24 17:59:49 +00007019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007020/* end confdefs.h. */
7021#include <stdlib.h>
7022#include <stdarg.h>
7023#include <string.h>
7024#include <float.h>
7025
7026int
7027main ()
7028{
7029
7030 ;
7031 return 0;
7032}
7033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007034if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007035 ac_cv_header_stdc=yes
7036else
Matthias Kloseb9621712010-04-24 17:59:49 +00007037 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007038fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7040
7041if test $ac_cv_header_stdc = yes; then
7042 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007044/* end confdefs.h. */
7045#include <string.h>
7046
7047_ACEOF
7048if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007049 $EGREP "memchr" >/dev/null 2>&1; then :
7050
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007051else
7052 ac_cv_header_stdc=no
7053fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007054rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007055
7056fi
7057
7058if test $ac_cv_header_stdc = yes; then
7059 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007061/* end confdefs.h. */
7062#include <stdlib.h>
7063
7064_ACEOF
7065if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007066 $EGREP "free" >/dev/null 2>&1; then :
7067
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007068else
7069 ac_cv_header_stdc=no
7070fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007071rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007072
7073fi
7074
7075if test $ac_cv_header_stdc = yes; then
7076 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007077 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007078 :
7079else
Matthias Kloseb9621712010-04-24 17:59:49 +00007080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007081/* end confdefs.h. */
7082#include <ctype.h>
7083#include <stdlib.h>
7084#if ((' ' & 0x0FF) == 0x020)
7085# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7086# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7087#else
7088# define ISLOWER(c) \
7089 (('a' <= (c) && (c) <= 'i') \
7090 || ('j' <= (c) && (c) <= 'r') \
7091 || ('s' <= (c) && (c) <= 'z'))
7092# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7093#endif
7094
7095#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7096int
7097main ()
7098{
7099 int i;
7100 for (i = 0; i < 256; i++)
7101 if (XOR (islower (i), ISLOWER (i))
7102 || toupper (i) != TOUPPER (i))
7103 return 2;
7104 return 0;
7105}
7106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007107if ac_fn_c_try_run "$LINENO"; then :
7108
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007109else
Matthias Kloseb9621712010-04-24 17:59:49 +00007110 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007111fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007112rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7113 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007114fi
7115
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007116fi
7117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7119$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007120if test $ac_cv_header_stdc = yes; then
7121
Matthias Kloseb9621712010-04-24 17:59:49 +00007122$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007123
7124fi
7125
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007126for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007127fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007128ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007129sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007130unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007131poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007132sys/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 +01007133sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007134sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007135sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007136sys/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 -07007137libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007138bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7139sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007140do :
7141 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7142ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007143if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007144 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007145#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007146_ACEOF
7147
7148fi
7149
Guido van Rossum627b2d71993-12-24 10:39:16 +00007150done
7151
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007152ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007153for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007154 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7156$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007157if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007158 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007159else
Matthias Kloseb9621712010-04-24 17:59:49 +00007160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007161/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007162#include <sys/types.h>
7163#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007164
Martin v. Löwis11437992002-04-12 09:54:03 +00007165int
7166main ()
7167{
7168if ((DIR *) 0)
7169return 0;
7170 ;
7171 return 0;
7172}
7173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007174if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007175 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007176else
Matthias Kloseb9621712010-04-24 17:59:49 +00007177 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007178fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007181eval ac_res=\$$as_ac_Header
7182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7183$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007184if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007185 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007186#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007187_ACEOF
7188
7189ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007190fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007191
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007192done
7193# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7194if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7196$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007197if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007198 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007199else
Martin v. Löwis11437992002-04-12 09:54:03 +00007200 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007202/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007204/* Override any GCC internal prototype to avoid an error.
7205 Use char because int might match the return type of a GCC
7206 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007207#ifdef __cplusplus
7208extern "C"
7209#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007210char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007211int
7212main ()
7213{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007214return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007215 ;
7216 return 0;
7217}
7218_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007219for ac_lib in '' dir; do
7220 if test -z "$ac_lib"; then
7221 ac_res="none required"
7222 else
7223 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007224 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007225 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007226 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007227 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007228fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007229rm -f core conftest.err conftest.$ac_objext \
7230 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007231 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007232 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007234done
Victor Stinnere0be4232011-10-25 13:06:09 +02007235if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007236
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007237else
7238 ac_cv_search_opendir=no
7239fi
7240rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007241LIBS=$ac_func_search_save_LIBS
7242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7244$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007245ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007246if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007247 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007248
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007249fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007250
Michael W. Hudson54241132001-12-07 15:38:26 +00007251else
Matthias Kloseb9621712010-04-24 17:59:49 +00007252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7253$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007254if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007255 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007256else
7257 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007259/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007260
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007261/* Override any GCC internal prototype to avoid an error.
7262 Use char because int might match the return type of a GCC
7263 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007264#ifdef __cplusplus
7265extern "C"
7266#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007267char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007268int
7269main ()
7270{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007271return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007272 ;
7273 return 0;
7274}
7275_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007276for ac_lib in '' x; do
7277 if test -z "$ac_lib"; then
7278 ac_res="none required"
7279 else
7280 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007281 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007282 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007283 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007284 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007285fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007286rm -f core conftest.err conftest.$ac_objext \
7287 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007288 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007289 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007291done
Victor Stinnere0be4232011-10-25 13:06:09 +02007292if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007293
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007294else
7295 ac_cv_search_opendir=no
7296fi
7297rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007298LIBS=$ac_func_search_save_LIBS
7299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7301$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007302ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007303if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007304 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007305
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007306fi
7307
7308fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007309
Matthias Kloseb9621712010-04-24 17:59:49 +00007310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7311$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007312if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007313 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007314else
Matthias Kloseb9621712010-04-24 17:59:49 +00007315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007316/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007317#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007318int
7319main ()
7320{
7321return makedev(0, 0);
7322 ;
7323 return 0;
7324}
7325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007326if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007327 ac_cv_header_sys_types_h_makedev=yes
7328else
Matthias Kloseb9621712010-04-24 17:59:49 +00007329 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007331rm -f core conftest.err conftest.$ac_objext \
7332 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007333
7334fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7336$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007337
7338if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007339ac_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 +02007340if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007341
Matthias Kloseb9621712010-04-24 17:59:49 +00007342$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007343
7344fi
7345
7346
7347
7348 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007349 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 +02007350if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007351
Matthias Kloseb9621712010-04-24 17:59:49 +00007352$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007353
7354fi
7355
7356
7357 fi
7358fi
7359
Michael W. Hudson54241132001-12-07 15:38:26 +00007360
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007361# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7362for ac_header in net/if.h
7363do :
7364 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7365#ifdef STDC_HEADERS
7366# include <stdlib.h>
7367# include <stddef.h>
7368#else
7369# ifdef HAVE_STDLIB_H
7370# include <stdlib.h>
7371# endif
7372#endif
7373#ifdef HAVE_SYS_SOCKET_H
7374# include <sys/socket.h>
7375#endif
7376
7377"
Victor Stinnere0be4232011-10-25 13:06:09 +02007378if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007379 cat >>confdefs.h <<_ACEOF
7380#define HAVE_NET_IF_H 1
7381_ACEOF
7382
7383fi
7384
7385done
7386
7387
Martin v. Löwis11017b12006-01-14 18:12:57 +00007388# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007389for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007390do :
7391 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 +00007392#ifdef HAVE_ASM_TYPES_H
7393#include <asm/types.h>
7394#endif
7395#ifdef HAVE_SYS_SOCKET_H
7396#include <sys/socket.h>
7397#endif
7398
Matthias Kloseb9621712010-04-24 17:59:49 +00007399"
Victor Stinnere0be4232011-10-25 13:06:09 +02007400if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007401 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007402#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007403_ACEOF
7404
7405fi
7406
7407done
7408
7409
Charles-François Natali47413c12011-10-06 19:47:44 +02007410# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007411for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007412do :
7413 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7414ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7415#ifdef HAVE_SYS_SOCKET_H
7416#include <sys/socket.h>
7417#endif
7418
7419"
7420if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7421 cat >>confdefs.h <<_ACEOF
7422#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7423_ACEOF
7424
7425fi
7426
7427done
7428
7429
Guido van Rossum627b2d71993-12-24 10:39:16 +00007430# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007431was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7433$as_echo_n "checking for clock_t in time.h... " >&6; }
7434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007435/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007436#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007437
7438_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007439if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007440 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007441 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007442else
Martin v. Löwis11437992002-04-12 09:54:03 +00007443
7444
Matthias Kloseb9621712010-04-24 17:59:49 +00007445$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007446
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007447
Guido van Rossum627b2d71993-12-24 10:39:16 +00007448fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007449rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007450
Matthias Kloseb9621712010-04-24 17:59:49 +00007451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7452$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007453
Matthias Kloseb9621712010-04-24 17:59:49 +00007454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7455$as_echo_n "checking for makedev... " >&6; }
7456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007457/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007458
Jesus Cea740f53a2010-04-28 11:35:30 +00007459#if defined(MAJOR_IN_MKDEV)
7460#include <sys/mkdev.h>
7461#elif defined(MAJOR_IN_SYSMACROS)
7462#include <sys/sysmacros.h>
7463#else
7464#include <sys/types.h>
7465#endif
7466
Neal Norwitz11690112002-07-30 01:08:28 +00007467int
7468main ()
7469{
Jesus Cea740f53a2010-04-28 11:35:30 +00007470
7471 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007472 ;
7473 return 0;
7474}
Matthias Kloseb159a552010-04-25 21:00:44 +00007475
Neal Norwitz11690112002-07-30 01:08:28 +00007476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007477if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007478 ac_cv_has_makedev=yes
7479else
Matthias Kloseb9621712010-04-24 17:59:49 +00007480 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007481fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007482rm -f core conftest.err conftest.$ac_objext \
7483 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7485$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007486if test "$ac_cv_has_makedev" = "yes"; then
7487
Matthias Kloseb9621712010-04-24 17:59:49 +00007488$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007489
7490fi
7491
Christian Heimes985ecdc2013-11-20 11:46:18 +01007492# byte swapping
7493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7494$as_echo_n "checking for le64toh... " >&6; }
7495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7496/* end confdefs.h. */
7497
7498#ifdef HAVE_ENDIAN_H
7499#include <endian.h>
7500#elif defined(HAVE_SYS_ENDIAN_H)
7501#include <sys/endian.h>
7502#endif
7503
7504int
7505main ()
7506{
7507
7508 le64toh(1)
7509 ;
7510 return 0;
7511}
7512
7513_ACEOF
7514if ac_fn_c_try_link "$LINENO"; then :
7515 ac_cv_has_le64toh=yes
7516else
7517 ac_cv_has_le64toh=no
7518fi
7519rm -f core conftest.err conftest.$ac_objext \
7520 conftest$ac_exeext conftest.$ac_ext
7521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7522$as_echo "$ac_cv_has_le64toh" >&6; }
7523if test "$ac_cv_has_le64toh" = "yes"; then
7524
7525$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7526
7527fi
7528
Martin v. Löwis399a6892002-10-04 10:22:02 +00007529# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7530# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7531# defined, but the compiler does not support pragma redefine_extname,
7532# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7533# structures (such as rlimit64) without declaring them. As a
7534# work-around, disable LFS on such configurations
7535
7536use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7538$as_echo_n "checking Solaris LFS bug... " >&6; }
7539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007540/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007541
7542#define _LARGEFILE_SOURCE 1
7543#define _FILE_OFFSET_BITS 64
7544#include <sys/resource.h>
7545
Martin v. Löwis399a6892002-10-04 10:22:02 +00007546int
7547main ()
7548{
7549struct rlimit foo;
7550 ;
7551 return 0;
7552}
7553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007554if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007555 sol_lfs_bug=no
7556else
Matthias Kloseb9621712010-04-24 17:59:49 +00007557 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7561$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007562if test "$sol_lfs_bug" = "yes"; then
7563 use_lfs=no
7564fi
7565
7566if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007567# Two defines needed to enable largefile support on various platforms
7568# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007569case $ac_sys_system/$ac_sys_release in
7570AIX*)
7571
7572$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7573
7574 ;;
7575esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007576
Matthias Kloseb9621712010-04-24 17:59:49 +00007577$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007578
7579
Matthias Kloseb9621712010-04-24 17:59:49 +00007580$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007581
Martin v. Löwis399a6892002-10-04 10:22:02 +00007582fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007583
Guido van Rossum84e7b241996-08-19 21:59:00 +00007584# Add some code to confdefs.h so that the test for off_t works on SCO
7585cat >> confdefs.h <<\EOF
7586#if defined(SCO_DS)
7587#undef _OFF_T
7588#endif
7589EOF
7590
Guido van Rossumef2255b2000-03-10 22:30:29 +00007591# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007592ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007593if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007594
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007595else
Martin v. Löwis11437992002-04-12 09:54:03 +00007596
7597cat >>confdefs.h <<_ACEOF
7598#define mode_t int
7599_ACEOF
7600
7601fi
7602
Matthias Kloseb9621712010-04-24 17:59:49 +00007603ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007604if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007605
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007606else
Martin v. Löwis11437992002-04-12 09:54:03 +00007607
7608cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007609#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007610_ACEOF
7611
7612fi
7613
Matthias Kloseb9621712010-04-24 17:59:49 +00007614ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007615if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007616
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007617else
Martin v. Löwis11437992002-04-12 09:54:03 +00007618
7619cat >>confdefs.h <<_ACEOF
7620#define pid_t int
7621_ACEOF
7622
7623fi
7624
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007625
Martin v. Löwis11437992002-04-12 09:54:03 +00007626cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007627#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007628_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007629
Matthias Kloseb9621712010-04-24 17:59:49 +00007630ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007631if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007632
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007633else
Martin v. Löwis11437992002-04-12 09:54:03 +00007634
7635cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007636#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007637_ACEOF
7638
7639fi
7640
Matthias Kloseb9621712010-04-24 17:59:49 +00007641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7642$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007643if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007644 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007645else
Matthias Kloseb9621712010-04-24 17:59:49 +00007646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007647/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007648#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007649
7650_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007651if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007652 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007653 ac_cv_type_uid_t=yes
7654else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007655 ac_cv_type_uid_t=no
7656fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007657rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007658
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7661$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007662if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007663
Matthias Kloseb9621712010-04-24 17:59:49 +00007664$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007665
7666
Matthias Kloseb9621712010-04-24 17:59:49 +00007667$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007668
7669fi
7670
Mark Dickinson983bc162012-12-02 12:11:38 +00007671
7672# There are two separate checks for each of the exact-width integer types we
7673# need. First we check whether the type is available using the usual
7674# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7675# and <stdint.h> where available). We then also use the special type checks of
7676# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7677# directly, #define's uint32_t to be a suitable type.
7678
7679ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7680if test "x$ac_cv_type_uint32_t" = xyes; then :
7681
7682$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7683
7684fi
7685
Matthias Kloseb9621712010-04-24 17:59:49 +00007686ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7687case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007688 no|yes) ;; #(
7689 *)
7690
Matthias Kloseb9621712010-04-24 17:59:49 +00007691$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007692
7693
7694cat >>confdefs.h <<_ACEOF
7695#define uint32_t $ac_cv_c_uint32_t
7696_ACEOF
7697;;
7698 esac
7699
Mark Dickinson983bc162012-12-02 12:11:38 +00007700
7701ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7702if test "x$ac_cv_type_uint64_t" = xyes; then :
7703
7704$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7705
7706fi
7707
Matthias Kloseb9621712010-04-24 17:59:49 +00007708ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7709case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007710 no|yes) ;; #(
7711 *)
7712
Matthias Kloseb9621712010-04-24 17:59:49 +00007713$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007714
7715
7716cat >>confdefs.h <<_ACEOF
7717#define uint64_t $ac_cv_c_uint64_t
7718_ACEOF
7719;;
7720 esac
7721
Mark Dickinson983bc162012-12-02 12:11:38 +00007722
7723ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7724if test "x$ac_cv_type_int32_t" = xyes; then :
7725
7726$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7727
7728fi
7729
Matthias Kloseb9621712010-04-24 17:59:49 +00007730ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7731case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007732 no|yes) ;; #(
7733 *)
7734
7735cat >>confdefs.h <<_ACEOF
7736#define int32_t $ac_cv_c_int32_t
7737_ACEOF
7738;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007739esac
7740
Mark Dickinson983bc162012-12-02 12:11:38 +00007741
7742ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7743if test "x$ac_cv_type_int64_t" = xyes; then :
7744
7745$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7746
7747fi
7748
Matthias Kloseb9621712010-04-24 17:59:49 +00007749ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7750case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007751 no|yes) ;; #(
7752 *)
7753
7754cat >>confdefs.h <<_ACEOF
7755#define int64_t $ac_cv_c_int64_t
7756_ACEOF
7757;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007758esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007759
Mark Dickinson983bc162012-12-02 12:11:38 +00007760
Matthias Kloseb9621712010-04-24 17:59:49 +00007761ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007762if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007763
Matthias Kloseb9621712010-04-24 17:59:49 +00007764$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007765
7766fi
7767
Stefan Krah1919b7e2012-03-21 18:25:23 +01007768ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7769if test "x$ac_cv_type___uint128_t" = xyes; then :
7770
7771$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7772
7773fi
7774
Jack Jansendd19cf82001-12-06 22:36:17 +00007775
Michael W. Hudson54241132001-12-07 15:38:26 +00007776# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007777# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007778# The cast to long int works around a bug in the HP C Compiler
7779# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7780# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7781# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7783$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007784if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007786else
Matthias Kloseb9621712010-04-24 17:59:49 +00007787 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 +00007788
Martin v. Löwis11437992002-04-12 09:54:03 +00007789else
Matthias Kloseb9621712010-04-24 17:59:49 +00007790 if test "$ac_cv_type_int" = yes; then
7791 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7792$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007793as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007794See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007795 else
7796 ac_cv_sizeof_int=0
7797 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007799
Martin v. Löwis11437992002-04-12 09:54:03 +00007800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7802$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007803
7804
7805
Martin v. Löwis11437992002-04-12 09:54:03 +00007806cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007807#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007808_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007809
7810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007811# The cast to long int works around a bug in the HP C Compiler
7812# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7813# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7814# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7816$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007817if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007818 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007819else
Matthias Kloseb9621712010-04-24 17:59:49 +00007820 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 +00007821
Martin v. Löwis11437992002-04-12 09:54:03 +00007822else
Matthias Kloseb9621712010-04-24 17:59:49 +00007823 if test "$ac_cv_type_long" = yes; then
7824 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7825$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007826as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007827See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007828 else
7829 ac_cv_sizeof_long=0
7830 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007832
Martin v. Löwis11437992002-04-12 09:54:03 +00007833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7835$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007836
7837
7838
Martin v. Löwis11437992002-04-12 09:54:03 +00007839cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007840#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007841_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007842
7843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007844# The cast to long int works around a bug in the HP C Compiler
7845# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7846# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7847# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7849$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007850if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007851 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007852else
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 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 +00007854
Martin v. Löwis11437992002-04-12 09:54:03 +00007855else
Matthias Kloseb9621712010-04-24 17:59:49 +00007856 if test "$ac_cv_type_void_p" = yes; then
7857 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7858$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007859as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007860See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861 else
7862 ac_cv_sizeof_void_p=0
7863 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007865
Martin v. Löwis11437992002-04-12 09:54:03 +00007866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7868$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869
7870
7871
Martin v. Löwis11437992002-04-12 09:54:03 +00007872cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007873#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007874_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007875
7876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007877# The cast to long int works around a bug in the HP C Compiler
7878# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7879# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7880# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7882$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007883if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007884 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007885else
Matthias Kloseb9621712010-04-24 17:59:49 +00007886 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 +00007887
Martin v. Löwis11437992002-04-12 09:54:03 +00007888else
Matthias Kloseb9621712010-04-24 17:59:49 +00007889 if test "$ac_cv_type_short" = yes; then
7890 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007892as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007893See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007894 else
7895 ac_cv_sizeof_short=0
7896 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007898
Martin v. Löwis11437992002-04-12 09:54:03 +00007899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7901$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007902
7903
7904
Martin v. Löwis11437992002-04-12 09:54:03 +00007905cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007906#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007907_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007908
7909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007910# The cast to long int works around a bug in the HP C Compiler
7911# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7912# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7913# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7915$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007916if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007917 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007918else
Matthias Kloseb9621712010-04-24 17:59:49 +00007919 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 +00007920
Martin v. Löwis11437992002-04-12 09:54:03 +00007921else
Matthias Kloseb9621712010-04-24 17:59:49 +00007922 if test "$ac_cv_type_float" = yes; then
7923 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7924$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007925as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007926See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007927 else
7928 ac_cv_sizeof_float=0
7929 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007931
Martin v. Löwis11437992002-04-12 09:54:03 +00007932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7934$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007935
7936
7937
Martin v. Löwis11437992002-04-12 09:54:03 +00007938cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007939#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007940_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007941
7942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007943# The cast to long int works around a bug in the HP C Compiler
7944# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7945# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7946# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7948$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007949if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007950 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007951else
Matthias Kloseb9621712010-04-24 17:59:49 +00007952 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 +00007953
Martin v. Löwis11437992002-04-12 09:54:03 +00007954else
Matthias Kloseb9621712010-04-24 17:59:49 +00007955 if test "$ac_cv_type_double" = yes; then
7956 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7957$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007958as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007959See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007960 else
7961 ac_cv_sizeof_double=0
7962 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007964
Martin v. Löwis11437992002-04-12 09:54:03 +00007965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7967$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007968
7969
7970
Martin v. Löwis11437992002-04-12 09:54:03 +00007971cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007972#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007973_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007974
7975
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007976# The cast to long int works around a bug in the HP C Compiler
7977# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7978# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7979# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7981$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007982if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007983 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007984else
Matthias Kloseb9621712010-04-24 17:59:49 +00007985 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 +00007986
Martin v. Löwis11437992002-04-12 09:54:03 +00007987else
Matthias Kloseb9621712010-04-24 17:59:49 +00007988 if test "$ac_cv_type_fpos_t" = yes; then
7989 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007991as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007992See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993 else
7994 ac_cv_sizeof_fpos_t=0
7995 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007997
Martin v. Löwis11437992002-04-12 09:54:03 +00007998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8000$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008001
8002
8003
Martin v. Löwis11437992002-04-12 09:54:03 +00008004cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008005#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008006_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008007
Michael W. Hudson54241132001-12-07 15:38:26 +00008008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009# The cast to long int works around a bug in the HP C Compiler
8010# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8011# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8012# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8014$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008015if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008016 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008017else
Matthias Kloseb9621712010-04-24 17:59:49 +00008018 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 +00008019
Martin v. Löwis18e16552006-02-15 17:27:45 +00008020else
Matthias Kloseb9621712010-04-24 17:59:49 +00008021 if test "$ac_cv_type_size_t" = yes; then
8022 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8023$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008024as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008025See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008026 else
8027 ac_cv_sizeof_size_t=0
8028 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008029fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008030
Martin v. Löwis18e16552006-02-15 17:27:45 +00008031fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8033$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008034
8035
8036
Martin v. Löwis18e16552006-02-15 17:27:45 +00008037cat >>confdefs.h <<_ACEOF
8038#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8039_ACEOF
8040
8041
Christian Heimes400adb02008-02-01 08:12:03 +00008042# The cast to long int works around a bug in the HP C Compiler
8043# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8044# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8045# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8047$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008048if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008049 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008050else
Matthias Kloseb9621712010-04-24 17:59:49 +00008051 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 +00008052
Christian Heimes400adb02008-02-01 08:12:03 +00008053else
Matthias Kloseb9621712010-04-24 17:59:49 +00008054 if test "$ac_cv_type_pid_t" = yes; then
8055 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8056$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008057as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008058See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008059 else
8060 ac_cv_sizeof_pid_t=0
8061 fi
8062fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008063
Christian Heimes400adb02008-02-01 08:12:03 +00008064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8066$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008067
8068
8069
8070cat >>confdefs.h <<_ACEOF
8071#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8072_ACEOF
8073
8074
Michael W. Hudson54241132001-12-07 15:38:26 +00008075
Matthias Kloseb9621712010-04-24 17:59:49 +00008076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8077$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008078have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008080/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008081
Martin v. Löwis11437992002-04-12 09:54:03 +00008082int
8083main ()
8084{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008085long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008086 ;
8087 return 0;
8088}
8089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008090if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008091
8092
Matthias Kloseb9621712010-04-24 17:59:49 +00008093$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008094
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008095 have_long_long=yes
8096
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8100$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008101if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008102# The cast to long int works around a bug in the HP C Compiler
8103# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8104# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8105# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8107$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008108if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008109 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008110else
Matthias Kloseb9621712010-04-24 17:59:49 +00008111 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 +00008112
Martin v. Löwis11437992002-04-12 09:54:03 +00008113else
Matthias Kloseb9621712010-04-24 17:59:49 +00008114 if test "$ac_cv_type_long_long" = yes; then
8115 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8116$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008117as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008118See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008119 else
8120 ac_cv_sizeof_long_long=0
8121 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008122fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008123
Martin v. Löwis11437992002-04-12 09:54:03 +00008124fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8126$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008127
8128
8129
Martin v. Löwis11437992002-04-12 09:54:03 +00008130cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008131#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008132_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008133
Michael W. Hudson54241132001-12-07 15:38:26 +00008134
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008135fi
8136
Matthias Kloseb9621712010-04-24 17:59:49 +00008137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8138$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008139have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008141/* end confdefs.h. */
8142
8143int
8144main ()
8145{
8146long double x; x = (long double)0;
8147 ;
8148 return 0;
8149}
8150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008151if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008152
8153
Matthias Kloseb9621712010-04-24 17:59:49 +00008154$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008155
8156 have_long_double=yes
8157
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008158fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8161$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008162if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008163# The cast to long int works around a bug in the HP C Compiler
8164# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8165# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8166# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8168$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008169if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008170 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008171else
Matthias Kloseb9621712010-04-24 17:59:49 +00008172 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 +00008173
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008174else
Matthias Kloseb9621712010-04-24 17:59:49 +00008175 if test "$ac_cv_type_long_double" = yes; then
8176 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8177$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008178as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008179See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008180 else
8181 ac_cv_sizeof_long_double=0
8182 fi
8183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008184
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008185fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8187$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008188
8189
8190
8191cat >>confdefs.h <<_ACEOF
8192#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8193_ACEOF
8194
8195
8196fi
8197
8198
Matthias Kloseb9621712010-04-24 17:59:49 +00008199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8200$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008201have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008203/* end confdefs.h. */
8204
8205int
8206main ()
8207{
8208_Bool x; x = (_Bool)0;
8209 ;
8210 return 0;
8211}
8212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008213if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008214
8215
Matthias Kloseb9621712010-04-24 17:59:49 +00008216$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008217
8218 have_c99_bool=yes
8219
Thomas Woutersb2137042007-02-01 18:02:27 +00008220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8223$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008224if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008225# The cast to long int works around a bug in the HP C Compiler
8226# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8227# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8228# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8230$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008231if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008232 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008233else
Matthias Kloseb9621712010-04-24 17:59:49 +00008234 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 +00008235
Thomas Woutersb2137042007-02-01 18:02:27 +00008236else
Matthias Kloseb9621712010-04-24 17:59:49 +00008237 if test "$ac_cv_type__Bool" = yes; then
8238 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8239$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008240as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008241See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008242 else
8243 ac_cv_sizeof__Bool=0
8244 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008245fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008246
Thomas Woutersb2137042007-02-01 18:02:27 +00008247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8249$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008250
8251
8252
Thomas Woutersb2137042007-02-01 18:02:27 +00008253cat >>confdefs.h <<_ACEOF
8254#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8255_ACEOF
8256
8257
8258fi
8259
Matthias Kloseb9621712010-04-24 17:59:49 +00008260ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008261 #include <stdint.h>
8262 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008263 #ifdef HAVE_INTTYPES_H
8264 #include <inttypes.h>
8265 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008266"
Victor Stinnere0be4232011-10-25 13:06:09 +02008267if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008268
8269cat >>confdefs.h <<_ACEOF
8270#define HAVE_UINTPTR_T 1
8271_ACEOF
8272
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008273# The cast to long int works around a bug in the HP C Compiler
8274# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8275# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8276# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8278$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008279if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008280 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008281else
Matthias Kloseb9621712010-04-24 17:59:49 +00008282 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 +00008283
Martin v. Löwis11437992002-04-12 09:54:03 +00008284else
Matthias Kloseb9621712010-04-24 17:59:49 +00008285 if test "$ac_cv_type_uintptr_t" = yes; then
8286 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8287$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008288as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008289See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008290 else
8291 ac_cv_sizeof_uintptr_t=0
8292 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008293fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008294
Martin v. Löwis11437992002-04-12 09:54:03 +00008295fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8297$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008298
8299
8300
Martin v. Löwis11437992002-04-12 09:54:03 +00008301cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008302#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008303_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008304
Michael W. Hudson54241132001-12-07 15:38:26 +00008305
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008306fi
8307
Thomas Wouters89f507f2006-12-13 04:49:30 +00008308
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008309# The cast to long int works around a bug in the HP C Compiler
8310# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8311# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8312# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8314$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008315if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008316 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008317else
Matthias Kloseb9621712010-04-24 17:59:49 +00008318 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008319#ifdef HAVE_SYS_TYPES_H
8320#include <sys/types.h>
8321#endif
8322
Matthias Kloseb9621712010-04-24 17:59:49 +00008323"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008324
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008325else
Matthias Kloseb9621712010-04-24 17:59:49 +00008326 if test "$ac_cv_type_off_t" = yes; then
8327 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8328$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008329as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008330See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008331 else
8332 ac_cv_sizeof_off_t=0
8333 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008334fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008335
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008336fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8338$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008339
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008340
8341
Martin v. Löwis11437992002-04-12 09:54:03 +00008342cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008343#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008344_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008345
Michael W. Hudson54241132001-12-07 15:38:26 +00008346
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008347
Matthias Kloseb9621712010-04-24 17:59:49 +00008348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8349$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008350if test "$have_long_long" = yes
8351then
8352if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008353 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008354
Matthias Kloseb9621712010-04-24 17:59:49 +00008355$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008356
Matthias Kloseb9621712010-04-24 17:59:49 +00008357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8358$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008359else
Matthias Kloseb9621712010-04-24 17:59:49 +00008360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8361$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008362fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008363else
Matthias Kloseb9621712010-04-24 17:59:49 +00008364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8365$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008366fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008367
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008368# The cast to long int works around a bug in the HP C Compiler
8369# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8370# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8371# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8373$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008374if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008375 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008376else
Matthias Kloseb9621712010-04-24 17:59:49 +00008377 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008378#ifdef HAVE_SYS_TYPES_H
8379#include <sys/types.h>
8380#endif
8381#ifdef HAVE_TIME_H
8382#include <time.h>
8383#endif
8384
Matthias Kloseb9621712010-04-24 17:59:49 +00008385"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008386
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008387else
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 if test "$ac_cv_type_time_t" = yes; then
8389 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8390$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008391as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008392See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008393 else
8394 ac_cv_sizeof_time_t=0
8395 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008396fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008397
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008398fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8400$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008401
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008402
8403
Martin v. Löwis11437992002-04-12 09:54:03 +00008404cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008405#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008406_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008407
Michael W. Hudson54241132001-12-07 15:38:26 +00008408
8409
Trent Mick635f6fb2000-08-23 21:33:05 +00008410# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008411ac_save_cc="$CC"
8412if test "$ac_cv_kpthread" = "yes"
8413then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008414elif test "$ac_cv_kthread" = "yes"
8415then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008416elif test "$ac_cv_pthread" = "yes"
8417then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008418fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008419
Matthias Kloseb9621712010-04-24 17:59:49 +00008420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8421$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008422have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008424/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008425
8426 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008427int
8428main ()
8429{
Guido van Rossum12580492000-09-24 16:47:19 +00008430pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008431 ;
8432 return 0;
8433}
Matthias Kloseb159a552010-04-25 21:00:44 +00008434
Martin v. Löwis11437992002-04-12 09:54:03 +00008435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008436if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008437 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8441$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008442if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008443 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008444# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8445# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8446# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8448$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008449if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008450 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008451else
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008453#ifdef HAVE_PTHREAD_H
8454#include <pthread.h>
8455#endif
8456
Matthias Kloseb9621712010-04-24 17:59:49 +00008457"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008458
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008459else
Matthias Kloseb9621712010-04-24 17:59:49 +00008460 if test "$ac_cv_type_pthread_t" = yes; then
8461 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8462$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008463as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008464See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008465 else
8466 ac_cv_sizeof_pthread_t=0
8467 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008468fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008469
Trent Mick635f6fb2000-08-23 21:33:05 +00008470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8472$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008473
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008474
8475
Martin v. Löwis11437992002-04-12 09:54:03 +00008476cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008477#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008478_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008479
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008480
Trent Mick635f6fb2000-08-23 21:33:05 +00008481fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008482CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008483
Michael W. Hudson54241132001-12-07 15:38:26 +00008484
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008485case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008486 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008487 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8488 ;;
8489 Darwin/*)
8490 OTHER_LIBTOOL_OPT=""
8491 ;;
8492esac
8493
8494
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008495
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008496case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008497 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008498 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8499 if test "${enable_universalsdk}"; then
8500 :
8501 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008502 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008503 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008504 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008505 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008506 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008507 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008508 if test ${gcc_version} '<' 4.0
8509 then
8510 LIBTOOL_CRUFT="-lcc_dynamic"
8511 else
8512 LIBTOOL_CRUFT=""
8513 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008514 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008515 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008516else
Matthias Kloseb9621712010-04-24 17:59:49 +00008517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008518/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008519
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008520 #include <unistd.h>
8521 int main(int argc, char*argv[])
8522 {
8523 if (sizeof(long) == 4) {
8524 return 0;
8525 } else {
8526 return 1;
8527 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008528 }
8529
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008531if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008532 ac_osx_32bit=yes
8533else
Matthias Kloseb9621712010-04-24 17:59:49 +00008534 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008536rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8537 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008538fi
8539
8540
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008541 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008542 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008543 i386)
8544 MACOSX_DEFAULT_ARCH="i386"
8545 ;;
8546 ppc)
8547 MACOSX_DEFAULT_ARCH="ppc"
8548 ;;
8549 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008550 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008551 ;;
8552 esac
8553 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008554 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008555 i386)
8556 MACOSX_DEFAULT_ARCH="x86_64"
8557 ;;
8558 ppc)
8559 MACOSX_DEFAULT_ARCH="ppc64"
8560 ;;
8561 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008562 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008563 ;;
8564 esac
8565
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008566 fi
8567
8568 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008569 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008570 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008571esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8573$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008574if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008575then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008576 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008577 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008578 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008579
Matthias Kloseb9621712010-04-24 17:59:49 +00008580$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008581
Matthias Kloseb9621712010-04-24 17:59:49 +00008582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8583$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008584 if test $enable_shared = "yes"
8585 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008586 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 +00008587 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008588else
Matthias Kloseb9621712010-04-24 17:59:49 +00008589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8590$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008591fi
8592
Matthias Kloseb9621712010-04-24 17:59:49 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8594$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008595case $ac_sys_system/$ac_sys_release in
8596 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008597
Matthias Kloseb9621712010-04-24 17:59:49 +00008598$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008599
Matthias Kloseb9621712010-04-24 17:59:49 +00008600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8601$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008602 ;;
8603 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8605$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008606 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008607esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008608
Guido van Rossum0a516c91994-09-12 10:58:40 +00008609# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008610
Michael W. Hudson54241132001-12-07 15:38:26 +00008611
8612
8613
8614
Benjamin Peterson99f03762010-04-11 22:15:28 +00008615
Thomas Wouters477c8d52006-05-27 19:21:47 +00008616
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008617# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8618# -- usually .so, .sl on HP-UX, .dll on Cygwin
8619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8620$as_echo_n "checking the extension of shared libraries... " >&6; }
8621if test -z "$SHLIB_SUFFIX"; then
8622 case $ac_sys_system in
8623 hp*|HP*)
8624 case `uname -m` in
8625 ia64) SHLIB_SUFFIX=.so;;
8626 *) SHLIB_SUFFIX=.sl;;
8627 esac
8628 ;;
8629 CYGWIN*) SHLIB_SUFFIX=.dll;;
8630 *) SHLIB_SUFFIX=.so;;
8631 esac
8632fi
8633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8634$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008635
Guido van Rossum0a516c91994-09-12 10:58:40 +00008636# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008637# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008638# (Shared libraries in this instance are shared modules to be loaded into
8639# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8641$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008642if test -z "$LDSHARED"
8643then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008644 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008645 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008646 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008647 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008648 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008649 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008650 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008651 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008652 if test "$GCC" = "yes" ; then
8653 LDSHARED='$(CC) -shared'
8654 LDCXXSHARED='$(CXX) -shared'
8655 else
8656 LDSHARED='$(CC) -G'
8657 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008658 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008659 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008660 if test "$GCC" = "yes" ; then
8661 LDSHARED='$(CC) -shared'
8662 LDCXXSHARED='$(CXX) -shared'
8663 else
8664 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008665 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008666 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008667 LDSHARED='$(CC) -bundle'
8668 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008669 if test "$enable_framework" ; then
8670 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008671 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8672 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008673 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008674 else
8675 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008676 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008677 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008678 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008679 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008680 LDSHARED='$(CC) -bundle'
8681 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008682 if test "$enable_framework" ; then
8683 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008684 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8685 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008686 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008687 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008688 # No framework, use the Python app as bundle-loader
8689 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008690 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008691 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008692 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008693 Darwin/*)
8694 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8695 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008696
Ned Deily36820b62014-06-25 13:44:22 -07008697 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8698 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8699 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8700 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8701 if test ${dep_target_major} -eq 10 && \
8702 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008703 then
Ned Deily36820b62014-06-25 13:44:22 -07008704 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008705 LDSHARED='$(CC) -bundle'
8706 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008707 if test "$enable_framework" ; then
8708 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008709 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8710 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008711 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008712 else
8713 # No framework, use the Python app as bundle-loader
8714 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8715 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008716 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008717 fi
Ned Deily36820b62014-06-25 13:44:22 -07008718 else
8719 # building for OS X 10.3 and later
8720 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8721 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8722 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008723 fi
8724 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008725 Linux*|GNU*|QNX*)
8726 LDSHARED='$(CC) -shared'
8727 LDCXXSHARED='$(CXX) -shared';;
8728 BSD/OS*/4*)
8729 LDSHARED="gcc -shared"
8730 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008731 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008732 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008733 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008734 LDSHARED='$(CC) -shared'
8735 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008736 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008737 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008738 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008739 OpenBSD*)
8740 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8741 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008742 LDSHARED='$(CC) -shared $(CCSHARED)'
8743 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008744 else
8745 case `uname -r` in
8746 [01].* | 2.[0-7] | 2.[0-7].*)
8747 LDSHARED="ld -Bshareable ${LDFLAGS}"
8748 ;;
8749 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008750 LDSHARED='$(CC) -shared $(CCSHARED)'
8751 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008752 ;;
8753 esac
8754 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008755 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008756 LDSHARED='$(CC) -shared'
8757 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008758 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008759 if test "$GCC" = "yes" ; then
8760 LDSHARED='$(CC) -shared'
8761 LDCXXSHARED='$(CXX) -shared'
8762 else
8763 LDSHARED='$(CC) -G'
8764 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008765 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008766 SCO_SV*)
8767 LDSHARED='$(CC) -Wl,-G,-Bexport'
8768 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8769 CYGWIN*)
8770 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8771 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008772 *) LDSHARED="ld";;
8773 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8776$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008777LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008778BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008779# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008780# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8782$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008783if test -z "$CCSHARED"
8784then
Guido van Rossum07397971997-04-29 21:49:50 +00008785 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008786 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008787 then CCSHARED="-fPIC";
8788 elif test `uname -p` = sparc;
8789 then CCSHARED="-xcode=pic32";
8790 else CCSHARED="-Kpic";
8791 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008792 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008793 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008794 else CCSHARED="+z";
8795 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008796 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008797 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008798 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008799 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008800 if test "$GCC" = "yes"
8801 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008802 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008803 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008804 SCO_SV*)
8805 if test "$GCC" = "yes"
8806 then CCSHARED="-fPIC"
8807 else CCSHARED="-Kpic -belf"
8808 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008809 IRIX*/6*) case $CC in
8810 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008811 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008812 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008813 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8816$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008817# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008818# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8820$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008821if test -z "$LINKFORSHARED"
8822then
Guido van Rossum07397971997-04-29 21:49:50 +00008823 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008824 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008825 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008826 LINKFORSHARED="-Wl,-E -Wl,+s";;
8827# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008828 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008829 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008830 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008831 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008832 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008833
8834 # Issue #18075: the default maximum stack size (8MBytes) is too
8835 # small for the default recursion limit. Increase the stack size
8836 # to ensure that tests don't crash
8837 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8838
Jack Jansene578a632001-08-15 01:27:14 +00008839 if test "$enable_framework"
8840 then
Jack Jansenda49e192005-01-07 13:08:22 +00008841 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008842 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008843 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008844 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008845 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008846 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008847 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008848 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8849 then
8850 LINKFORSHARED="-Wl,--export-dynamic"
8851 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008852 SunOS/5*) case $CC in
8853 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008854 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008855 then
8856 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008857 fi;;
8858 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008859 CYGWIN*)
8860 if test $enable_shared = "no"
8861 then
8862 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8863 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008864 QNX*)
8865 # -Wl,-E causes the symbols to be added to the dynamic
8866 # symbol table so that they can be found when a module
8867 # is loaded. -N 2048K causes the stack size to be set
8868 # to 2048 kilobytes so that the stack doesn't overflow
8869 # when running test_compile.py.
8870 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008871 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8874$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008875
Michael W. Hudson54241132001-12-07 15:38:26 +00008876
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008877
Matthias Kloseb9621712010-04-24 17:59:49 +00008878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8879$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008880if test ! "$LIBRARY" = "$LDLIBRARY"
8881then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008882 case $ac_sys_system in
8883 CYGWIN*)
8884 # Cygwin needs CCSHARED when building extension DLLs
8885 # but not when building the interpreter DLL.
8886 CFLAGSFORSHARED='';;
8887 *)
8888 CFLAGSFORSHARED='$(CCSHARED)'
8889 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8892$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008893
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008894# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8895# library (with --enable-shared).
8896# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008897# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8898# if it is not required, since it creates a dependency of the shared library
8899# to LIBS. This, in turn, means that applications linking the shared libpython
8900# don't need to link LIBS explicitly. The default should be only changed
8901# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008902
Matthias Kloseb9621712010-04-24 17:59:49 +00008903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8904$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008905case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008906 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008907 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008908esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8910$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008911
8912
Guido van Rossum627b2d71993-12-24 10:39:16 +00008913# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8915$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008916if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008917 $as_echo_n "(cached) " >&6
8918else
8919 ac_check_lib_save_LIBS=$LIBS
8920LIBS="-lsendfile $LIBS"
8921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8922/* end confdefs.h. */
8923
8924/* Override any GCC internal prototype to avoid an error.
8925 Use char because int might match the return type of a GCC
8926 builtin and then its argument prototype would still apply. */
8927#ifdef __cplusplus
8928extern "C"
8929#endif
8930char sendfile ();
8931int
8932main ()
8933{
8934return sendfile ();
8935 ;
8936 return 0;
8937}
8938_ACEOF
8939if ac_fn_c_try_link "$LINENO"; then :
8940 ac_cv_lib_sendfile_sendfile=yes
8941else
8942 ac_cv_lib_sendfile_sendfile=no
8943fi
8944rm -f core conftest.err conftest.$ac_objext \
8945 conftest$ac_exeext conftest.$ac_ext
8946LIBS=$ac_check_lib_save_LIBS
8947fi
8948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8949$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008950if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008951 cat >>confdefs.h <<_ACEOF
8952#define HAVE_LIBSENDFILE 1
8953_ACEOF
8954
8955 LIBS="-lsendfile $LIBS"
8956
8957fi
8958
Matthias Kloseb9621712010-04-24 17:59:49 +00008959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8960$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008961if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008962 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008963else
Martin v. Löwis11437992002-04-12 09:54:03 +00008964 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008965LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008968
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008969/* Override any GCC internal prototype to avoid an error.
8970 Use char because int might match the return type of a GCC
8971 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008972#ifdef __cplusplus
8973extern "C"
8974#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008975char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008976int
8977main ()
8978{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008979return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008980 ;
8981 return 0;
8982}
8983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008984if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008985 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008986else
Matthias Kloseb9621712010-04-24 17:59:49 +00008987 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008988fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008989rm -f core conftest.err conftest.$ac_objext \
8990 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008991LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8994$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008995if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008996 cat >>confdefs.h <<_ACEOF
8997#define HAVE_LIBDL 1
8998_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008999
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009000 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009001
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009002fi
9003 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9005$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009006if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009007 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009008else
Martin v. Löwis11437992002-04-12 09:54:03 +00009009 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009010LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009012/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009013
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009014/* Override any GCC internal prototype to avoid an error.
9015 Use char because int might match the return type of a GCC
9016 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009017#ifdef __cplusplus
9018extern "C"
9019#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009020char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009021int
9022main ()
9023{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009024return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009025 ;
9026 return 0;
9027}
9028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009029if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009030 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009031else
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009034rm -f core conftest.err conftest.$ac_objext \
9035 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009036LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9039$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009040if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009041 cat >>confdefs.h <<_ACEOF
9042#define HAVE_LIBDLD 1
9043_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009044
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009045 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009046
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009047fi
9048 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009049
Georg Brandlb1441c72009-01-03 22:33:39 +00009050# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009051if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9053$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009054if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009055 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009056else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009057 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009061/* Override any GCC internal prototype to avoid an error.
9062 Use char because int might match the return type of a GCC
9063 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009064#ifdef __cplusplus
9065extern "C"
9066#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009067char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009068int
9069main ()
9070{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009071return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009072 ;
9073 return 0;
9074}
9075_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009076for ac_lib in '' pthread rt posix4; do
9077 if test -z "$ac_lib"; then
9078 ac_res="none required"
9079 else
9080 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009081 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009082 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009083 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009084 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009085fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009086rm -f core conftest.err conftest.$ac_objext \
9087 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009088 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009089 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009091done
Victor Stinnere0be4232011-10-25 13:06:09 +02009092if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009093
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009094else
9095 ac_cv_search_sem_init=no
9096fi
9097rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009098LIBS=$ac_func_search_save_LIBS
9099fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9101$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009102ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009103if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009104 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009105
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009106fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009107 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009108 # posix4 on Solaris 2.6
9109 # pthread (first!) on Linux
9110fi
9111
Martin v. Löwis19d17342003-06-14 21:03:05 +00009112# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9114$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009115if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009116 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009117else
9118 ac_check_lib_save_LIBS=$LIBS
9119LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009121/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009122
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009123/* Override any GCC internal prototype to avoid an error.
9124 Use char because int might match the return type of a GCC
9125 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009126#ifdef __cplusplus
9127extern "C"
9128#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009129char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009130int
9131main ()
9132{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009133return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009134 ;
9135 return 0;
9136}
9137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009138if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009139 ac_cv_lib_intl_textdomain=yes
9140else
Matthias Kloseb9621712010-04-24 17:59:49 +00009141 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009142fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009143rm -f core conftest.err conftest.$ac_objext \
9144 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009145LIBS=$ac_check_lib_save_LIBS
9146fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9148$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009149if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009150
Matthias Kloseb9621712010-04-24 17:59:49 +00009151$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009152
Brett Cannonc6d936e2009-06-07 20:09:53 +00009153 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009154fi
9155
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009156
9157# checks for system dependent C++ extensions support
9158case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009159 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9160$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009162/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009163
Georg Brandl59e87bd2011-02-15 19:48:59 +00009164 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009165int
9166main ()
9167{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009168loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009169 ;
9170 return 0;
9171}
Matthias Kloseb159a552010-04-25 21:00:44 +00009172
Martin v. Löwis11437992002-04-12 09:54:03 +00009173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009174if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009175
Matthias Kloseb159a552010-04-25 21:00:44 +00009176
Matthias Kloseb9621712010-04-24 17:59:49 +00009177$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009178
Matthias Kloseb159a552010-04-25 21:00:44 +00009179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009180$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009181
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009182else
Matthias Kloseb159a552010-04-25 21:00:44 +00009183
9184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009185$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009186
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009187fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009188rm -f core conftest.err conftest.$ac_objext \
9189 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009190 *) ;;
9191esac
9192
Christian Heimes985ecdc2013-11-20 11:46:18 +01009193# check for systems that require aligned memory access
9194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9195$as_echo_n "checking aligned memory access is required... " >&6; }
9196if test "$cross_compiling" = yes; then :
9197 aligned_required=yes
9198else
9199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9200/* end confdefs.h. */
9201
9202int main()
9203{
9204 char s[16];
9205 int i, *p1, *p2;
9206 for (i=0; i < 16; i++)
9207 s[i] = i;
9208 p1 = (int*)(s+1);
9209 p2 = (int*)(s+2);
9210 if (*p1 == *p2)
9211 return 1;
9212 return 0;
9213}
9214
9215_ACEOF
9216if ac_fn_c_try_run "$LINENO"; then :
9217 aligned_required=no
9218else
9219 aligned_required=yes
9220fi
9221rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9222 conftest.$ac_objext conftest.beam conftest.$ac_ext
9223fi
9224
9225
9226if test "$aligned_required" = yes ; then
9227
9228$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9229
9230fi
9231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9232$as_echo "$aligned_required" >&6; }
9233
9234
9235# str, bytes and memoryview hash algorithm
9236
9237
9238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9239$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9240
9241# Check whether --with-hash_algorithm was given.
9242if test "${with_hash_algorithm+set}" = set; then :
9243 withval=$with_hash_algorithm;
9244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9245$as_echo "$withval" >&6; }
9246case "$withval" in
9247 siphash24)
9248 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9249
9250 ;;
9251 fnv)
9252 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9253
9254 ;;
9255 *)
9256 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9257 ;;
9258esac
9259
9260else
9261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9262$as_echo "default" >&6; }
9263fi
9264
9265
Charles-François Natalid30b0222014-05-08 23:08:51 +01009266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9267$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9268
9269# Check whether --with-address_sanitizer was given.
9270if test "${with_address_sanitizer+set}" = set; then :
9271 withval=$with_address_sanitizer;
9272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9273$as_echo "$withval" >&6; }
9274BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9275LDFLAGS="-fsanitize=address $LDFLAGS"
9276
9277else
9278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9279$as_echo "no" >&6; }
9280fi
9281
9282
Guido van Rossum70c7f481998-03-26 18:44:10 +00009283# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9285$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009286if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009287 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009288else
Martin v. Löwis11437992002-04-12 09:54:03 +00009289 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009290LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009293
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009294/* Override any GCC internal prototype to avoid an error.
9295 Use char because int might match the return type of a GCC
9296 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009297#ifdef __cplusplus
9298extern "C"
9299#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009300char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009301int
9302main ()
9303{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009304return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009305 ;
9306 return 0;
9307}
9308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009309if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009310 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009311else
Matthias Kloseb9621712010-04-24 17:59:49 +00009312 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009313fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009314rm -f core conftest.err conftest.$ac_objext \
9315 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009316LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9319$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009320if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009321 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009322fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009323 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9325$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009326if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009327 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009328else
Martin v. Löwis11437992002-04-12 09:54:03 +00009329 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009330LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009333
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009334/* Override any GCC internal prototype to avoid an error.
9335 Use char because int might match the return type of a GCC
9336 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009337#ifdef __cplusplus
9338extern "C"
9339#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009340char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009341int
9342main ()
9343{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009344return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009345 ;
9346 return 0;
9347}
9348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009349if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009350 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009351else
Matthias Kloseb9621712010-04-24 17:59:49 +00009352 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009353fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009354rm -f core conftest.err conftest.$ac_objext \
9355 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009356LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009357fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9359$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009360if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009361 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009362fi
9363 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009364
Matthias Kloseb9621712010-04-24 17:59:49 +00009365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9366$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009367
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009368# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009369if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009370 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9372$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009373LIBS="$withval $LIBS"
9374
9375else
Matthias Kloseb9621712010-04-24 17:59:49 +00009376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9377$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009378fi
9379
Guido van Rossum7f43da71994-08-01 12:15:30 +00009380
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009381if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009382 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9383set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9385$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009386if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009387 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009388else
9389 case $PKG_CONFIG in
9390 [\\/]* | ?:[\\/]*)
9391 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9392 ;;
9393 *)
9394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9395for as_dir in $PATH
9396do
9397 IFS=$as_save_IFS
9398 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009399 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009400 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009401 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009402 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009403 break 2
9404 fi
9405done
Matthias Kloseb9621712010-04-24 17:59:49 +00009406 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009407IFS=$as_save_IFS
9408
9409 ;;
9410esac
9411fi
9412PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9413if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9415$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009416else
Matthias Kloseb9621712010-04-24 17:59:49 +00009417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9418$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009419fi
9420
9421
9422fi
9423if test -z "$ac_cv_path_PKG_CONFIG"; then
9424 ac_pt_PKG_CONFIG=$PKG_CONFIG
9425 # Extract the first word of "pkg-config", so it can be a program name with args.
9426set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9428$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009429if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009430 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009431else
9432 case $ac_pt_PKG_CONFIG in
9433 [\\/]* | ?:[\\/]*)
9434 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9435 ;;
9436 *)
9437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9438for as_dir in $PATH
9439do
9440 IFS=$as_save_IFS
9441 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009442 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009443 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009444 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009445 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009446 break 2
9447 fi
9448done
Matthias Kloseb9621712010-04-24 17:59:49 +00009449 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009450IFS=$as_save_IFS
9451
9452 ;;
9453esac
9454fi
9455ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9456if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9458$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009459else
Matthias Kloseb9621712010-04-24 17:59:49 +00009460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9461$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009462fi
9463
9464 if test "x$ac_pt_PKG_CONFIG" = x; then
9465 PKG_CONFIG=""
9466 else
9467 case $cross_compiling:$ac_tool_warned in
9468yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009469{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9470$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009471ac_tool_warned=yes ;;
9472esac
9473 PKG_CONFIG=$ac_pt_PKG_CONFIG
9474 fi
9475else
9476 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9477fi
9478
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009479
9480# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9482$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009483
9484# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009485if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009486 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009487else
9488 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009489fi
9490
9491
Matthias Kloseb9621712010-04-24 17:59:49 +00009492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9493$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009494
9495# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9497$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009498
9499# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009500if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009501 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009502else
9503 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009504fi
9505
9506
9507if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009508 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9509else
9510 LIBFFI_INCLUDEDIR=""
9511fi
9512
9513
Matthias Kloseb9621712010-04-24 17:59:49 +00009514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9515$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009516
Stefan Krah60187b52012-03-23 19:06:27 +01009517# Check for use of the system libmpdec library
9518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9519$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9520
9521# Check whether --with-system_libmpdec was given.
9522if test "${with_system_libmpdec+set}" = set; then :
9523 withval=$with_system_libmpdec;
9524else
9525 with_system_libmpdec="no"
9526fi
9527
9528
9529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9530$as_echo "$with_system_libmpdec" >&6; }
9531
Benjamin Peterson076ed002010-10-31 17:11:02 +00009532# Check for support for loadable sqlite extensions
9533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9534$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9535# Check whether --enable-loadable-sqlite-extensions was given.
9536if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9537 enableval=$enable_loadable_sqlite_extensions;
9538else
9539 enable_loadable_sqlite_extensions="no"
9540fi
9541
9542
9543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9544$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9545
Ned Deilyd819b932013-09-06 01:07:05 -07009546# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9547
9548
9549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9550$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9551
9552# Check whether --with-tcltk-includes was given.
9553if test "${with_tcltk_includes+set}" = set; then :
9554 withval=$with_tcltk_includes;
9555else
9556 with_tcltk_includes="default"
9557fi
9558
9559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9560$as_echo "$with_tcltk_includes" >&6; }
9561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9562$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9563
9564# Check whether --with-tcltk-libs was given.
9565if test "${with_tcltk_libs+set}" = set; then :
9566 withval=$with_tcltk_libs;
9567else
9568 with_tcltk_libs="default"
9569fi
9570
9571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9572$as_echo "$with_tcltk_libs" >&6; }
9573if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9574then
9575 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9576 then
9577 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9578 fi
9579 TCLTK_INCLUDES=""
9580 TCLTK_LIBS=""
9581else
9582 TCLTK_INCLUDES="$with_tcltk_includes"
9583 TCLTK_LIBS="$with_tcltk_libs"
9584fi
9585
Matthias Klose55708cc2009-04-30 08:06:49 +00009586# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9588$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009589
9590# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009591if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009592 withval=$with_dbmliborder;
9593if test x$with_dbmliborder = xyes
9594then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009595as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009596else
9597 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9598 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9599 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009600 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009601 fi
9602 done
9603fi
9604fi
9605
Matthias Kloseb9621712010-04-24 17:59:49 +00009606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9607$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009608
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009609# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009610
9611
Matthias Kloseb9621712010-04-24 17:59:49 +00009612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9613$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009615# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009616if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009617 withval=$with_signal_module;
9618fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009619
9620
9621if test -z "$with_signal_module"
9622then with_signal_module="yes"
9623fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9625$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009626
9627if test "${with_signal_module}" = "yes"; then
9628 USE_SIGNAL_MODULE=""
9629 SIGNAL_OBJS=""
9630else
9631 USE_SIGNAL_MODULE="#"
9632 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9633fi
9634
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009635# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009636
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009637USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009638
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009639
Martin v. Löwis11437992002-04-12 09:54:03 +00009640
9641# Templates for things AC_DEFINEd more than once.
9642# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009643
9644
Martin v. Löwis11437992002-04-12 09:54:03 +00009645
Matthias Kloseb9621712010-04-24 17:59:49 +00009646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9647$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009648
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009649# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009650if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009651 withval=$with_threads;
9652fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009653
9654
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009655# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009656
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009657# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009658if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009659 withval=$with_thread; with_threads=$with_thread
9660fi
9661
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009662
9663if test -z "$with_threads"
9664then with_threads="yes"
9665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9667$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009668
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009669
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009670if test "$with_threads" = "no"
9671then
9672 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009673elif test "$ac_cv_pthread_is_default" = yes
9674then
Matthias Kloseb9621712010-04-24 17:59:49 +00009675 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009676
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009677 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009678 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009679
9680 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009681 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009682elif test "$ac_cv_kpthread" = "yes"
9683then
9684 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009685 if test "$ac_cv_cxx_thread" = "yes"; then
9686 CXX="$CXX -Kpthread"
9687 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009688 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009689
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009690 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009691 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009692elif test "$ac_cv_kthread" = "yes"
9693then
9694 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009695 if test "$ac_cv_cxx_thread" = "yes"; then
9696 CXX="$CXX -Kthread"
9697 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009698 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009699
9700 posix_threads=yes
9701 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009702elif test "$ac_cv_pthread" = "yes"
9703then
9704 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009705 if test "$ac_cv_cxx_thread" = "yes"; then
9706 CXX="$CXX -pthread"
9707 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009708 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009709
9710 posix_threads=yes
9711 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009712else
9713 if test ! -z "$with_threads" -a -d "$with_threads"
9714 then LDFLAGS="$LDFLAGS -L$with_threads"
9715 fi
9716 if test ! -z "$withval" -a -d "$withval"
9717 then LDFLAGS="$LDFLAGS -L$withval"
9718 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009719
9720 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009721 # define _POSIX_THREADS in unistd.h. Some apparently don't
9722 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9724$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009726/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009727
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009728#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009729#ifdef _POSIX_THREADS
9730yes
9731#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009732
9733_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009734if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009735 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009736 unistd_defines_pthreads=yes
9737else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009738 unistd_defines_pthreads=no
9739fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009740rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009741
Matthias Kloseb9621712010-04-24 17:59:49 +00009742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9743$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009744
Matthias Kloseb9621712010-04-24 17:59:49 +00009745 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009746
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009747 # Just looking for pthread_create in libpthread is not enough:
9748 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9749 # So we really have to include pthread.h, and then link.
9750 _libs=$LIBS
9751 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9753$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009755/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009756
9757#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009758#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009759
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009760void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009761int
9762main ()
9763{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009764
9765pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009766 ;
9767 return 0;
9768}
9769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009770if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009771
Matthias Kloseb9621712010-04-24 17:59:49 +00009772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9773$as_echo "yes" >&6; }
9774 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009775
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009776 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009777 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009778else
Martin v. Löwis11437992002-04-12 09:54:03 +00009779
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009780 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009781 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009782if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009783 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009784
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009785 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009786 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009787else
Guido van Rossumad678af1998-10-02 14:42:15 +00009788
Matthias Kloseb9621712010-04-24 17:59:49 +00009789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9790$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009791if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009792 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009793else
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009795LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009798
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009799/* Override any GCC internal prototype to avoid an error.
9800 Use char because int might match the return type of a GCC
9801 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009802#ifdef __cplusplus
9803extern "C"
9804#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009805char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009806int
9807main ()
9808{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009809return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009810 ;
9811 return 0;
9812}
9813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009814if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009815 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009816else
Matthias Kloseb9621712010-04-24 17:59:49 +00009817 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009819rm -f core conftest.err conftest.$ac_objext \
9820 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009821LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9824$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009825if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009826 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009827
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009828 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009829 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009830 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009831else
Greg Steinadf63d62000-07-05 10:38:09 +00009832
Matthias Kloseb9621712010-04-24 17:59:49 +00009833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9834$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009835if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009836 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009837else
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009839LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009841/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009843/* Override any GCC internal prototype to avoid an error.
9844 Use char because int might match the return type of a GCC
9845 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009846#ifdef __cplusplus
9847extern "C"
9848#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009849char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009850int
9851main ()
9852{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009853return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009854 ;
9855 return 0;
9856}
9857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009858if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009859 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009860else
Matthias Kloseb9621712010-04-24 17:59:49 +00009861 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009863rm -f core conftest.err conftest.$ac_objext \
9864 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009865LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9868$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009869if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009870 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009871
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009872 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009873 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009874 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009875else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009876
Matthias Kloseb9621712010-04-24 17:59:49 +00009877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9878$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009879if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009880 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009881else
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009883LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009887/* Override any GCC internal prototype to avoid an error.
9888 Use char because int might match the return type of a GCC
9889 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009890#ifdef __cplusplus
9891extern "C"
9892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009893char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009894int
9895main ()
9896{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009897return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009898 ;
9899 return 0;
9900}
9901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009902if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009903 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009904else
Matthias Kloseb9621712010-04-24 17:59:49 +00009905 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009907rm -f core conftest.err conftest.$ac_objext \
9908 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009909LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9912$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009913if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009914 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009915
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009916 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009917 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009918 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009919else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009920
Matthias Kloseb9621712010-04-24 17:59:49 +00009921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9922$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009923if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009924 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009925else
Martin v. Löwis11437992002-04-12 09:54:03 +00009926 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009927LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009929/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009931/* Override any GCC internal prototype to avoid an error.
9932 Use char because int might match the return type of a GCC
9933 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009934#ifdef __cplusplus
9935extern "C"
9936#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009937char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009938int
9939main ()
9940{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009941return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009942 ;
9943 return 0;
9944}
9945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009946if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009947 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009948else
Matthias Kloseb9621712010-04-24 17:59:49 +00009949 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009951rm -f core conftest.err conftest.$ac_objext \
9952 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009953LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9956$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009957if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009958 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009959
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009960 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009961 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009962 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009963else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009964
Martin v. Löwis130fb172001-07-19 11:00:41 +00009965 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009966fi
9967
Guido van Rossum627b2d71993-12-24 10:39:16 +00009968
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009969fi
9970
Guido van Rossum0be3e491997-05-22 20:33:33 +00009971fi
9972
Guido van Rossum49545951997-12-02 19:28:29 +00009973fi
9974
Guido van Rossumb93a8621998-05-07 13:27:32 +00009975fi
9976
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009978rm -f core conftest.err conftest.$ac_objext \
9979 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009980
Matthias Kloseb9621712010-04-24 17:59:49 +00009981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9982$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009983if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009984 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009985else
Martin v. Löwis11437992002-04-12 09:54:03 +00009986 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009987LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009990
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009991/* Override any GCC internal prototype to avoid an error.
9992 Use char because int might match the return type of a GCC
9993 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009994#ifdef __cplusplus
9995extern "C"
9996#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009997char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009998int
9999main ()
10000{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010001return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010002 ;
10003 return 0;
10004}
10005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010006if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010007 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010008else
Matthias Kloseb9621712010-04-24 17:59:49 +000010009 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010011rm -f core conftest.err conftest.$ac_objext \
10012 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010013LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10016$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010017if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010018 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010019
Martin v. Löwis130fb172001-07-19 11:00:41 +000010020 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010021 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010022 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010023fi
10024
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010025
Neal Norwitza978ab02002-11-02 16:58:05 +000010026 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10028$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010029if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010030 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010031else
Martin v. Löwis11437992002-04-12 09:54:03 +000010032 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010033LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010035/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010037/* Override any GCC internal prototype to avoid an error.
10038 Use char because int might match the return type of a GCC
10039 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010040#ifdef __cplusplus
10041extern "C"
10042#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010043char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010044int
10045main ()
10046{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010047return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 ;
10049 return 0;
10050}
10051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010052if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010053 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010054else
Matthias Kloseb9621712010-04-24 17:59:49 +000010055 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010057rm -f core conftest.err conftest.$ac_objext \
10058 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010059LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10062$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010063if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010064 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010065
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010066 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010067 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010068 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010069fi
10070
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010071 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010072fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010073
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010074if test "$posix_threads" = "yes"; then
10075 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010076
Matthias Kloseb9621712010-04-24 17:59:49 +000010077$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010078
10079 fi
10080
10081 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10082 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010083 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010084$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010085
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010086 ;;
10087 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010088$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010089
10090 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010091 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010092$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010093
10094 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010095 esac
10096
Matthias Kloseb9621712010-04-24 17:59:49 +000010097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10098$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010099 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010100 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010101else
Matthias Kloseb9621712010-04-24 17:59:49 +000010102 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010103 ac_cv_pthread_system_supported=no
10104else
Matthias Kloseb9621712010-04-24 17:59:49 +000010105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010106/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010107
10108 #include <stdio.h>
10109 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010110 void *foo(void *parm) {
10111 return NULL;
10112 }
10113 main() {
10114 pthread_attr_t attr;
10115 pthread_t id;
10116 if (pthread_attr_init(&attr)) exit(-1);
10117 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10118 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10119 exit(0);
10120 }
10121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010122if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010123 ac_cv_pthread_system_supported=yes
10124else
Matthias Kloseb9621712010-04-24 17:59:49 +000010125 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010127rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10128 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010129fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010130
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010131
Guido van Rossum627b2d71993-12-24 10:39:16 +000010132fi
10133
Matthias Kloseb9621712010-04-24 17:59:49 +000010134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10135$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010136 if test "$ac_cv_pthread_system_supported" = "yes"; then
10137
Matthias Kloseb9621712010-04-24 17:59:49 +000010138$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010139
10140 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010141 for ac_func in pthread_sigmask
10142do :
10143 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010144if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010145 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010146#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010147_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010148 case $ac_sys_system in
10149 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010150
Matthias Kloseb9621712010-04-24 17:59:49 +000010151$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010152
10153 ;;
10154 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010155fi
10156done
10157
Christian Heimesf77b4b22013-08-21 13:26:05 +020010158 for ac_func in pthread_atfork
10159do :
10160 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10161if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10162 cat >>confdefs.h <<_ACEOF
10163#define HAVE_PTHREAD_ATFORK 1
10164_ACEOF
10165
10166fi
10167done
10168
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010169fi
10170
10171
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010172# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010173
Matthias Kloseb9621712010-04-24 17:59:49 +000010174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10175$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010176# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010177if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010178 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010179 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10181$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010182 ipv6=no
10183 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010184 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10185$as_echo "yes" >&6; }
10186 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010187
10188 ipv6=yes
10189 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010190 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010191else
Martin v. Löwis11437992002-04-12 09:54:03 +000010192
Matthias Kloseb9621712010-04-24 17:59:49 +000010193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010194/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010195 /* AF_INET6 available check */
10196#include <sys/types.h>
10197#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010198int
10199main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010200{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010201int domain = AF_INET6;
10202 ;
10203 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010204}
Martin v. Löwis11437992002-04-12 09:54:03 +000010205_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010206if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010207
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10209$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010210 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010211
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010212else
Matthias Kloseb159a552010-04-25 21:00:44 +000010213
Matthias Kloseb9621712010-04-24 17:59:49 +000010214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10215$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010216 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010217
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010218fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010220
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010221if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10223$as_echo_n "checking if RFC2553 API is available... " >&6; }
10224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010225/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010226
10227 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010228#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010229int
10230main ()
10231{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010232struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010233 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010234 ;
10235 return 0;
10236}
Matthias Kloseb159a552010-04-25 21:00:44 +000010237
Martin v. Löwis11437992002-04-12 09:54:03 +000010238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010239if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010240
10241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010242$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010243 ipv6=yes
10244
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010245else
Matthias Kloseb159a552010-04-25 21:00:44 +000010246
10247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010248$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010249 ipv6=no
10250
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010253fi
10254
10255if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010256 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010257
10258fi
10259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010260fi
10261
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010262
10263ipv6type=unknown
10264ipv6lib=none
10265ipv6trylibc=no
10266
10267if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10269$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010270 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10271 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010272 case $i in
10273 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010275/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010276
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010277#include <netinet/in.h>
10278#ifdef IPV6_INRIA_VERSION
10279yes
10280#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010281_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010282if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010283 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010284 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010285fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010286rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010287
10288 ;;
10289 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010291/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010292
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010293#include <netinet/in.h>
10294#ifdef __KAME__
10295yes
10296#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010297_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010298if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010299 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010300 ipv6type=$i;
10301 ipv6lib=inet6
10302 ipv6libdir=/usr/local/v6/lib
10303 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010304fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010305rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010306
10307 ;;
10308 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010310/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010311
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010312#include <features.h>
10313#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10314yes
10315#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010316_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010317if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010318 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010319 ipv6type=$i;
10320 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010321fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010322rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010323
10324 ;;
10325 linux-inet6)
10326 if test -d /usr/inet6; then
10327 ipv6type=$i
10328 ipv6lib=inet6
10329 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010330 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010331 fi
10332 ;;
10333 solaris)
10334 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010335 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010336 ipv6type=$i
10337 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010338 fi
10339 fi
10340 ;;
10341 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010343/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010344
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010345#include <sys/param.h>
10346#ifdef _TOSHIBA_INET6
10347yes
10348#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010349_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010350if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010352 ipv6type=$i;
10353 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010354 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010355fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010356rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010357
10358 ;;
10359 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010361/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010362
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010363#include </usr/local/v6/include/sys/v6config.h>
10364#ifdef __V6D__
10365yes
10366#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010367_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010368if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010369 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010370 ipv6type=$i;
10371 ipv6lib=v6;
10372 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010373 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010374fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010375rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010376
10377 ;;
10378 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010380/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010381
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010382#include <sys/param.h>
10383#ifdef _ZETA_MINAMI_INET6
10384yes
10385#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010386_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010387if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010388 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010389 ipv6type=$i;
10390 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010391 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010392fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010393rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010394
10395 ;;
10396 esac
10397 if test "$ipv6type" != "unknown"; then
10398 break
10399 fi
10400 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10402$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010403fi
10404
10405if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10406 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10407 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10408 echo "using lib$ipv6lib"
10409 else
10410 if test $ipv6trylibc = "yes"; then
10411 echo "using libc"
10412 else
10413 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10414 echo "You need to fetch lib$ipv6lib.a from appropriate"
10415 echo 'ipv6 kit and compile beforehand.'
10416 exit 1
10417 fi
10418 fi
10419fi
10420
Matthias Kloseb9621712010-04-24 17:59:49 +000010421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10422$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010424/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010425
10426 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010427int
10428main ()
10429{
10430FSIORefNum fRef = 0
10431 ;
10432 return 0;
10433}
Matthias Kloseb159a552010-04-25 21:00:44 +000010434
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010436if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010437
Matthias Kloseb159a552010-04-25 21:00:44 +000010438
Matthias Kloseb9621712010-04-24 17:59:49 +000010439$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010440
Matthias Kloseb9621712010-04-24 17:59:49 +000010441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10442$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010443
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010444else
Matthias Kloseb159a552010-04-25 21:00:44 +000010445
Matthias Kloseb9621712010-04-24 17:59:49 +000010446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10447$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010448
10449fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10451
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010452# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10454$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010455
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010456# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010457if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010458 withval=$with_doc_strings;
10459fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010460
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010461
10462if test -z "$with_doc_strings"
10463then with_doc_strings="yes"
10464fi
10465if test "$with_doc_strings" != "no"
10466then
10467
Matthias Kloseb9621712010-04-24 17:59:49 +000010468$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010469
10470fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10472$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010473
Antoine Pitrou042b1282010-08-13 21:15:58 +000010474# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10476$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010478# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010479if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010480 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010481if test "$withval" != no
10482then
10483
Matthias Kloseb9621712010-04-24 17:59:49 +000010484$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010485
Matthias Kloseb9621712010-04-24 17:59:49 +000010486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10487$as_echo "yes" >&6; }
10488else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10489$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010490fi
10491else
Matthias Kloseb9621712010-04-24 17:59:49 +000010492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10493$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010494fi
10495
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010496
10497# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10499$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010501# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010502if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010503 withval=$with_pymalloc;
10504fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010505
Neil Schemenauera35c6882001-02-27 04:45:05 +000010506
Neil Schemenauer16c22972002-03-22 15:34:49 +000010507if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010508then
10509 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010510fi
10511if test "$with_pymalloc" != "no"
10512then
Martin v. Löwis11437992002-04-12 09:54:03 +000010513
Matthias Kloseb9621712010-04-24 17:59:49 +000010514$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010515
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010516 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010517fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10519$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010520
Benjamin Peterson05159c42009-12-03 03:01:27 +000010521# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10523$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010524
10525# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010526if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010527 withval=$with_valgrind;
10528else
10529 with_valgrind=no
10530fi
10531
Matthias Kloseb9621712010-04-24 17:59:49 +000010532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10533$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010534if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010535 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 +020010536if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010537
Matthias Kloseb9621712010-04-24 17:59:49 +000010538$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010539
10540else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010541 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010542
10543fi
10544
10545
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010546 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010547fi
10548
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010549# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010550
Guido van Rossum98935bf2001-09-05 19:13:16 +000010551DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010552
Guido van Rossume97ee181999-12-20 21:27:22 +000010553# the dlopen() function means we might want to use dynload_shlib.o. some
10554# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010555for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010556do :
10557 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010558if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010559 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010560#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010561_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010562
Guido van Rossume97ee181999-12-20 21:27:22 +000010563fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010564done
Guido van Rossume97ee181999-12-20 21:27:22 +000010565
Michael W. Hudson54241132001-12-07 15:38:26 +000010566
Guido van Rossume97ee181999-12-20 21:27:22 +000010567# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10568# loading of modules.
10569
Matthias Kloseb9621712010-04-24 17:59:49 +000010570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10571$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010572if test -z "$DYNLOADFILE"
10573then
10574 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010575 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10576 if test "$ac_cv_func_dlopen" = yes
10577 then DYNLOADFILE="dynload_shlib.o"
10578 else DYNLOADFILE="dynload_aix.o"
10579 fi
10580 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010581 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010582 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10583 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010584 *)
10585 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10586 # out any dynamic loading
10587 if test "$ac_cv_func_dlopen" = yes
10588 then DYNLOADFILE="dynload_shlib.o"
10589 else DYNLOADFILE="dynload_stub.o"
10590 fi
10591 ;;
10592 esac
10593fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10595$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010596if test "$DYNLOADFILE" != "dynload_stub.o"
10597then
Martin v. Löwis11437992002-04-12 09:54:03 +000010598
Matthias Kloseb9621712010-04-24 17:59:49 +000010599$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010600
10601fi
10602
Neil Schemenauer4e425612001-06-19 15:44:15 +000010603# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10604
Michael W. Hudson54241132001-12-07 15:38:26 +000010605
Matthias Kloseb9621712010-04-24 17:59:49 +000010606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10607$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010608if test -z "$MACHDEP_OBJS"
10609then
Jack Jansene578a632001-08-15 01:27:14 +000010610 MACHDEP_OBJS=$extra_machdep_objs
10611else
10612 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010613fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010614if test -z "$MACHDEP_OBJS"; then
10615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10616$as_echo "none" >&6; }
10617else
10618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10619$as_echo "$MACHDEP_OBJS" >&6; }
10620fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010621
Guido van Rossum627b2d71993-12-24 10:39:16 +000010622# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010623for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010624 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010625 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010626 futimens futimes gai_strerror \
10627 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010628 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010629 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010630 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10631 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010632 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010633 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010634 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010635 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010636 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010637 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010638 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10639 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010640 sigaction sigaltstack siginterrupt sigpending sigrelse \
10641 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010642 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010643 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010644 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010645do :
10646 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10647ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010648if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010649 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010650#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010651_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010652
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010653fi
10654done
10655
Michael W. Hudson54241132001-12-07 15:38:26 +000010656
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010657ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10658 #include <dirent.h>
10659"
10660if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10661
10662$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10663
10664fi
10665
10666
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010667# For some functions, having a definition is not sufficient, since
10668# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10670$as_echo_n "checking for chroot... " >&6; }
10671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010672/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010673#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010674int
10675main ()
10676{
10677void *x=chroot
10678 ;
10679 return 0;
10680}
10681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010682if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010683
Matthias Kloseb9621712010-04-24 17:59:49 +000010684$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010685
Matthias Kloseb159a552010-04-25 21:00:44 +000010686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010687$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010688else
Matthias Kloseb9621712010-04-24 17:59:49 +000010689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10690$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010691
10692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10695$as_echo_n "checking for link... " >&6; }
10696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010697/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010698#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010699int
10700main ()
10701{
10702void *x=link
10703 ;
10704 return 0;
10705}
10706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010707if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010708
Matthias Kloseb9621712010-04-24 17:59:49 +000010709$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010710
Matthias Kloseb159a552010-04-25 21:00:44 +000010711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010712$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010713else
Matthias Kloseb9621712010-04-24 17:59:49 +000010714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10715$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010716
10717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10720$as_echo_n "checking for symlink... " >&6; }
10721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010722/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010723#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010724int
10725main ()
10726{
10727void *x=symlink
10728 ;
10729 return 0;
10730}
10731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010732if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010733
Matthias Kloseb9621712010-04-24 17:59:49 +000010734$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010735
Matthias Kloseb159a552010-04-25 21:00:44 +000010736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010737$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010738else
Matthias Kloseb9621712010-04-24 17:59:49 +000010739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10740$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010741
10742fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10745$as_echo_n "checking for fchdir... " >&6; }
10746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010747/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010748#include <unistd.h>
10749int
10750main ()
10751{
10752void *x=fchdir
10753 ;
10754 return 0;
10755}
10756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010757if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010758
Matthias Kloseb9621712010-04-24 17:59:49 +000010759$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010760
Matthias Kloseb159a552010-04-25 21:00:44 +000010761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010762$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010763else
Matthias Kloseb9621712010-04-24 17:59:49 +000010764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10765$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010766
10767fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10770$as_echo_n "checking for fsync... " >&6; }
10771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010772/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010773#include <unistd.h>
10774int
10775main ()
10776{
10777void *x=fsync
10778 ;
10779 return 0;
10780}
10781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010782if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010783
Matthias Kloseb9621712010-04-24 17:59:49 +000010784$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010785
Matthias Kloseb159a552010-04-25 21:00:44 +000010786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010787$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010788else
Matthias Kloseb9621712010-04-24 17:59:49 +000010789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10790$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010791
10792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10795$as_echo_n "checking for fdatasync... " >&6; }
10796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010797/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010798#include <unistd.h>
10799int
10800main ()
10801{
10802void *x=fdatasync
10803 ;
10804 return 0;
10805}
10806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010807if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010808
Matthias Kloseb9621712010-04-24 17:59:49 +000010809$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010810
Matthias Kloseb159a552010-04-25 21:00:44 +000010811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010812$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010813else
Matthias Kloseb9621712010-04-24 17:59:49 +000010814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10815$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010816
10817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10820$as_echo_n "checking for epoll... " >&6; }
10821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010822/* end confdefs.h. */
10823#include <sys/epoll.h>
10824int
10825main ()
10826{
10827void *x=epoll_create
10828 ;
10829 return 0;
10830}
10831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010832if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010833
Matthias Kloseb9621712010-04-24 17:59:49 +000010834$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010835
Matthias Kloseb159a552010-04-25 21:00:44 +000010836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010837$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010838else
Matthias Kloseb9621712010-04-24 17:59:49 +000010839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10840$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010841
10842fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10845$as_echo_n "checking for epoll_create1... " >&6; }
10846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10847/* end confdefs.h. */
10848#include <sys/epoll.h>
10849int
10850main ()
10851{
10852void *x=epoll_create1
10853 ;
10854 return 0;
10855}
10856_ACEOF
10857if ac_fn_c_try_compile "$LINENO"; then :
10858
10859$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10860
10861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10862$as_echo "yes" >&6; }
10863else
10864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10865$as_echo "no" >&6; }
10866
10867fi
10868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10870$as_echo_n "checking for kqueue... " >&6; }
10871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010872/* end confdefs.h. */
10873
10874#include <sys/types.h>
10875#include <sys/event.h>
10876
10877int
10878main ()
10879{
10880int x=kqueue()
10881 ;
10882 return 0;
10883}
10884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010885if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010886
Matthias Kloseb9621712010-04-24 17:59:49 +000010887$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010888
Matthias Kloseb159a552010-04-25 21:00:44 +000010889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010890$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010891else
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10893$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010894
10895fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10898$as_echo_n "checking for prlimit... " >&6; }
10899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10900/* end confdefs.h. */
10901
10902#include <sys/time.h>
10903#include <sys/resource.h>
10904
10905int
10906main ()
10907{
10908void *x=prlimit
10909 ;
10910 return 0;
10911}
10912_ACEOF
10913if ac_fn_c_try_compile "$LINENO"; then :
10914
10915$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10916
10917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10918$as_echo "yes" >&6; }
10919else
10920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10921$as_echo "no" >&6; }
10922
10923fi
10924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10925
Martin v. Löwisd5843682002-11-21 20:41:28 +000010926# On some systems (eg. FreeBSD 5), we would find a definition of the
10927# functions ctermid_r, setgroups in the library, but no prototype
10928# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10929# address to avoid compiler warnings and potential miscompilations
10930# because of the missing prototypes.
10931
Matthias Kloseb9621712010-04-24 17:59:49 +000010932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10933$as_echo_n "checking for ctermid_r... " >&6; }
10934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010935/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010936
Martin v. Löwisd5843682002-11-21 20:41:28 +000010937#include <stdio.h>
10938
Martin v. Löwisd5843682002-11-21 20:41:28 +000010939int
10940main ()
10941{
10942void* p = ctermid_r
10943 ;
10944 return 0;
10945}
10946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010947if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010948
Matthias Kloseb9621712010-04-24 17:59:49 +000010949$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010950
Matthias Kloseb159a552010-04-25 21:00:44 +000010951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010952$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010953else
Matthias Kloseb9621712010-04-24 17:59:49 +000010954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10955$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010956
10957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10959
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10961$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010962if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010963 $as_echo_n "(cached) " >&6
10964else
10965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010966/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010967#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010968int
10969main ()
10970{
10971void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010972
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010973 ;
10974 return 0;
10975}
10976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010977if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010978 ac_cv_flock_decl=yes
10979else
10980 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010981
10982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010984
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010985fi
10986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10987$as_echo "$ac_cv_flock_decl" >&6; }
10988if test "x${ac_cv_flock_decl}" = xyes; then
10989 for ac_func in flock
10990do :
10991 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010992if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010993 cat >>confdefs.h <<_ACEOF
10994#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010995_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010996
Antoine Pitroua3000072010-09-07 14:52:42 +000010997else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010999$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011000if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011001 $as_echo_n "(cached) " >&6
11002else
11003 ac_check_lib_save_LIBS=$LIBS
11004LIBS="-lbsd $LIBS"
11005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11006/* end confdefs.h. */
11007
11008/* Override any GCC internal prototype to avoid an error.
11009 Use char because int might match the return type of a GCC
11010 builtin and then its argument prototype would still apply. */
11011#ifdef __cplusplus
11012extern "C"
11013#endif
11014char flock ();
11015int
11016main ()
11017{
11018return flock ();
11019 ;
11020 return 0;
11021}
11022_ACEOF
11023if ac_fn_c_try_link "$LINENO"; then :
11024 ac_cv_lib_bsd_flock=yes
11025else
11026 ac_cv_lib_bsd_flock=no
11027fi
11028rm -f core conftest.err conftest.$ac_objext \
11029 conftest$ac_exeext conftest.$ac_ext
11030LIBS=$ac_check_lib_save_LIBS
11031fi
11032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11033$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011034if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011035 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011036
11037
11038$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11039
11040
11041fi
11042
11043
11044fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011045done
11046
Antoine Pitroua3000072010-09-07 14:52:42 +000011047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011048
Matthias Kloseb9621712010-04-24 17:59:49 +000011049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11050$as_echo_n "checking for getpagesize... " >&6; }
11051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011052/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011053
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011054#include <unistd.h>
11055
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011056int
11057main ()
11058{
11059void* p = getpagesize
11060 ;
11061 return 0;
11062}
11063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011064if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011065
Matthias Kloseb9621712010-04-24 17:59:49 +000011066$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011067
Matthias Kloseb159a552010-04-25 21:00:44 +000011068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011069$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011070else
Matthias Kloseb9621712010-04-24 17:59:49 +000011071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11072$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011073
11074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011076
Victor Stinner984890f2011-11-24 13:53:38 +010011077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11078$as_echo_n "checking for broken unsetenv... " >&6; }
11079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11080/* end confdefs.h. */
11081
11082#include <stdlib.h>
11083
11084int
11085main ()
11086{
11087int res = unsetenv("DUMMY")
11088 ;
11089 return 0;
11090}
11091_ACEOF
11092if ac_fn_c_try_compile "$LINENO"; then :
11093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11094$as_echo "no" >&6; }
11095else
11096
11097$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11098
11099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11100$as_echo "yes" >&6; }
11101
11102fi
11103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11104
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011105for ac_prog in true
11106do
11107 # Extract the first word of "$ac_prog", so it can be a program name with args.
11108set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11110$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011111if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011112 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011113else
11114 if test -n "$TRUE"; then
11115 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11116else
11117as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11118for as_dir in $PATH
11119do
11120 IFS=$as_save_IFS
11121 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011122 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011123 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011124 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011125 $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 +000011126 break 2
11127 fi
11128done
Matthias Kloseb9621712010-04-24 17:59:49 +000011129 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011130IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011131
11132fi
11133fi
11134TRUE=$ac_cv_prog_TRUE
11135if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11137$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011138else
Matthias Kloseb9621712010-04-24 17:59:49 +000011139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11140$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011141fi
11142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011143
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011144 test -n "$TRUE" && break
11145done
11146test -n "$TRUE" || TRUE="/bin/true"
11147
11148
Matthias Kloseb9621712010-04-24 17:59:49 +000011149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11150$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011151if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011152 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011153else
11154 ac_check_lib_save_LIBS=$LIBS
11155LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011157/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011158
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011159/* Override any GCC internal prototype to avoid an error.
11160 Use char because int might match the return type of a GCC
11161 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011162#ifdef __cplusplus
11163extern "C"
11164#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011165char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011166int
11167main ()
11168{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011169return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011170 ;
11171 return 0;
11172}
11173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011174if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011175 ac_cv_lib_c_inet_aton=yes
11176else
Matthias Kloseb9621712010-04-24 17:59:49 +000011177 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011178fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011179rm -f core conftest.err conftest.$ac_objext \
11180 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011181LIBS=$ac_check_lib_save_LIBS
11182fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11184$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011185if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011186 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011187else
Matthias Kloseb9621712010-04-24 17:59:49 +000011188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11189$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011190if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011191 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011192else
11193 ac_check_lib_save_LIBS=$LIBS
11194LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011196/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011198/* Override any GCC internal prototype to avoid an error.
11199 Use char because int might match the return type of a GCC
11200 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011201#ifdef __cplusplus
11202extern "C"
11203#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011204char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011205int
11206main ()
11207{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011208return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011209 ;
11210 return 0;
11211}
11212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011213if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011214 ac_cv_lib_resolv_inet_aton=yes
11215else
Matthias Kloseb9621712010-04-24 17:59:49 +000011216 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011217fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011218rm -f core conftest.err conftest.$ac_objext \
11219 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011220LIBS=$ac_check_lib_save_LIBS
11221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11223$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011224if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011225 cat >>confdefs.h <<_ACEOF
11226#define HAVE_LIBRESOLV 1
11227_ACEOF
11228
11229 LIBS="-lresolv $LIBS"
11230
11231fi
11232
11233
11234fi
11235
11236
Christian Heimesd0764e22007-12-04 15:00:33 +000011237# On Tru64, chflags seems to be present, but calling it will
11238# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11240$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011241if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011242 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011243else
Matthias Kloseb9621712010-04-24 17:59:49 +000011244 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011245 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011246else
Matthias Kloseb9621712010-04-24 17:59:49 +000011247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011248/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011249
Christian Heimesd0764e22007-12-04 15:00:33 +000011250#include <sys/stat.h>
11251#include <unistd.h>
11252int main(int argc, char*argv[])
11253{
11254 if(chflags(argv[0], 0) != 0)
11255 return 1;
11256 return 0;
11257}
Ned Deily3eb67d52011-06-28 00:00:28 -070011258
Christian Heimesd0764e22007-12-04 15:00:33 +000011259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011260if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011261 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011262else
Matthias Kloseb9621712010-04-24 17:59:49 +000011263 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011265rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11266 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011267fi
11268
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011269
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11272$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011273if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011274 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011275if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011276 ac_cv_have_chflags="yes"
11277else
11278 ac_cv_have_chflags="no"
11279fi
11280
11281fi
11282if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011283
Matthias Kloseb9621712010-04-24 17:59:49 +000011284$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011285
11286fi
11287
Matthias Kloseb9621712010-04-24 17:59:49 +000011288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11289$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011290if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011291 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011292else
Matthias Kloseb9621712010-04-24 17:59:49 +000011293 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011294 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011295else
Matthias Kloseb9621712010-04-24 17:59:49 +000011296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011297/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011298
Christian Heimesd0764e22007-12-04 15:00:33 +000011299#include <sys/stat.h>
11300#include <unistd.h>
11301int main(int argc, char*argv[])
11302{
11303 if(lchflags(argv[0], 0) != 0)
11304 return 1;
11305 return 0;
11306}
Ned Deily3eb67d52011-06-28 00:00:28 -070011307
Christian Heimesd0764e22007-12-04 15:00:33 +000011308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011309if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011310 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011311else
Matthias Kloseb9621712010-04-24 17:59:49 +000011312 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011314rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11315 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011316fi
11317
11318
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011319fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11321$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011322if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011323 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011324if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011325 ac_cv_have_lchflags="yes"
11326else
11327 ac_cv_have_lchflags="no"
11328fi
11329
11330fi
11331if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011332
Matthias Kloseb9621712010-04-24 17:59:49 +000011333$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011334
11335fi
11336
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011337case $ac_sys_system/$ac_sys_release in
11338Darwin/*)
11339 _CUR_CFLAGS="${CFLAGS}"
11340 _CUR_LDFLAGS="${LDFLAGS}"
11341 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11342 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11343 ;;
11344esac
11345
Matthias Kloseb9621712010-04-24 17:59:49 +000011346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11347$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011348if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011349 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011350else
11351 ac_check_lib_save_LIBS=$LIBS
11352LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011354/* end confdefs.h. */
11355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011356/* Override any GCC internal prototype to avoid an error.
11357 Use char because int might match the return type of a GCC
11358 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011359#ifdef __cplusplus
11360extern "C"
11361#endif
11362char inflateCopy ();
11363int
11364main ()
11365{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011366return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011367 ;
11368 return 0;
11369}
11370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011371if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011372 ac_cv_lib_z_inflateCopy=yes
11373else
Matthias Kloseb9621712010-04-24 17:59:49 +000011374 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011375fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011376rm -f core conftest.err conftest.$ac_objext \
11377 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011378LIBS=$ac_check_lib_save_LIBS
11379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11381$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011382if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011383
Matthias Kloseb9621712010-04-24 17:59:49 +000011384$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011385
11386fi
11387
11388
11389case $ac_sys_system/$ac_sys_release in
11390Darwin/*)
11391 CFLAGS="${_CUR_CFLAGS}"
11392 LDFLAGS="${_CUR_LDFLAGS}"
11393 ;;
11394esac
11395
Matthias Kloseb9621712010-04-24 17:59:49 +000011396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11397$as_echo_n "checking for hstrerror... " >&6; }
11398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011399/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011400
Martin v. Löwise9416172003-05-03 10:12:45 +000011401#include <netdb.h>
11402
Martin v. Löwise9416172003-05-03 10:12:45 +000011403int
11404main ()
11405{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011406void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011407 ;
11408 return 0;
11409}
11410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011411if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011412
Matthias Kloseb9621712010-04-24 17:59:49 +000011413$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011414
Matthias Kloseb159a552010-04-25 21:00:44 +000011415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011416$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011417else
Matthias Kloseb9621712010-04-24 17:59:49 +000011418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11419$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011420
11421fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011422rm -f core conftest.err conftest.$ac_objext \
11423 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011424
Matthias Kloseb9621712010-04-24 17:59:49 +000011425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11426$as_echo_n "checking for inet_aton... " >&6; }
11427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011428/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011429
Martin v. Löwis86d66262006-02-17 08:40:11 +000011430#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011431#include <sys/socket.h>
11432#include <netinet/in.h>
11433#include <arpa/inet.h>
11434
Martin v. Löwise9416172003-05-03 10:12:45 +000011435int
11436main ()
11437{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011438void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011439 ;
11440 return 0;
11441}
11442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011443if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011444
Matthias Kloseb9621712010-04-24 17:59:49 +000011445$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011446
Matthias Kloseb159a552010-04-25 21:00:44 +000011447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011448$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011449else
Matthias Kloseb9621712010-04-24 17:59:49 +000011450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11451$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011452
11453fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011454rm -f core conftest.err conftest.$ac_objext \
11455 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011456
Matthias Kloseb9621712010-04-24 17:59:49 +000011457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11458$as_echo_n "checking for inet_pton... " >&6; }
11459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011460/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011461
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011462#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011463#include <sys/socket.h>
11464#include <netinet/in.h>
11465#include <arpa/inet.h>
11466
Martin v. Löwise9416172003-05-03 10:12:45 +000011467int
11468main ()
11469{
11470void* p = inet_pton
11471 ;
11472 return 0;
11473}
11474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011475if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011476
Matthias Kloseb9621712010-04-24 17:59:49 +000011477$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011478
Matthias Kloseb159a552010-04-25 21:00:44 +000011479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011480$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011481else
Matthias Kloseb9621712010-04-24 17:59:49 +000011482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11483$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011484
11485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011487
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011488# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11490$as_echo_n "checking for setgroups... " >&6; }
11491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011492/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011493
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011494#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011495#ifdef HAVE_GRP_H
11496#include <grp.h>
11497#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011498
Martin v. Löwisd5843682002-11-21 20:41:28 +000011499int
11500main ()
11501{
11502void* p = setgroups
11503 ;
11504 return 0;
11505}
11506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011507if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011508
Matthias Kloseb9621712010-04-24 17:59:49 +000011509$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011510
Matthias Kloseb159a552010-04-25 21:00:44 +000011511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011512$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011513else
Matthias Kloseb9621712010-04-24 17:59:49 +000011514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11515$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011516
11517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011519
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011520# check for openpty and forkpty
11521
11522for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011523do :
11524 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011525if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011526 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011527#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011528_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011529
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011530else
Matthias Kloseb9621712010-04-24 17:59:49 +000011531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11532$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011533if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011534 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011535else
Martin v. Löwis11437992002-04-12 09:54:03 +000011536 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011537LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011539/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011540
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011541/* Override any GCC internal prototype to avoid an error.
11542 Use char because int might match the return type of a GCC
11543 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011544#ifdef __cplusplus
11545extern "C"
11546#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011547char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011548int
11549main ()
11550{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011551return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011552 ;
11553 return 0;
11554}
11555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011556if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011557 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011558else
Matthias Kloseb9621712010-04-24 17:59:49 +000011559 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011560fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011561rm -f core conftest.err conftest.$ac_objext \
11562 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011563LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11566$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011567if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011568 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011569 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011570else
Matthias Kloseb9621712010-04-24 17:59:49 +000011571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11572$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011573if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011574 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011575else
11576 ac_check_lib_save_LIBS=$LIBS
11577LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011579/* end confdefs.h. */
11580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011581/* Override any GCC internal prototype to avoid an error.
11582 Use char because int might match the return type of a GCC
11583 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011584#ifdef __cplusplus
11585extern "C"
11586#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011587char openpty ();
11588int
11589main ()
11590{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011591return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011592 ;
11593 return 0;
11594}
11595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011596if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011597 ac_cv_lib_bsd_openpty=yes
11598else
Matthias Kloseb9621712010-04-24 17:59:49 +000011599 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011600fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011601rm -f core conftest.err conftest.$ac_objext \
11602 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011603LIBS=$ac_check_lib_save_LIBS
11604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11606$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011607if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011608 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011609 LIBS="$LIBS -lbsd"
11610fi
11611
11612
11613fi
11614
Fred Drake8cef4cf2000-06-28 16:40:38 +000011615
11616fi
11617done
11618
11619for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011620do :
11621 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011622if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011623 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011624#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011625_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011626
Fred Drake8cef4cf2000-06-28 16:40:38 +000011627else
Matthias Kloseb9621712010-04-24 17:59:49 +000011628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11629$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011630if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011631 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011632else
Martin v. Löwis11437992002-04-12 09:54:03 +000011633 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011634LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011638/* Override any GCC internal prototype to avoid an error.
11639 Use char because int might match the return type of a GCC
11640 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011641#ifdef __cplusplus
11642extern "C"
11643#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011644char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011645int
11646main ()
11647{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011648return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011649 ;
11650 return 0;
11651}
11652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011653if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011654 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011655else
Matthias Kloseb9621712010-04-24 17:59:49 +000011656 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011657fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011658rm -f core conftest.err conftest.$ac_objext \
11659 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011660LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11663$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011664if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011665 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011666 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011667else
Matthias Kloseb9621712010-04-24 17:59:49 +000011668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11669$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011670if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011671 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011672else
11673 ac_check_lib_save_LIBS=$LIBS
11674LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011676/* end confdefs.h. */
11677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011678/* Override any GCC internal prototype to avoid an error.
11679 Use char because int might match the return type of a GCC
11680 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011681#ifdef __cplusplus
11682extern "C"
11683#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011684char forkpty ();
11685int
11686main ()
11687{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011688return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011689 ;
11690 return 0;
11691}
11692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011693if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011694 ac_cv_lib_bsd_forkpty=yes
11695else
Matthias Kloseb9621712010-04-24 17:59:49 +000011696 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011698rm -f core conftest.err conftest.$ac_objext \
11699 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011700LIBS=$ac_check_lib_save_LIBS
11701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11703$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011704if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011705 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011706 LIBS="$LIBS -lbsd"
11707fi
11708
11709
11710fi
11711
Fred Drake8cef4cf2000-06-28 16:40:38 +000011712
11713fi
11714done
11715
Jack Jansendd19cf82001-12-06 22:36:17 +000011716
Christian Heimesb186d002008-03-18 15:15:01 +000011717# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011718for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011719do :
11720 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011721if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011722 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011723#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011724_ACEOF
11725
11726fi
11727done
11728
11729
Michael W. Hudson54241132001-12-07 15:38:26 +000011730# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011731for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011732do :
11733 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11734ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011735if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011736 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011737#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011738_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011739
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011740fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011741done
11742
Michael W. Hudson54241132001-12-07 15:38:26 +000011743
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011744ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011745if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011746 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011747
Martin v. Löwis1142de32002-03-29 16:28:31 +000011748else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011749 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011750 *" dup2.$ac_objext "* ) ;;
11751 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011752 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011753esac
11754
Martin v. Löwis1142de32002-03-29 16:28:31 +000011755fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011756
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011757ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011758if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011759 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11760
11761else
11762 case " $LIBOBJS " in
11763 *" strdup.$ac_objext "* ) ;;
11764 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11765 ;;
11766esac
11767
11768fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011769
11770
11771for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011772do :
11773 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011774if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011775 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011776#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011779/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011780#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011781int
11782main ()
11783{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011784getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011785 ;
11786 return 0;
11787}
11788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011789if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011790
Matthias Kloseb9621712010-04-24 17:59:49 +000011791$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011792
Guido van Rossum627b2d71993-12-24 10:39:16 +000011793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011795
Guido van Rossum627b2d71993-12-24 10:39:16 +000011796fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011797done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011798
Jack Jansen150753c2003-03-29 22:07:47 +000011799for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011800do :
11801 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011802if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011803 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011804#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011807/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011808#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011809int
11810main ()
11811{
11812setpgrp(0,0);
11813 ;
11814 return 0;
11815}
11816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011817if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011818
Matthias Kloseb9621712010-04-24 17:59:49 +000011819$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011820
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011823
11824fi
11825done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011826
Thomas Wouters3a584202000-08-05 23:28:51 +000011827for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011828do :
11829 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011830if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011831 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011832#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011835/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011836#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011837int
11838main ()
11839{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011840gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011841 ;
11842 return 0;
11843}
11844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011845if ac_fn_c_try_compile "$LINENO"; then :
11846
Guido van Rossum627b2d71993-12-24 10:39:16 +000011847else
Skip Montanaro6dead952003-09-25 14:50:04 +000011848
Matthias Kloseb9621712010-04-24 17:59:49 +000011849$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011850
Martin v. Löwis11437992002-04-12 09:54:03 +000011851
Guido van Rossum627b2d71993-12-24 10:39:16 +000011852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011854
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011855fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011856done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011857
Michael W. Hudson54241132001-12-07 15:38:26 +000011858
Victor Stinnere0be4232011-10-25 13:06:09 +020011859for ac_func in clock_gettime
11860do :
11861 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11862if test "x$ac_cv_func_clock_gettime" = xyes; then :
11863 cat >>confdefs.h <<_ACEOF
11864#define HAVE_CLOCK_GETTIME 1
11865_ACEOF
11866
11867else
11868
11869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11870$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11871if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11872 $as_echo_n "(cached) " >&6
11873else
11874 ac_check_lib_save_LIBS=$LIBS
11875LIBS="-lrt $LIBS"
11876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11877/* end confdefs.h. */
11878
11879/* Override any GCC internal prototype to avoid an error.
11880 Use char because int might match the return type of a GCC
11881 builtin and then its argument prototype would still apply. */
11882#ifdef __cplusplus
11883extern "C"
11884#endif
11885char clock_gettime ();
11886int
11887main ()
11888{
11889return clock_gettime ();
11890 ;
11891 return 0;
11892}
11893_ACEOF
11894if ac_fn_c_try_link "$LINENO"; then :
11895 ac_cv_lib_rt_clock_gettime=yes
11896else
11897 ac_cv_lib_rt_clock_gettime=no
11898fi
11899rm -f core conftest.err conftest.$ac_objext \
11900 conftest$ac_exeext conftest.$ac_ext
11901LIBS=$ac_check_lib_save_LIBS
11902fi
11903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11904$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11905if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11906
11907 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11908
11909
11910$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11911
11912
11913fi
11914
11915
11916fi
11917done
11918
11919
11920for ac_func in clock_getres
11921do :
11922 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11923if test "x$ac_cv_func_clock_getres" = xyes; then :
11924 cat >>confdefs.h <<_ACEOF
11925#define HAVE_CLOCK_GETRES 1
11926_ACEOF
11927
11928else
11929
11930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11931$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11932if ${ac_cv_lib_rt_clock_getres+:} false; then :
11933 $as_echo_n "(cached) " >&6
11934else
11935 ac_check_lib_save_LIBS=$LIBS
11936LIBS="-lrt $LIBS"
11937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11938/* end confdefs.h. */
11939
11940/* Override any GCC internal prototype to avoid an error.
11941 Use char because int might match the return type of a GCC
11942 builtin and then its argument prototype would still apply. */
11943#ifdef __cplusplus
11944extern "C"
11945#endif
11946char clock_getres ();
11947int
11948main ()
11949{
11950return clock_getres ();
11951 ;
11952 return 0;
11953}
11954_ACEOF
11955if ac_fn_c_try_link "$LINENO"; then :
11956 ac_cv_lib_rt_clock_getres=yes
11957else
11958 ac_cv_lib_rt_clock_getres=no
11959fi
11960rm -f core conftest.err conftest.$ac_objext \
11961 conftest$ac_exeext conftest.$ac_ext
11962LIBS=$ac_check_lib_save_LIBS
11963fi
11964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11965$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11966if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11967
11968 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11969
11970
11971fi
11972
11973
11974fi
11975done
11976
11977
Matthias Kloseb9621712010-04-24 17:59:49 +000011978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11979$as_echo_n "checking for major... " >&6; }
11980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011981/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011982
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011983#if defined(MAJOR_IN_MKDEV)
11984#include <sys/mkdev.h>
11985#elif defined(MAJOR_IN_SYSMACROS)
11986#include <sys/sysmacros.h>
11987#else
11988#include <sys/types.h>
11989#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011990
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011991int
11992main ()
11993{
11994
11995 makedev(major(0),minor(0));
11996
11997 ;
11998 return 0;
11999}
12000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012001if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012002
12003
Matthias Kloseb9621712010-04-24 17:59:49 +000012004$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012005
Matthias Kloseb9621712010-04-24 17:59:49 +000012006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12007$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012008
12009else
Skip Montanaro6dead952003-09-25 14:50:04 +000012010
Matthias Kloseb9621712010-04-24 17:59:49 +000012011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12012$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012013
12014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012015rm -f core conftest.err conftest.$ac_objext \
12016 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012017
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012018# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012019# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12021$as_echo_n "checking for getaddrinfo... " >&6; }
12022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012023/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012024
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012025#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012026#include <sys/socket.h>
12027#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012028#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012029
Martin v. Löwis11437992002-04-12 09:54:03 +000012030int
12031main ()
12032{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012033getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012034 ;
12035 return 0;
12036}
12037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012038if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012039 have_getaddrinfo=yes
12040else
Matthias Kloseb9621712010-04-24 17:59:49 +000012041 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012042fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012043rm -f core conftest.err conftest.$ac_objext \
12044 conftest$ac_exeext conftest.$ac_ext
12045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12046$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012047if test $have_getaddrinfo = yes
12048then
Matthias Kloseb9621712010-04-24 17:59:49 +000012049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12050$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012051 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012052 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012053else
Matthias Kloseb9621712010-04-24 17:59:49 +000012054 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012055
12056if test "${enable_ipv6+set}" = set; then
12057 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12058else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012059 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012060fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012061else
Matthias Kloseb9621712010-04-24 17:59:49 +000012062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012063/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012064
Stefan Krah19c21392012-11-22 23:47:32 +010012065#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012066#include <sys/types.h>
12067#include <netdb.h>
12068#include <string.h>
12069#include <sys/socket.h>
12070#include <netinet/in.h>
12071
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012072int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012073{
12074 int passive, gaierr, inet4 = 0, inet6 = 0;
12075 struct addrinfo hints, *ai, *aitop;
12076 char straddr[INET6_ADDRSTRLEN], strport[16];
12077
12078 for (passive = 0; passive <= 1; passive++) {
12079 memset(&hints, 0, sizeof(hints));
12080 hints.ai_family = AF_UNSPEC;
12081 hints.ai_flags = passive ? AI_PASSIVE : 0;
12082 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012083 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012084 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12085 (void)gai_strerror(gaierr);
12086 goto bad;
12087 }
12088 for (ai = aitop; ai; ai = ai->ai_next) {
12089 if (ai->ai_addr == NULL ||
12090 ai->ai_addrlen == 0 ||
12091 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12092 straddr, sizeof(straddr), strport, sizeof(strport),
12093 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12094 goto bad;
12095 }
12096 switch (ai->ai_family) {
12097 case AF_INET:
12098 if (strcmp(strport, "54321") != 0) {
12099 goto bad;
12100 }
12101 if (passive) {
12102 if (strcmp(straddr, "0.0.0.0") != 0) {
12103 goto bad;
12104 }
12105 } else {
12106 if (strcmp(straddr, "127.0.0.1") != 0) {
12107 goto bad;
12108 }
12109 }
12110 inet4++;
12111 break;
12112 case AF_INET6:
12113 if (strcmp(strport, "54321") != 0) {
12114 goto bad;
12115 }
12116 if (passive) {
12117 if (strcmp(straddr, "::") != 0) {
12118 goto bad;
12119 }
12120 } else {
12121 if (strcmp(straddr, "::1") != 0) {
12122 goto bad;
12123 }
12124 }
12125 inet6++;
12126 break;
12127 case AF_UNSPEC:
12128 goto bad;
12129 break;
12130 default:
12131 /* another family support? */
12132 break;
12133 }
12134 }
12135 }
12136
12137 if (!(inet4 == 0 || inet4 == 2))
12138 goto bad;
12139 if (!(inet6 == 0 || inet6 == 2))
12140 goto bad;
12141
12142 if (aitop)
12143 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012144 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012145
12146 bad:
12147 if (aitop)
12148 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012149 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012150}
12151
Martin v. Löwis11437992002-04-12 09:54:03 +000012152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012153if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012154 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012155else
Matthias Kloseb9621712010-04-24 17:59:49 +000012156 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012157fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12159 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012160fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012161
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012162fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012163
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012165
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12167$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12168
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012169if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012170then
12171 if test $ipv6 = yes
12172 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012173 echo 'Fatal: You must get working getaddrinfo() function.'
12174 echo ' or you can specify "--disable-ipv6"'.
12175 exit 1
12176 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012177else
Martin v. Löwis11437992002-04-12 09:54:03 +000012178
Matthias Kloseb9621712010-04-24 17:59:49 +000012179$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012180
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012181fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012182
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012183for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012184do :
12185 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012186if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012187 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012188#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012189_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012190
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012191fi
12192done
12193
Michael W. Hudson54241132001-12-07 15:38:26 +000012194
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012195# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12197$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012198if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012200else
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012202/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012203#include <sys/types.h>
12204#include <sys/time.h>
12205#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012206
Martin v. Löwis11437992002-04-12 09:54:03 +000012207int
12208main ()
12209{
12210if ((struct tm *) 0)
12211return 0;
12212 ;
12213 return 0;
12214}
12215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012216if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012217 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012218else
Matthias Kloseb9621712010-04-24 17:59:49 +000012219 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012222fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12224$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012225if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012226
Matthias Kloseb9621712010-04-24 17:59:49 +000012227$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012228
12229fi
12230
Matthias Kloseb9621712010-04-24 17:59:49 +000012231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12232$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012233if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012234 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012235else
Matthias Kloseb9621712010-04-24 17:59:49 +000012236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012237/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012238#include <sys/types.h>
12239#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012240
Martin v. Löwis11437992002-04-12 09:54:03 +000012241int
12242main ()
12243{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012244struct tm tm;
12245 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012246 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012247 ;
12248 return 0;
12249}
12250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012251if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012252 ac_cv_struct_tm=time.h
12253else
Matthias Kloseb9621712010-04-24 17:59:49 +000012254 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012257fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12259$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012260if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012261
Matthias Kloseb9621712010-04-24 17:59:49 +000012262$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012263
12264fi
12265
Matthias Kloseb9621712010-04-24 17:59:49 +000012266ac_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 +000012267#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012268
Matthias Kloseb9621712010-04-24 17:59:49 +000012269"
Victor Stinnere0be4232011-10-25 13:06:09 +020012270if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012271
12272cat >>confdefs.h <<_ACEOF
12273#define HAVE_STRUCT_TM_TM_ZONE 1
12274_ACEOF
12275
12276
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012277fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012278
Martin v. Löwis11437992002-04-12 09:54:03 +000012279if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12280
Matthias Kloseb9621712010-04-24 17:59:49 +000012281$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012282
12283else
Matthias Kloseb9621712010-04-24 17:59:49 +000012284 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12285"
Victor Stinnere0be4232011-10-25 13:06:09 +020012286if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012287 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012288else
Matthias Kloseb9621712010-04-24 17:59:49 +000012289 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012290fi
12291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012292cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012293#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012294_ACEOF
12295
Matthias Kloseb9621712010-04-24 17:59:49 +000012296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12297$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012298if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012299 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012300else
Matthias Kloseb9621712010-04-24 17:59:49 +000012301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012302/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012303#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012304#if !HAVE_DECL_TZNAME
12305extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012306#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012307
Martin v. Löwis11437992002-04-12 09:54:03 +000012308int
12309main ()
12310{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012311return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012312 ;
12313 return 0;
12314}
12315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012316if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012317 ac_cv_var_tzname=yes
12318else
Matthias Kloseb9621712010-04-24 17:59:49 +000012319 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012320fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012321rm -f core conftest.err conftest.$ac_objext \
12322 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012323fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12325$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012326 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012327
Matthias Kloseb9621712010-04-24 17:59:49 +000012328$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012329
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012330 fi
12331fi
12332
Matthias Kloseb9621712010-04-24 17:59:49 +000012333ac_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 +020012334if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012335
12336cat >>confdefs.h <<_ACEOF
12337#define HAVE_STRUCT_STAT_ST_RDEV 1
12338_ACEOF
12339
12340
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012341fi
12342
Matthias Kloseb9621712010-04-24 17:59:49 +000012343ac_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 +020012344if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012345
Martin v. Löwis11437992002-04-12 09:54:03 +000012346cat >>confdefs.h <<_ACEOF
12347#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12348_ACEOF
12349
12350
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012351fi
12352
Matthias Kloseb9621712010-04-24 17:59:49 +000012353ac_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 +020012354if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012355
12356cat >>confdefs.h <<_ACEOF
12357#define HAVE_STRUCT_STAT_ST_FLAGS 1
12358_ACEOF
12359
12360
12361fi
12362
Matthias Kloseb9621712010-04-24 17:59:49 +000012363ac_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 +020012364if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012365
12366cat >>confdefs.h <<_ACEOF
12367#define HAVE_STRUCT_STAT_ST_GEN 1
12368_ACEOF
12369
12370
12371fi
12372
Matthias Kloseb9621712010-04-24 17:59:49 +000012373ac_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 +020012374if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012375
12376cat >>confdefs.h <<_ACEOF
12377#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12378_ACEOF
12379
12380
12381fi
12382
Matthias Kloseb9621712010-04-24 17:59:49 +000012383ac_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 +020012384if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012385
Martin v. Löwis11437992002-04-12 09:54:03 +000012386cat >>confdefs.h <<_ACEOF
12387#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12388_ACEOF
12389
12390
Matthias Kloseb9621712010-04-24 17:59:49 +000012391$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012392
12393else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012394 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012395 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012396 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12397 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012398esac
12399
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012400fi
12401
Michael W. Hudson54241132001-12-07 15:38:26 +000012402
Martin v. Löwis11437992002-04-12 09:54:03 +000012403
Matthias Kloseb9621712010-04-24 17:59:49 +000012404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12405$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012406if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012407 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012408else
Matthias Kloseb159a552010-04-25 21:00:44 +000012409
Matthias Kloseb9621712010-04-24 17:59:49 +000012410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012411/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012412#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012413int
12414main ()
12415{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012416return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012417 ;
12418 return 0;
12419}
12420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012421if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012422 ac_cv_header_time_altzone=yes
12423else
Matthias Kloseb9621712010-04-24 17:59:49 +000012424 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012428fi
12429
Matthias Kloseb9621712010-04-24 17:59:49 +000012430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12431$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012432if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012433
Matthias Kloseb9621712010-04-24 17:59:49 +000012434$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012435
12436fi
12437
Guido van Rossumda88dad1995-01-26 00:46:29 +000012438was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12440$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012442/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012443
12444#include <sys/types.h>
12445#include <sys/select.h>
12446#include <sys/time.h>
12447
Martin v. Löwis11437992002-04-12 09:54:03 +000012448int
12449main ()
12450{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012451;
Martin v. Löwis11437992002-04-12 09:54:03 +000012452 ;
12453 return 0;
12454}
12455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012456if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012457
12458
Matthias Kloseb9621712010-04-24 17:59:49 +000012459$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012460
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012461 was_it_defined=yes
12462
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12466$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012467
Matthias Kloseb9621712010-04-24 17:59:49 +000012468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12469$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012470if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012471 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012472else
Matthias Kloseb9621712010-04-24 17:59:49 +000012473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012474/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012475#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012476int
12477main ()
12478{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012479struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012480 ;
12481 return 0;
12482}
12483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012484if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012485 ac_cv_struct_addrinfo=yes
12486else
Matthias Kloseb9621712010-04-24 17:59:49 +000012487 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12490fi
12491
Matthias Kloseb9621712010-04-24 17:59:49 +000012492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12493$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012494if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012495
Matthias Kloseb9621712010-04-24 17:59:49 +000012496$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012497
12498fi
12499
Matthias Kloseb9621712010-04-24 17:59:49 +000012500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12501$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012502if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012503 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012504else
Matthias Kloseb9621712010-04-24 17:59:49 +000012505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012506/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012507
12508# include <sys/types.h>
12509# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012510int
12511main ()
12512{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012513struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012514 ;
12515 return 0;
12516}
12517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012518if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012519 ac_cv_struct_sockaddr_storage=yes
12520else
Matthias Kloseb9621712010-04-24 17:59:49 +000012521 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12524fi
12525
Matthias Kloseb9621712010-04-24 17:59:49 +000012526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12527$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012528if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012529
Matthias Kloseb9621712010-04-24 17:59:49 +000012530$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012531
12532fi
12533
Guido van Rossum627b2d71993-12-24 10:39:16 +000012534# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012535
Matthias Kloseb9621712010-04-24 17:59:49 +000012536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12537$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012538if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012539 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012540else
Matthias Kloseb9621712010-04-24 17:59:49 +000012541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012543$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012544int
12545main ()
12546{
12547static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012548test_array [0] = 0;
12549return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012550
12551 ;
12552 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012553}
Martin v. Löwis11437992002-04-12 09:54:03 +000012554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012555if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012556 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012557else
Matthias Kloseb9621712010-04-24 17:59:49 +000012558 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012561fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12563$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012564if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012565 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012566
12567fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012568
Matthias Kloseb9621712010-04-24 17:59:49 +000012569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12570$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012571if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012572 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012573else
Matthias Kloseb9621712010-04-24 17:59:49 +000012574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012575/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012576
Martin v. Löwis11437992002-04-12 09:54:03 +000012577int
12578main ()
12579{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012580
Martin v. Löwis11437992002-04-12 09:54:03 +000012581#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012582 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012583 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012584 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012585 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012586 char const *const *pcpcc;
12587 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012588 /* NEC SVR4.0.2 mips cc rejects this. */
12589 struct point {int x, y;};
12590 static struct point const zero = {0,0};
12591 /* AIX XL C 1.02.0.0 rejects this.
12592 It does not let you subtract one const X* pointer from another in
12593 an arm of an if-expression whose if-part is not a constant
12594 expression */
12595 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012596 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012597 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012598 ++pcpcc;
12599 ppc = (char**) pcpcc;
12600 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012601 { /* SCO 3.2v4 cc rejects this sort of thing. */
12602 char tx;
12603 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012604 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012605
Martin v. Löwis11437992002-04-12 09:54:03 +000012606 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012607 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012608 }
12609 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12610 int x[] = {25, 17};
12611 const int *foo = &x[0];
12612 ++foo;
12613 }
12614 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12615 typedef const int *iptr;
12616 iptr p = 0;
12617 ++p;
12618 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012619 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012620 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012621 struct s { int j; const int *ap[3]; } bx;
12622 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012623 }
12624 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12625 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012626 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012627 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012628 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012629#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012630
Martin v. Löwis11437992002-04-12 09:54:03 +000012631 ;
12632 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012633}
Martin v. Löwis11437992002-04-12 09:54:03 +000012634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012635if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012636 ac_cv_c_const=yes
12637else
Matthias Kloseb9621712010-04-24 17:59:49 +000012638 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012639fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012641fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12643$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012644if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012645
Matthias Kloseb9621712010-04-24 17:59:49 +000012646$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012647
12648fi
12649
Michael W. Hudson54241132001-12-07 15:38:26 +000012650
Guido van Rossumda88dad1995-01-26 00:46:29 +000012651works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12653$as_echo_n "checking for working volatile... " >&6; }
12654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012655/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012656
Martin v. Löwis11437992002-04-12 09:54:03 +000012657int
12658main ()
12659{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012660volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012661 ;
12662 return 0;
12663}
12664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012665if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012666 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012667else
Skip Montanaro6dead952003-09-25 14:50:04 +000012668
Matthias Kloseb9621712010-04-24 17:59:49 +000012669$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012670
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012671
Guido van Rossum627b2d71993-12-24 10:39:16 +000012672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12675$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012676
Guido van Rossumda88dad1995-01-26 00:46:29 +000012677works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12679$as_echo_n "checking for working signed char... " >&6; }
12680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012681/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012682
Martin v. Löwis11437992002-04-12 09:54:03 +000012683int
12684main ()
12685{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012686signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012687 ;
12688 return 0;
12689}
12690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012691if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012692 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012693else
Skip Montanaro6dead952003-09-25 14:50:04 +000012694
Matthias Kloseb9621712010-04-24 17:59:49 +000012695$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012696
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012697
Guido van Rossum7f43da71994-08-01 12:15:30 +000012698fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12701$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012702
Guido van Rossumda88dad1995-01-26 00:46:29 +000012703have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12705$as_echo_n "checking for prototypes... " >&6; }
12706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012707/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012708int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012709int
12710main ()
12711{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012712return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012713 ;
12714 return 0;
12715}
12716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012717if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012718
Matthias Kloseb9621712010-04-24 17:59:49 +000012719$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012720
Matthias Kloseb159a552010-04-25 21:00:44 +000012721 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12725$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012726
Guido van Rossumda88dad1995-01-26 00:46:29 +000012727works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12729$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012731/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012732
12733#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012734int foo(int x, ...) {
12735 va_list va;
12736 va_start(va, x);
12737 va_arg(va, int);
12738 va_arg(va, char *);
12739 va_arg(va, double);
12740 return 0;
12741}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012742
Martin v. Löwis11437992002-04-12 09:54:03 +000012743int
12744main ()
12745{
Guido van Rossum90eea071996-08-30 20:58:57 +000012746return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 ;
12748 return 0;
12749}
12750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012751if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012752
12753
Matthias Kloseb9621712010-04-24 17:59:49 +000012754$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012755
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012756 works=yes
12757
Guido van Rossum627b2d71993-12-24 10:39:16 +000012758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12761$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012762
Martin v. Löwisd6320502004-08-12 13:45:08 +000012763# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12765$as_echo_n "checking for socketpair... " >&6; }
12766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012767/* end confdefs.h. */
12768
12769#include <sys/types.h>
12770#include <sys/socket.h>
12771
12772int
12773main ()
12774{
12775void *x=socketpair
12776 ;
12777 return 0;
12778}
12779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012780if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012781
Matthias Kloseb9621712010-04-24 17:59:49 +000012782$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012783
Matthias Kloseb159a552010-04-25 21:00:44 +000012784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012785$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012786else
Matthias Kloseb9621712010-04-24 17:59:49 +000012787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12788$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012789
12790fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012792
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012793# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12795$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012797/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012798#include <sys/types.h>
12799#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012800int
12801main ()
12802{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012803struct sockaddr x;
12804x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012805 ;
12806 return 0;
12807}
12808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012809if ac_fn_c_try_compile "$LINENO"; then :
12810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12811$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012812
Matthias Kloseb9621712010-04-24 17:59:49 +000012813$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012814
12815else
Matthias Kloseb9621712010-04-24 17:59:49 +000012816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12817$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012818
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012821
Guido van Rossumda88dad1995-01-26 00:46:29 +000012822va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12824$as_echo_n "checking whether va_list is an array... " >&6; }
12825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012826/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012827
12828#ifdef HAVE_STDARG_PROTOTYPES
12829#include <stdarg.h>
12830#else
12831#include <varargs.h>
12832#endif
12833
Martin v. Löwis11437992002-04-12 09:54:03 +000012834int
12835main ()
12836{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012837va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012838 ;
12839 return 0;
12840}
12841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012842if ac_fn_c_try_compile "$LINENO"; then :
12843
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012844else
Skip Montanaro6dead952003-09-25 14:50:04 +000012845
Martin v. Löwis11437992002-04-12 09:54:03 +000012846
Matthias Kloseb9621712010-04-24 17:59:49 +000012847$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012848
Guido van Rossumda88dad1995-01-26 00:46:29 +000012849 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012850
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12854$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012855
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012856# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012857
12858
Matthias Kloseb9621712010-04-24 17:59:49 +000012859ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012860if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012861
Matthias Kloseb9621712010-04-24 17:59:49 +000012862 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012863
Matthias Kloseb9621712010-04-24 17:59:49 +000012864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12865$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012866 OLD_CFLAGS=$CFLAGS
12867 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012869/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012870
12871# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012872
Martin v. Löwis11437992002-04-12 09:54:03 +000012873int
12874main ()
12875{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012876
12877 char *name;
12878 struct hostent *he, *res;
12879 char buffer[2048];
12880 int buflen = 2048;
12881 int h_errnop;
12882
12883 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012884
12885 ;
12886 return 0;
12887}
12888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012889if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012890
Matthias Kloseb9621712010-04-24 17:59:49 +000012891 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012892
Martin v. Löwis11437992002-04-12 09:54:03 +000012893
Matthias Kloseb9621712010-04-24 17:59:49 +000012894$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012895
Matthias Kloseb9621712010-04-24 17:59:49 +000012896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12897$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012898
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012899else
Skip Montanaro6dead952003-09-25 14:50:04 +000012900
Matthias Kloseb9621712010-04-24 17:59:49 +000012901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12902$as_echo "no" >&6; }
12903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12904$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012906/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012907
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012908# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012909
Martin v. Löwis11437992002-04-12 09:54:03 +000012910int
12911main ()
12912{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012913
12914 char *name;
12915 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012916 char buffer[2048];
12917 int buflen = 2048;
12918 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012919
Matthias Kloseb159a552010-04-25 21:00:44 +000012920 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012921
12922 ;
12923 return 0;
12924}
12925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012926if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012927
Matthias Kloseb9621712010-04-24 17:59:49 +000012928 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012929
Martin v. Löwis11437992002-04-12 09:54:03 +000012930
Matthias Kloseb159a552010-04-25 21:00:44 +000012931$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012932
Matthias Kloseb9621712010-04-24 17:59:49 +000012933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12934$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012935
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012936else
Skip Montanaro6dead952003-09-25 14:50:04 +000012937
Matthias Kloseb9621712010-04-24 17:59:49 +000012938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12939$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12941$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12943/* end confdefs.h. */
12944
12945# include <netdb.h>
12946
12947int
12948main ()
12949{
12950
12951 char *name;
12952 struct hostent *he;
12953 struct hostent_data data;
12954
12955 (void) gethostbyname_r(name, he, &data);
12956
12957 ;
12958 return 0;
12959}
12960_ACEOF
12961if ac_fn_c_try_compile "$LINENO"; then :
12962
12963 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12964
12965
12966$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12967
12968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12969$as_echo "yes" >&6; }
12970
12971else
12972
12973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12974$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012975
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012978
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012981
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012984 CFLAGS=$OLD_CFLAGS
12985
12986else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012987
Matthias Kloseb9621712010-04-24 17:59:49 +000012988 for ac_func in gethostbyname
12989do :
12990 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012991if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012992 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012993#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012994_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012995
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012996fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012997done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012998
Michael W. Hudson54241132001-12-07 15:38:26 +000012999
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013000fi
13001
Michael W. Hudson54241132001-12-07 15:38:26 +000013002
13003
13004
13005
13006
13007
Guido van Rossum627b2d71993-12-24 10:39:16 +000013008# checks for system services
13009# (none yet)
13010
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013011# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013012ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013013if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013014
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013015else
Matthias Kloseb9621712010-04-24 17:59:49 +000013016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13017$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013018if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013019 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013020else
Martin v. Löwis11437992002-04-12 09:54:03 +000013021 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013022LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013024/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013026/* Override any GCC internal prototype to avoid an error.
13027 Use char because int might match the return type of a GCC
13028 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013029#ifdef __cplusplus
13030extern "C"
13031#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013032char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013033int
13034main ()
13035{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013036return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013037 ;
13038 return 0;
13039}
13040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013041if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013042 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013043else
Matthias Kloseb9621712010-04-24 17:59:49 +000013044 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013045fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013046rm -f core conftest.err conftest.$ac_objext \
13047 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013048LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013049fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13051$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013052if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013053 cat >>confdefs.h <<_ACEOF
13054#define HAVE_LIBIEEE 1
13055_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013056
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013057 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013058
Guido van Rossum627b2d71993-12-24 10:39:16 +000013059fi
13060
Michael W. Hudson54241132001-12-07 15:38:26 +000013061
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013062fi
13063
Michael W. Hudson54241132001-12-07 15:38:26 +000013064
Guido van Rossum7f253911997-05-09 02:42:48 +000013065# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13067$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013069# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013070if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013071 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013072if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013073then
13074
Matthias Kloseb9621712010-04-24 17:59:49 +000013075$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013076
Matthias Kloseb9621712010-04-24 17:59:49 +000013077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13078$as_echo "yes" >&6; }
13079else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13080$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013081fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013082else
Matthias Kloseb9621712010-04-24 17:59:49 +000013083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13084$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013085fi
13086
Guido van Rossum7f253911997-05-09 02:42:48 +000013087
Guido van Rossum7f43da71994-08-01 12:15:30 +000013088# check for --with-libm=...
13089
Guido van Rossum563e7081996-09-10 18:20:48 +000013090case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013091Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013092*) LIBM=-lm
13093esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13095$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013097# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013098if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013099 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013100if test "$withval" = no
13101then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13103$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013104elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013105then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13107$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013108else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013109fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013110else
Matthias Kloseb9621712010-04-24 17:59:49 +000013111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13112$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013113fi
13114
Guido van Rossum7f43da71994-08-01 12:15:30 +000013115
13116# check for --with-libc=...
13117
Matthias Kloseb9621712010-04-24 17:59:49 +000013118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13119$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013120
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013121# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013122if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013123 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013124if test "$withval" = no
13125then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13127$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013128elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013129then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13131$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013132else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013133fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013134else
Matthias Kloseb9621712010-04-24 17:59:49 +000013135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13136$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013137fi
13138
Guido van Rossum7f43da71994-08-01 12:15:30 +000013139
Stefan Krah1919b7e2012-03-21 18:25:23 +010013140# **************************************
13141# * Check for gcc x64 inline assembler *
13142# **************************************
13143
13144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13145$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13147/* end confdefs.h. */
13148
13149int
13150main ()
13151{
13152
13153 __asm__ __volatile__ ("movq %rcx, %rax");
13154
13155 ;
13156 return 0;
13157}
13158_ACEOF
13159if ac_fn_c_try_compile "$LINENO"; then :
13160 have_gcc_asm_for_x64=yes
13161else
13162 have_gcc_asm_for_x64=no
13163fi
13164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13166$as_echo "$have_gcc_asm_for_x64" >&6; }
13167if test "$have_gcc_asm_for_x64" = yes
13168then
13169
13170$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13171
13172fi
13173
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013174# **************************************************
13175# * Check for various properties of floating point *
13176# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013177
Matthias Kloseb9621712010-04-24 17:59:49 +000013178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13179$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013180if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013181 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013182else
13183
Matthias Kloseb9621712010-04-24 17:59:49 +000013184if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013185 ac_cv_little_endian_double=no
13186else
Matthias Kloseb9621712010-04-24 17:59:49 +000013187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013188/* end confdefs.h. */
13189
13190#include <string.h>
13191int main() {
13192 double x = 9006104071832581.0;
13193 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13194 return 0;
13195 else
13196 return 1;
13197}
13198
13199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013200if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013201 ac_cv_little_endian_double=yes
13202else
Matthias Kloseb9621712010-04-24 17:59:49 +000013203 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013205rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13206 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013207fi
13208
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013209fi
13210
Matthias Kloseb9621712010-04-24 17:59:49 +000013211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13212$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013213if test "$ac_cv_little_endian_double" = yes
13214then
13215
Matthias Kloseb9621712010-04-24 17:59:49 +000013216$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013217
13218fi
13219
Matthias Kloseb9621712010-04-24 17:59:49 +000013220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13221$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013222if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013223 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013224else
13225
Matthias Kloseb9621712010-04-24 17:59:49 +000013226if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013227 ac_cv_big_endian_double=no
13228else
Matthias Kloseb9621712010-04-24 17:59:49 +000013229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013230/* end confdefs.h. */
13231
13232#include <string.h>
13233int main() {
13234 double x = 9006104071832581.0;
13235 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13236 return 0;
13237 else
13238 return 1;
13239}
13240
13241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013242if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013243 ac_cv_big_endian_double=yes
13244else
Matthias Kloseb9621712010-04-24 17:59:49 +000013245 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013247rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13248 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013249fi
13250
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013251fi
13252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13254$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013255if test "$ac_cv_big_endian_double" = yes
13256then
13257
Matthias Kloseb9621712010-04-24 17:59:49 +000013258$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013259
13260fi
13261
13262# Some ARM platforms use a mixed-endian representation for doubles.
13263# While Python doesn't currently have full support for these platforms
13264# (see e.g., issue 1762561), we can at least make sure that float <-> string
13265# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13267$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013268if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013269 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013270else
13271
Matthias Kloseb9621712010-04-24 17:59:49 +000013272if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013273 ac_cv_mixed_endian_double=no
13274else
Matthias Kloseb9621712010-04-24 17:59:49 +000013275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013276/* end confdefs.h. */
13277
13278#include <string.h>
13279int main() {
13280 double x = 9006104071832581.0;
13281 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13282 return 0;
13283 else
13284 return 1;
13285}
13286
13287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013288if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013289 ac_cv_mixed_endian_double=yes
13290else
Matthias Kloseb9621712010-04-24 17:59:49 +000013291 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13294 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013295fi
13296
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013297fi
13298
Matthias Kloseb9621712010-04-24 17:59:49 +000013299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13300$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013301if test "$ac_cv_mixed_endian_double" = yes
13302then
13303
Matthias Kloseb9621712010-04-24 17:59:49 +000013304$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013305
13306fi
13307
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013308# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013309# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013310# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013311# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013312# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013313# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013314
13315# This inline assembler syntax may also work for suncc and icc,
13316# so we try it on all platforms.
13317
Matthias Kloseb9621712010-04-24 17:59:49 +000013318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13319$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013321/* end confdefs.h. */
13322
13323int
13324main ()
13325{
13326
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013327 unsigned short cw;
13328 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13329 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013330
13331 ;
13332 return 0;
13333}
13334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013335if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013336 have_gcc_asm_for_x87=yes
13337else
Matthias Kloseb9621712010-04-24 17:59:49 +000013338 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013339fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13342$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013343if test "$have_gcc_asm_for_x87" = yes
13344then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013345
Matthias Kloseb9621712010-04-24 17:59:49 +000013346$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013347
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013348fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013349
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13351$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13353/* end confdefs.h. */
13354
13355int
13356main ()
13357{
13358
13359 unsigned int fpcr;
13360 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13361 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13362
13363 ;
13364 return 0;
13365}
13366_ACEOF
13367if ac_fn_c_try_compile "$LINENO"; then :
13368 have_gcc_asm_for_mc68881=yes
13369else
13370 have_gcc_asm_for_mc68881=no
13371fi
13372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13374$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13375if test "$have_gcc_asm_for_mc68881" = yes
13376then
13377
13378$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13379
13380fi
13381
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013382# Detect whether system arithmetic is subject to x87-style double
13383# rounding issues. The result of this test has little meaning on non
13384# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13385# mode is round-to-nearest and double rounding issues are present, and
13386# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13388$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013389# $BASECFLAGS may affect the result
13390ac_save_cc="$CC"
13391CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013392if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013393 ac_cv_x87_double_rounding=no
13394else
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013396/* end confdefs.h. */
13397
13398#include <stdlib.h>
13399#include <math.h>
13400int main() {
13401 volatile double x, y, z;
13402 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13403 x = 0.99999999999999989; /* 1-2**-53 */
13404 y = 1./x;
13405 if (y != 1.)
13406 exit(0);
13407 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13408 x = 1e16;
13409 y = 2.99999;
13410 z = x + y;
13411 if (z != 1e16+4.)
13412 exit(0);
13413 /* both tests show evidence of double rounding */
13414 exit(1);
13415}
13416
13417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013418if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013419 ac_cv_x87_double_rounding=no
13420else
Matthias Kloseb9621712010-04-24 17:59:49 +000013421 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013423rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13424 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013425fi
13426
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013427CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13429$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013430if test "$ac_cv_x87_double_rounding" = yes
13431then
13432
Matthias Kloseb9621712010-04-24 17:59:49 +000013433$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013434
13435fi
13436
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013437# ************************************
13438# * Check for mathematical functions *
13439# ************************************
13440
13441LIBS_SAVE=$LIBS
13442LIBS="$LIBS $LIBM"
13443
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013444for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13445do :
13446 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13447ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013448if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013449 cat >>confdefs.h <<_ACEOF
13450#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13451_ACEOF
13452
13453fi
13454done
13455
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013456for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013457do :
13458 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13459ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013460if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013461 cat >>confdefs.h <<_ACEOF
13462#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13463_ACEOF
13464
13465fi
13466done
13467
13468ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13469"
Victor Stinnere0be4232011-10-25 13:06:09 +020013470if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013471 ac_have_decl=1
13472else
13473 ac_have_decl=0
13474fi
13475
13476cat >>confdefs.h <<_ACEOF
13477#define HAVE_DECL_ISINF $ac_have_decl
13478_ACEOF
13479ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13480"
Victor Stinnere0be4232011-10-25 13:06:09 +020013481if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013482 ac_have_decl=1
13483else
13484 ac_have_decl=0
13485fi
13486
13487cat >>confdefs.h <<_ACEOF
13488#define HAVE_DECL_ISNAN $ac_have_decl
13489_ACEOF
13490ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13491"
Victor Stinnere0be4232011-10-25 13:06:09 +020013492if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013493 ac_have_decl=1
13494else
13495 ac_have_decl=0
13496fi
13497
13498cat >>confdefs.h <<_ACEOF
13499#define HAVE_DECL_ISFINITE $ac_have_decl
13500_ACEOF
13501
13502
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013503# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13504# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13506$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013507if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013508 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013509else
13510
Matthias Kloseb9621712010-04-24 17:59:49 +000013511if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013512 ac_cv_tanh_preserves_zero_sign=no
13513else
Matthias Kloseb9621712010-04-24 17:59:49 +000013514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013515/* end confdefs.h. */
13516
13517#include <math.h>
13518#include <stdlib.h>
13519int main() {
13520 /* return 0 if either negative zeros don't exist
13521 on this platform or if negative zeros exist
13522 and tanh(-0.) == -0. */
13523 if (atan2(0., -1.) == atan2(-0., -1.) ||
13524 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13525 else exit(1);
13526}
13527
13528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013529if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013530 ac_cv_tanh_preserves_zero_sign=yes
13531else
Matthias Kloseb9621712010-04-24 17:59:49 +000013532 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013533fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013534rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13535 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013536fi
13537
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013538fi
13539
Matthias Kloseb9621712010-04-24 17:59:49 +000013540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13541$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013542if test "$ac_cv_tanh_preserves_zero_sign" = yes
13543then
13544
Matthias Kloseb9621712010-04-24 17:59:49 +000013545$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013546
13547fi
13548
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013549if test "$ac_cv_func_log1p" = yes
13550then
13551 # On some versions of AIX, log1p(-0.) returns 0. instead of
13552 # -0. See issue #9920.
13553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13554$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013555 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013556 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013557else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013558
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013559 if test "$cross_compiling" = yes; then :
13560 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013561else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13563/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013564
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013565 #include <math.h>
13566 #include <stdlib.h>
13567 int main() {
13568 /* Fail if the signs of log1p(-0.) and -0. can be
13569 distinguished. */
13570 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13571 return 0;
13572 else
13573 return 1;
13574 }
13575
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013576_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013577if ac_fn_c_try_run "$LINENO"; then :
13578 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013579else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013580 ac_cv_log1p_drops_zero_sign=yes
13581fi
13582rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13583 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013584fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013585
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013586fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013587
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13589$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13590fi
13591if test "$ac_cv_log1p_drops_zero_sign" = yes
13592then
13593
13594$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13595
13596fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013597
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013598LIBS=$LIBS_SAVE
13599
Mark Dickinsona614f042009-11-28 12:48:43 +000013600# For multiprocessing module, check that sem_open
13601# actually works. For FreeBSD versions <= 7.2,
13602# the kernel module that provides POSIX semaphores
13603# isn't loaded by default, so an attempt to call
13604# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13606$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013607if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013608 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013609else
Matthias Kloseb9621712010-04-24 17:59:49 +000013610 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013611 ac_cv_posix_semaphores_enabled=yes
13612else
Matthias Kloseb9621712010-04-24 17:59:49 +000013613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013614/* end confdefs.h. */
13615
13616#include <unistd.h>
13617#include <fcntl.h>
13618#include <stdio.h>
13619#include <semaphore.h>
13620#include <sys/stat.h>
13621
13622int main(void) {
13623 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13624 if (a == SEM_FAILED) {
13625 perror("sem_open");
13626 return 1;
13627 }
13628 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013629 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013630 return 0;
13631}
13632
13633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013634if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013635 ac_cv_posix_semaphores_enabled=yes
13636else
Matthias Kloseb9621712010-04-24 17:59:49 +000013637 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013638fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013639rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13640 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013641fi
13642
13643
Mark Dickinsona614f042009-11-28 12:48:43 +000013644fi
13645
Matthias Kloseb9621712010-04-24 17:59:49 +000013646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13647$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013648if test $ac_cv_posix_semaphores_enabled = no
13649then
13650
Matthias Kloseb9621712010-04-24 17:59:49 +000013651$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013652
13653fi
13654
Mark Dickinson10683072009-04-18 21:18:19 +000013655# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13657$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013658if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013659 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013660else
Matthias Kloseb9621712010-04-24 17:59:49 +000013661 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013662 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013663else
Matthias Kloseb9621712010-04-24 17:59:49 +000013664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013665/* end confdefs.h. */
13666
13667#include <unistd.h>
13668#include <fcntl.h>
13669#include <stdio.h>
13670#include <semaphore.h>
13671#include <sys/stat.h>
13672
13673int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013674 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013675 int count;
13676 int res;
13677 if(a==SEM_FAILED){
13678 perror("sem_open");
13679 return 1;
13680
13681 }
13682 res = sem_getvalue(a, &count);
13683 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013684 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013685 return res==-1 ? 1 : 0;
13686}
13687
Mark Dickinson10683072009-04-18 21:18:19 +000013688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013689if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013690 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013691else
Matthias Kloseb9621712010-04-24 17:59:49 +000013692 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013693fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013694rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13695 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013696fi
13697
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013698
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013699fi
13700
Matthias Kloseb9621712010-04-24 17:59:49 +000013701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13702$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013703if test $ac_cv_broken_sem_getvalue = yes
13704then
13705
Matthias Kloseb9621712010-04-24 17:59:49 +000013706$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013707
13708fi
13709
Mark Dickinsonbd792642009-03-18 20:06:12 +000013710# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13712$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013713# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013714if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013715 enableval=$enable_big_digits; case $enable_big_digits in
13716yes)
13717 enable_big_digits=30 ;;
13718no)
13719 enable_big_digits=15 ;;
1372015|30)
13721 ;;
13722*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013723 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 +000013724esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13726$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013727
13728cat >>confdefs.h <<_ACEOF
13729#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13730_ACEOF
13731
13732
13733else
Matthias Kloseb9621712010-04-24 17:59:49 +000013734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13735$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013736fi
13737
13738
Guido van Rossumef2255b2000-03-10 22:30:29 +000013739# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013740ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013741if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013742
13743
Matthias Kloseb9621712010-04-24 17:59:49 +000013744$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013745
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013746 wchar_h="yes"
13747
Guido van Rossumef2255b2000-03-10 22:30:29 +000013748else
Martin v. Löwis11437992002-04-12 09:54:03 +000013749 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013750
13751fi
13752
Michael W. Hudson54241132001-12-07 15:38:26 +000013753
Martin v. Löwis11437992002-04-12 09:54:03 +000013754
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013755# determine wchar_t size
13756if test "$wchar_h" = yes
13757then
Matthias Kloseb9621712010-04-24 17:59:49 +000013758 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013759# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13760# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13761# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13763$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013764if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013765 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013766else
Matthias Kloseb9621712010-04-24 17:59:49 +000013767 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13768"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013769
Martin v. Löwis11437992002-04-12 09:54:03 +000013770else
Matthias Kloseb9621712010-04-24 17:59:49 +000013771 if test "$ac_cv_type_wchar_t" = yes; then
13772 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13773$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013774as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013775See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013776 else
13777 ac_cv_sizeof_wchar_t=0
13778 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013780
Martin v. Löwis11437992002-04-12 09:54:03 +000013781fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13783$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013784
13785
13786
Martin v. Löwis11437992002-04-12 09:54:03 +000013787cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013788#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013789_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013790
Michael W. Hudson54241132001-12-07 15:38:26 +000013791
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013792fi
13793
Matthias Kloseb9621712010-04-24 17:59:49 +000013794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13795$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013796have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013798/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013799
13800#include <tcl.h>
13801#if TCL_UTF_MAX != 6
13802# error "NOT UCS4_TCL"
13803#endif
13804int
13805main ()
13806{
13807
13808 ;
13809 return 0;
13810}
13811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013812if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013813
13814
Matthias Kloseb9621712010-04-24 17:59:49 +000013815$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013816
13817 have_ucs4_tcl=yes
13818
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13822$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013823
Skip Montanaro6dead952003-09-25 14:50:04 +000013824# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013825if test "$wchar_h" = yes
13826then
13827 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13829$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013830 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013831 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013832else
13833
Matthias Kloseb9621712010-04-24 17:59:49 +000013834 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013835 ac_cv_wchar_t_signed=yes
13836else
Matthias Kloseb9621712010-04-24 17:59:49 +000013837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013838/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013839
13840 #include <wchar.h>
13841 int main()
13842 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013843 /* Success: exit code 0 */
13844 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013845 }
13846
13847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013848if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013849 ac_cv_wchar_t_signed=yes
13850else
Matthias Kloseb9621712010-04-24 17:59:49 +000013851 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013852fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013853rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13854 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013855fi
13856
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013857fi
13858
Matthias Kloseb9621712010-04-24 17:59:49 +000013859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13860$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013861fi
13862
Georg Brandl52d168a2008-01-07 18:10:24 +000013863# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013864if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013865 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013866then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013867 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013868
Matthias Kloseb9621712010-04-24 17:59:49 +000013869$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013870
Georg Brandl52d168a2008-01-07 18:10:24 +000013871else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013872 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013873fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13875$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013876
13877# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13879$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013880if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013881 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013882else
Matthias Kloseb9621712010-04-24 17:59:49 +000013883 ac_cv_c_bigendian=unknown
13884 # See if we're dealing with a universal compiler.
13885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13886/* end confdefs.h. */
13887#ifndef __APPLE_CC__
13888 not a universal capable compiler
13889 #endif
13890 typedef int dummy;
13891
Skip Montanaro6dead952003-09-25 14:50:04 +000013892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013893if ac_fn_c_try_compile "$LINENO"; then :
13894
13895 # Check for potential -arch flags. It is not universal unless
13896 # there are at least two -arch flags with different values.
13897 ac_arch=
13898 ac_prev=
13899 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13900 if test -n "$ac_prev"; then
13901 case $ac_word in
13902 i?86 | x86_64 | ppc | ppc64)
13903 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13904 ac_arch=$ac_word
13905 else
13906 ac_cv_c_bigendian=universal
13907 break
13908 fi
13909 ;;
13910 esac
13911 ac_prev=
13912 elif test "x$ac_word" = "x-arch"; then
13913 ac_prev=arch
13914 fi
13915 done
13916fi
13917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13918 if test $ac_cv_c_bigendian = unknown; then
13919 # See if sys/param.h defines the BYTE_ORDER macro.
13920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013921/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013922#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013923 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013924
Martin v. Löwis11437992002-04-12 09:54:03 +000013925int
13926main ()
13927{
Matthias Kloseb9621712010-04-24 17:59:49 +000013928#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13929 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13930 && LITTLE_ENDIAN)
13931 bogus endian macros
13932 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013933
13934 ;
13935 return 0;
13936}
13937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013938if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013939 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013941/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013942#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013943 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013944
Martin v. Löwis11437992002-04-12 09:54:03 +000013945int
13946main ()
13947{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013948#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013949 not big endian
13950 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013951
13952 ;
13953 return 0;
13954}
13955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013956if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013957 ac_cv_c_bigendian=yes
13958else
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013962fi
13963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13964 fi
13965 if test $ac_cv_c_bigendian = unknown; then
13966 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013968/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013969#include <limits.h>
13970
Martin v. Löwis11437992002-04-12 09:54:03 +000013971int
13972main ()
13973{
Matthias Kloseb9621712010-04-24 17:59:49 +000013974#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13975 bogus endian macros
13976 #endif
13977
Martin v. Löwis11437992002-04-12 09:54:03 +000013978 ;
13979 return 0;
13980}
13981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013982if ac_fn_c_try_compile "$LINENO"; then :
13983 # It does; now see whether it defined to _BIG_ENDIAN or not.
13984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13985/* end confdefs.h. */
13986#include <limits.h>
13987
13988int
13989main ()
13990{
13991#ifndef _BIG_ENDIAN
13992 not big endian
13993 #endif
13994
13995 ;
13996 return 0;
13997}
13998_ACEOF
13999if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014000 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014001else
Matthias Kloseb9621712010-04-24 17:59:49 +000014002 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014003fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14005fi
14006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14007 fi
14008 if test $ac_cv_c_bigendian = unknown; then
14009 # Compile a test program.
14010 if test "$cross_compiling" = yes; then :
14011 # Try to guess by grepping values from an object file.
14012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14013/* end confdefs.h. */
14014short int ascii_mm[] =
14015 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14016 short int ascii_ii[] =
14017 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14018 int use_ascii (int i) {
14019 return ascii_mm[i] + ascii_ii[i];
14020 }
14021 short int ebcdic_ii[] =
14022 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14023 short int ebcdic_mm[] =
14024 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14025 int use_ebcdic (int i) {
14026 return ebcdic_mm[i] + ebcdic_ii[i];
14027 }
14028 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014029
Matthias Kloseb9621712010-04-24 17:59:49 +000014030int
14031main ()
14032{
14033return use_ascii (foo) == use_ebcdic (foo);
14034 ;
14035 return 0;
14036}
14037_ACEOF
14038if ac_fn_c_try_compile "$LINENO"; then :
14039 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14040 ac_cv_c_bigendian=yes
14041 fi
14042 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14043 if test "$ac_cv_c_bigendian" = unknown; then
14044 ac_cv_c_bigendian=no
14045 else
14046 # finding both strings is unlikely to happen, but who knows?
14047 ac_cv_c_bigendian=unknown
14048 fi
14049 fi
14050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014052else
Matthias Kloseb9621712010-04-24 17:59:49 +000014053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014054/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014055$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014056int
14057main ()
14058{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014059
Matthias Kloseb9621712010-04-24 17:59:49 +000014060 /* Are we little or big endian? From Harbison&Steele. */
14061 union
14062 {
14063 long int l;
14064 char c[sizeof (long int)];
14065 } u;
14066 u.l = 1;
14067 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014068
14069 ;
14070 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014071}
Martin v. Löwis11437992002-04-12 09:54:03 +000014072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014073if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014074 ac_cv_c_bigendian=no
14075else
Matthias Kloseb9621712010-04-24 17:59:49 +000014076 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014077fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14079 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014081
Matthias Kloseb9621712010-04-24 17:59:49 +000014082 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14085$as_echo "$ac_cv_c_bigendian" >&6; }
14086 case $ac_cv_c_bigendian in #(
14087 yes)
14088 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14089;; #(
14090 no)
14091 ;; #(
14092 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014093
Matthias Kloseb9621712010-04-24 17:59:49 +000014094$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014095
Matthias Kloseb9621712010-04-24 17:59:49 +000014096 ;; #(
14097 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014098 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014099 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014100 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014101
Michael W. Hudson54241132001-12-07 15:38:26 +000014102
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014103# ABI version string for Python extension modules. This appears between the
14104# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14105# from the following attributes which affect the ABI of this Python build (in
14106# this order):
14107#
14108# * The Python implementation (always 'cpython-' for us)
14109# * The major and minor version numbers
14110# * --with-pydebug (adds a 'd')
14111# * --with-pymalloc (adds a 'm')
14112# * --with-wide-unicode (adds a 'u')
14113#
14114# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014115# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14116# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014117
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14119$as_echo_n "checking ABIFLAGS... " >&6; }
14120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14121$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14123$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014124SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14126$as_echo "$SOABI" >&6; }
14127
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014128
14129case $ac_sys_system in
14130 Linux*|GNU*)
14131 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14132 *)
14133 EXT_SUFFIX=${SHLIB_SUFFIX};;
14134esac
14135
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14137$as_echo_n "checking LDVERSION... " >&6; }
14138LDVERSION='$(VERSION)$(ABIFLAGS)'
14139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14140$as_echo "$LDVERSION" >&6; }
14141
doko@python.org87421192013-01-26 11:39:31 +010014142
14143LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
14144
14145
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014146# Check whether right shifting a negative integer extends the sign bit
14147# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14149$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014150if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014151 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014152else
Martin v. Löwis11437992002-04-12 09:54:03 +000014153
Matthias Kloseb9621712010-04-24 17:59:49 +000014154if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014155 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014156else
Matthias Kloseb9621712010-04-24 17:59:49 +000014157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014158/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014159
14160int main()
14161{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014162 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014163}
14164
Martin v. Löwis11437992002-04-12 09:54:03 +000014165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014166if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014167 ac_cv_rshift_extends_sign=yes
14168else
Matthias Kloseb9621712010-04-24 17:59:49 +000014169 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014170fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14172 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014173fi
14174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014175fi
14176
Matthias Kloseb9621712010-04-24 17:59:49 +000014177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14178$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014179if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014180then
Martin v. Löwis11437992002-04-12 09:54:03 +000014181
Matthias Kloseb9621712010-04-24 17:59:49 +000014182$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014183
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014184fi
14185
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014186# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14188$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014189if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014190 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014191else
Martin v. Löwis11437992002-04-12 09:54:03 +000014192
Matthias Kloseb9621712010-04-24 17:59:49 +000014193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014194/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014195#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014196int
14197main ()
14198{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014199
14200 FILE *f = fopen("/dev/null", "r");
14201 flockfile(f);
14202 getc_unlocked(f);
14203 funlockfile(f);
14204
Martin v. Löwis11437992002-04-12 09:54:03 +000014205 ;
14206 return 0;
14207}
14208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014209if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014210 ac_cv_have_getc_unlocked=yes
14211else
Matthias Kloseb9621712010-04-24 17:59:49 +000014212 ac_cv_have_getc_unlocked=no
14213fi
14214rm -f core conftest.err conftest.$ac_objext \
14215 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014217
Matthias Kloseb9621712010-04-24 17:59:49 +000014218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14219$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014220if test "$ac_cv_have_getc_unlocked" = yes
14221then
Martin v. Löwis11437992002-04-12 09:54:03 +000014222
Matthias Kloseb9621712010-04-24 17:59:49 +000014223$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014224
14225fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014226
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014227# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014228# save the value of LIBS so we don't actually link Python with readline
14229LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014230
Gregory P. Smith18820942008-09-07 06:24:49 +000014231# On some systems we need to link readline to a termcap compatible
14232# library. NOTE: Keep the precedence of listed libraries synchronised
14233# with setup.py.
14234py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14236$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014237for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014238 if test -z "$py_libtermcap"; then
14239 READLINE_LIBS="-lreadline"
14240 else
14241 READLINE_LIBS="-lreadline -l$py_libtermcap"
14242 fi
14243 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014245/* end confdefs.h. */
14246
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014247/* Override any GCC internal prototype to avoid an error.
14248 Use char because int might match the return type of a GCC
14249 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014250#ifdef __cplusplus
14251extern "C"
14252#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014253char readline ();
14254int
14255main ()
14256{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014257return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014258 ;
14259 return 0;
14260}
14261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014262if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014263 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014265rm -f core conftest.err conftest.$ac_objext \
14266 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014267 if test $py_cv_lib_readline = yes; then
14268 break
14269 fi
14270done
14271# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14272#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014273if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14275$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014276else
Matthias Kloseb9621712010-04-24 17:59:49 +000014277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14278$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014279
Matthias Kloseb9621712010-04-24 17:59:49 +000014280$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014281
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014282fi
14283
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014284# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14286$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014287if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014288 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014289else
14290 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014291LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014293/* end confdefs.h. */
14294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014295/* Override any GCC internal prototype to avoid an error.
14296 Use char because int might match the return type of a GCC
14297 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014298#ifdef __cplusplus
14299extern "C"
14300#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014301char rl_callback_handler_install ();
14302int
14303main ()
14304{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014305return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014306 ;
14307 return 0;
14308}
14309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014310if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014311 ac_cv_lib_readline_rl_callback_handler_install=yes
14312else
Matthias Kloseb9621712010-04-24 17:59:49 +000014313 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014314fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014315rm -f core conftest.err conftest.$ac_objext \
14316 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014317LIBS=$ac_check_lib_save_LIBS
14318fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14320$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014321if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014322
Matthias Kloseb9621712010-04-24 17:59:49 +000014323$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014324
14325fi
14326
14327
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014328# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014330/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014331#include <readline/readline.h>
14332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014333if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014334 have_readline=yes
14335else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014336 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014337
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014338fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014339rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014340if test $have_readline = yes
14341then
Matthias Kloseb9621712010-04-24 17:59:49 +000014342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014343/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014344#include <readline/readline.h>
14345
14346_ACEOF
14347if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014348 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014349
Matthias Kloseb9621712010-04-24 17:59:49 +000014350$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014351
14352fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014353rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014354
Matthias Kloseb9621712010-04-24 17:59:49 +000014355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014356/* end confdefs.h. */
14357#include <readline/readline.h>
14358
14359_ACEOF
14360if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014361 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014362
Matthias Kloseb9621712010-04-24 17:59:49 +000014363$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014364
14365fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014366rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014367
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014368fi
14369
Martin v. Löwis0daad592001-09-30 21:09:59 +000014370# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14372$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014373if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014374 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014375else
Martin v. Löwis11437992002-04-12 09:54:03 +000014376 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014377LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014381/* Override any GCC internal prototype to avoid an error.
14382 Use char because int might match the return type of a GCC
14383 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014384#ifdef __cplusplus
14385extern "C"
14386#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014387char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014388int
14389main ()
14390{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014391return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014392 ;
14393 return 0;
14394}
14395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014396if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014397 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014398else
Matthias Kloseb9621712010-04-24 17:59:49 +000014399 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014401rm -f core conftest.err conftest.$ac_objext \
14402 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014403LIBS=$ac_check_lib_save_LIBS
14404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14406$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014407if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014408
Matthias Kloseb9621712010-04-24 17:59:49 +000014409$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014410
Martin v. Löwis0daad592001-09-30 21:09:59 +000014411fi
14412
Michael W. Hudson54241132001-12-07 15:38:26 +000014413
Thomas Wouters89d996e2007-09-08 17:39:28 +000014414# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14416$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014417if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014418 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014419else
14420 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014421LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014423/* end confdefs.h. */
14424
14425/* Override any GCC internal prototype to avoid an error.
14426 Use char because int might match the return type of a GCC
14427 builtin and then its argument prototype would still apply. */
14428#ifdef __cplusplus
14429extern "C"
14430#endif
14431char rl_completion_display_matches_hook ();
14432int
14433main ()
14434{
14435return rl_completion_display_matches_hook ();
14436 ;
14437 return 0;
14438}
14439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014440if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014441 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14442else
Matthias Kloseb9621712010-04-24 17:59:49 +000014443 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014444fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014445rm -f core conftest.err conftest.$ac_objext \
14446 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014447LIBS=$ac_check_lib_save_LIBS
14448fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14450$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014451if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014452
Matthias Kloseb9621712010-04-24 17:59:49 +000014453$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014454
14455fi
14456
14457
Martin v. Löwis0daad592001-09-30 21:09:59 +000014458# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14460$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014461if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014462 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014463else
Martin v. Löwis11437992002-04-12 09:54:03 +000014464 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014465LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014468
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014469/* Override any GCC internal prototype to avoid an error.
14470 Use char because int might match the return type of a GCC
14471 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014472#ifdef __cplusplus
14473extern "C"
14474#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014475char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014476int
14477main ()
14478{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014479return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014480 ;
14481 return 0;
14482}
14483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014484if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014485 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014486else
Matthias Kloseb9621712010-04-24 17:59:49 +000014487 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014488fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014489rm -f core conftest.err conftest.$ac_objext \
14490 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014491LIBS=$ac_check_lib_save_LIBS
14492fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14494$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014495if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014496
Matthias Kloseb9621712010-04-24 17:59:49 +000014497$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014498
Guido van Rossum353ae582001-07-10 16:45:32 +000014499fi
14500
Jack Jansendd19cf82001-12-06 22:36:17 +000014501
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014502# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014504/* end confdefs.h. */
14505#include <readline/readline.h>
14506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014507if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014508 have_readline=yes
14509else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014510 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014511
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014512fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014513rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014514if test $have_readline = yes
14515then
Matthias Kloseb9621712010-04-24 17:59:49 +000014516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014517/* end confdefs.h. */
14518#include <readline/readline.h>
14519
14520_ACEOF
14521if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014522 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014523
Matthias Kloseb9621712010-04-24 17:59:49 +000014524$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014525
14526fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014527rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014528
14529fi
14530
Martin v. Löwis82bca632006-02-10 20:49:30 +000014531# End of readline checks: restore LIBS
14532LIBS=$LIBS_no_readline
14533
Matthias Kloseb9621712010-04-24 17:59:49 +000014534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14535$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014536if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014537 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014538else
Martin v. Löwis11437992002-04-12 09:54:03 +000014539
Matthias Kloseb9621712010-04-24 17:59:49 +000014540if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014541 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014542else
Matthias Kloseb9621712010-04-24 17:59:49 +000014543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014544/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014545
14546int main()
14547{
14548 int val1 = nice(1);
14549 if (val1 != -1 && val1 == nice(2))
14550 exit(0);
14551 exit(1);
14552}
14553
Martin v. Löwis11437992002-04-12 09:54:03 +000014554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014555if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014556 ac_cv_broken_nice=yes
14557else
Matthias Kloseb9621712010-04-24 17:59:49 +000014558 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014559fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14561 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014562fi
14563
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014564fi
14565
Matthias Kloseb9621712010-04-24 17:59:49 +000014566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14567$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014568if test "$ac_cv_broken_nice" = yes
14569then
Martin v. Löwis11437992002-04-12 09:54:03 +000014570
Matthias Kloseb9621712010-04-24 17:59:49 +000014571$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014572
14573fi
14574
Matthias Kloseb9621712010-04-24 17:59:49 +000014575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14576$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014577if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014579else
Matthias Kloseb9621712010-04-24 17:59:49 +000014580 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014581 ac_cv_broken_poll=no
14582else
Matthias Kloseb9621712010-04-24 17:59:49 +000014583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014584/* end confdefs.h. */
14585
14586#include <poll.h>
14587
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014588int main()
14589{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014590 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014591 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014592
14593 close (42);
14594
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014595 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014596 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014597 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014598 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014599 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014600 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014601 return 1;
14602}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014603
14604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014605if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014606 ac_cv_broken_poll=yes
14607else
Matthias Kloseb9621712010-04-24 17:59:49 +000014608 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014609fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014610rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14611 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014613
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014614fi
14615
Matthias Kloseb9621712010-04-24 17:59:49 +000014616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14617$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014618if test "$ac_cv_broken_poll" = yes
14619then
14620
Matthias Kloseb9621712010-04-24 17:59:49 +000014621$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014622
14623fi
14624
Brett Cannon43802422005-02-10 20:48:03 +000014625# 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 +000014626# (which is not required by ISO C or UNIX spec) and/or if we support
14627# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014628ac_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 +000014629#include <$ac_cv_struct_tm>
14630
Matthias Kloseb9621712010-04-24 17:59:49 +000014631"
Victor Stinnere0be4232011-10-25 13:06:09 +020014632if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014633
14634cat >>confdefs.h <<_ACEOF
14635#define HAVE_STRUCT_TM_TM_ZONE 1
14636_ACEOF
14637
14638
14639fi
14640
14641if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14642
Matthias Kloseb9621712010-04-24 17:59:49 +000014643$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014644
14645else
Matthias Kloseb9621712010-04-24 17:59:49 +000014646 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14647"
Victor Stinnere0be4232011-10-25 13:06:09 +020014648if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014649 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014650else
Matthias Kloseb9621712010-04-24 17:59:49 +000014651 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014652fi
14653
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014654cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014655#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014656_ACEOF
14657
Matthias Kloseb9621712010-04-24 17:59:49 +000014658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14659$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014660if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014661 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014662else
Matthias Kloseb9621712010-04-24 17:59:49 +000014663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014664/* end confdefs.h. */
14665#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014666#if !HAVE_DECL_TZNAME
14667extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014668#endif
14669
14670int
14671main ()
14672{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014673return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014674 ;
14675 return 0;
14676}
14677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014678if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014679 ac_cv_var_tzname=yes
14680else
Matthias Kloseb9621712010-04-24 17:59:49 +000014681 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014682fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014683rm -f core conftest.err conftest.$ac_objext \
14684 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014685fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14687$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014688 if test $ac_cv_var_tzname = yes; then
14689
Matthias Kloseb9621712010-04-24 17:59:49 +000014690$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014691
14692 fi
14693fi
14694
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014695
Martin v. Löwis1d459062005-03-14 21:23:33 +000014696# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14698$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014699if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014700 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014701else
14702
Matthias Kloseb9621712010-04-24 17:59:49 +000014703if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014704 ac_cv_working_tzset=no
14705else
Matthias Kloseb9621712010-04-24 17:59:49 +000014706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014707/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014708
14709#include <stdlib.h>
14710#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014711#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014712
14713#if HAVE_TZNAME
14714extern char *tzname[];
14715#endif
14716
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014717int main()
14718{
Brett Cannon18367812003-09-19 00:59:16 +000014719 /* Note that we need to ensure that not only does tzset(3)
14720 do 'something' with localtime, but it works as documented
14721 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014722 This includes making sure that tzname is set properly if
14723 tm->tm_zone does not exist since it is the alternative way
14724 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014725
14726 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014727 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014728 */
14729
Martin v. Löwis1d459062005-03-14 21:23:33 +000014730 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014731 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14732
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014733 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014734 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014735 if (localtime(&groundhogday)->tm_hour != 0)
14736 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014737#if HAVE_TZNAME
14738 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14739 if (strcmp(tzname[0], "UTC") ||
14740 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14741 exit(1);
14742#endif
Brett Cannon18367812003-09-19 00:59:16 +000014743
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014744 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014745 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014746 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014747 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014748#if HAVE_TZNAME
14749 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14750 exit(1);
14751#endif
Brett Cannon18367812003-09-19 00:59:16 +000014752
14753 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14754 tzset();
14755 if (localtime(&groundhogday)->tm_hour != 11)
14756 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014757#if HAVE_TZNAME
14758 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14759 exit(1);
14760#endif
14761
14762#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014763 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14764 exit(1);
14765 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14766 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014767#endif
Brett Cannon18367812003-09-19 00:59:16 +000014768
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014769 exit(0);
14770}
14771
14772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014773if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014774 ac_cv_working_tzset=yes
14775else
Matthias Kloseb9621712010-04-24 17:59:49 +000014776 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014777fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014778rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14779 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014780fi
14781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014782fi
14783
Matthias Kloseb9621712010-04-24 17:59:49 +000014784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14785$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014786if test "$ac_cv_working_tzset" = yes
14787then
14788
Matthias Kloseb9621712010-04-24 17:59:49 +000014789$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014790
14791fi
14792
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014793# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14795$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014796if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014797 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014798else
Matthias Kloseb9621712010-04-24 17:59:49 +000014799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014800/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014801#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014802int
14803main ()
14804{
14805
14806struct stat st;
14807st.st_mtim.tv_nsec = 1;
14808
14809 ;
14810 return 0;
14811}
14812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014813if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014814 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014815else
Matthias Kloseb9621712010-04-24 17:59:49 +000014816 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14819fi
14820
Matthias Kloseb9621712010-04-24 17:59:49 +000014821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14822$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014823if test "$ac_cv_stat_tv_nsec" = yes
14824then
14825
Matthias Kloseb9621712010-04-24 17:59:49 +000014826$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014827
14828fi
14829
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014830# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14832$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014833if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014834 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014835else
Matthias Kloseb9621712010-04-24 17:59:49 +000014836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014837/* end confdefs.h. */
14838#include <sys/stat.h>
14839int
14840main ()
14841{
14842
14843struct stat st;
14844st.st_mtimespec.tv_nsec = 1;
14845
14846 ;
14847 return 0;
14848}
14849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014850if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014851 ac_cv_stat_tv_nsec2=yes
14852else
Matthias Kloseb9621712010-04-24 17:59:49 +000014853 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14856fi
14857
Matthias Kloseb9621712010-04-24 17:59:49 +000014858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14859$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014860if test "$ac_cv_stat_tv_nsec2" = yes
14861then
14862
Matthias Kloseb9621712010-04-24 17:59:49 +000014863$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014864
14865fi
14866
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014867# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014868ac_save_cppflags="$CPPFLAGS"
14869CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014870
14871for ac_header in curses.h ncurses.h
14872do :
14873 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14874ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14875if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14876 cat >>confdefs.h <<_ACEOF
14877#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14878_ACEOF
14879
14880fi
14881
14882done
14883
14884
14885# On Solaris, term.h requires curses.h
14886for ac_header in term.h
14887do :
14888 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14889#ifdef HAVE_CURSES_H
14890#include <curses.h>
14891#endif
14892
14893"
14894if test "x$ac_cv_header_term_h" = xyes; then :
14895 cat >>confdefs.h <<_ACEOF
14896#define HAVE_TERM_H 1
14897_ACEOF
14898
14899fi
14900
14901done
14902
14903
Jack Jansen666b1e72001-10-31 12:11:48 +000014904# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14906$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014907if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014908 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014909else
Matthias Kloseb9621712010-04-24 17:59:49 +000014910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014911/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014912#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014913int
14914main ()
14915{
Jack Jansen666b1e72001-10-31 12:11:48 +000014916
14917 int rtn;
14918 rtn = mvwdelch(0,0,0);
14919
Martin v. Löwis11437992002-04-12 09:54:03 +000014920 ;
14921 return 0;
14922}
14923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014924if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014925 ac_cv_mvwdelch_is_expression=yes
14926else
Matthias Kloseb9621712010-04-24 17:59:49 +000014927 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14930fi
14931
Matthias Kloseb9621712010-04-24 17:59:49 +000014932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14933$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014934
14935if test "$ac_cv_mvwdelch_is_expression" = yes
14936then
Martin v. Löwis11437992002-04-12 09:54:03 +000014937
Matthias Kloseb9621712010-04-24 17:59:49 +000014938$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014939
14940fi
14941
Matthias Kloseb9621712010-04-24 17:59:49 +000014942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14943$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014944if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014945 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014946else
Matthias Kloseb9621712010-04-24 17:59:49 +000014947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014948/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014949#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014950int
14951main ()
14952{
Jack Jansen666b1e72001-10-31 12:11:48 +000014953
14954 WINDOW *w;
14955 w->_flags = 0;
14956
Martin v. Löwis11437992002-04-12 09:54:03 +000014957 ;
14958 return 0;
14959}
14960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014961if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014962 ac_cv_window_has_flags=yes
14963else
Matthias Kloseb9621712010-04-24 17:59:49 +000014964 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14967fi
14968
Matthias Kloseb9621712010-04-24 17:59:49 +000014969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14970$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014971
Jack Jansen666b1e72001-10-31 12:11:48 +000014972
14973if test "$ac_cv_window_has_flags" = yes
14974then
Martin v. Löwis11437992002-04-12 09:54:03 +000014975
Matthias Kloseb9621712010-04-24 17:59:49 +000014976$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014977
14978fi
14979
Matthias Kloseb9621712010-04-24 17:59:49 +000014980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14981$as_echo_n "checking for is_term_resized... " >&6; }
14982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014983/* end confdefs.h. */
14984#include <curses.h>
14985int
14986main ()
14987{
14988void *x=is_term_resized
14989 ;
14990 return 0;
14991}
14992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014993if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014994
Matthias Kloseb9621712010-04-24 17:59:49 +000014995$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014996
Matthias Kloseb159a552010-04-25 21:00:44 +000014997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014998$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014999else
Matthias Kloseb9621712010-04-24 17:59:49 +000015000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15001$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015002
15003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15005
Matthias Kloseb9621712010-04-24 17:59:49 +000015006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15007$as_echo_n "checking for resize_term... " >&6; }
15008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015009/* end confdefs.h. */
15010#include <curses.h>
15011int
15012main ()
15013{
15014void *x=resize_term
15015 ;
15016 return 0;
15017}
15018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015019if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015020
Matthias Kloseb9621712010-04-24 17:59:49 +000015021$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015022
Matthias Kloseb159a552010-04-25 21:00:44 +000015023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015024$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015025else
Matthias Kloseb9621712010-04-24 17:59:49 +000015026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15027$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015028
15029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15031
Matthias Kloseb9621712010-04-24 17:59:49 +000015032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15033$as_echo_n "checking for resizeterm... " >&6; }
15034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015035/* end confdefs.h. */
15036#include <curses.h>
15037int
15038main ()
15039{
15040void *x=resizeterm
15041 ;
15042 return 0;
15043}
15044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015045if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015046
Matthias Kloseb9621712010-04-24 17:59:49 +000015047$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015048
Matthias Kloseb159a552010-04-25 21:00:44 +000015049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015050$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015051else
Matthias Kloseb9621712010-04-24 17:59:49 +000015052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15053$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015054
15055fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015057# last curses configure check
15058CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015059
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15061$as_echo "$as_me: checking for device files" >&6;}
15062
15063if test "x$cross_compiling" = xyes; then
15064 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15066$as_echo_n "checking for /dev/ptmx... " >&6; }
15067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15068$as_echo "not set" >&6; }
15069 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15070 fi
15071 if test "${ac_cv_file__dev_ptc+set}" != set; then
15072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15073$as_echo_n "checking for /dev/ptc... " >&6; }
15074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15075$as_echo "not set" >&6; }
15076 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15077 fi
15078fi
15079
Matthias Kloseb9621712010-04-24 17:59:49 +000015080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15081$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015082if ${ac_cv_file__dev_ptmx+:} false; then :
15083 $as_echo_n "(cached) " >&6
15084else
15085 test "$cross_compiling" = yes &&
15086 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15087if test -r "/dev/ptmx"; then
15088 ac_cv_file__dev_ptmx=yes
15089else
15090 ac_cv_file__dev_ptmx=no
15091fi
15092fi
15093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15094$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15095if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015096
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015097fi
15098
15099if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015100
Matthias Kloseb9621712010-04-24 17:59:49 +000015101$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015102
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015103fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15105$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015106if ${ac_cv_file__dev_ptc+:} false; then :
15107 $as_echo_n "(cached) " >&6
15108else
15109 test "$cross_compiling" = yes &&
15110 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15111if test -r "/dev/ptc"; then
15112 ac_cv_file__dev_ptc=yes
15113else
15114 ac_cv_file__dev_ptc=no
15115fi
15116fi
15117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15118$as_echo "$ac_cv_file__dev_ptc" >&6; }
15119if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015120
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015121fi
15122
15123if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015124
Matthias Kloseb9621712010-04-24 17:59:49 +000015125$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015126
Neal Norwitz865400f2003-03-21 01:42:58 +000015127fi
15128
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015129if test "$have_long_long" = yes
15130then
Matthias Kloseb9621712010-04-24 17:59:49 +000015131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15132$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015133 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015134 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015135else
Matthias Kloseb9621712010-04-24 17:59:49 +000015136 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015137 ac_cv_have_long_long_format="cross -- assuming no"
15138 if test x$GCC = xyes; then
15139 save_CFLAGS=$CFLAGS
15140 CFLAGS="$CFLAGS -Werror -Wformat"
15141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15142/* end confdefs.h. */
15143
15144 #include <stdio.h>
15145 #include <stddef.h>
15146
15147int
15148main ()
15149{
15150
15151 char *buffer;
15152 sprintf(buffer, "%lld", (long long)123);
15153 sprintf(buffer, "%lld", (long long)-123);
15154 sprintf(buffer, "%llu", (unsigned long long)123);
15155
15156 ;
15157 return 0;
15158}
15159_ACEOF
15160if ac_fn_c_try_compile "$LINENO"; then :
15161 ac_cv_have_long_long_format=yes
15162
15163fi
15164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15165 CFLAGS=$save_CFLAGS
15166 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015167else
Matthias Kloseb9621712010-04-24 17:59:49 +000015168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015169/* end confdefs.h. */
15170
15171 #include <stdio.h>
15172 #include <stddef.h>
15173 #include <string.h>
15174
15175 #ifdef HAVE_SYS_TYPES_H
15176 #include <sys/types.h>
15177 #endif
15178
15179 int main()
15180 {
15181 char buffer[256];
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, "%lld", (long long)-123) < 0)
15189 return 1;
15190 if (strcmp(buffer, "-123"))
15191 return 1;
15192
15193 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15194 return 1;
15195 if (strcmp(buffer, "123"))
15196 return 1;
15197
15198 return 0;
15199 }
15200
15201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015202if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015203 ac_cv_have_long_long_format=yes
15204else
Matthias Kloseb9621712010-04-24 17:59:49 +000015205 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015206fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015207rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15208 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015209fi
15210
15211
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015212fi
15213
Matthias Kloseb9621712010-04-24 17:59:49 +000015214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15215$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015216fi
15217
Mark Dickinson89d7d412009-12-31 20:50:59 +000015218if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015219then
15220
Matthias Kloseb9621712010-04-24 17:59:49 +000015221$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015222
15223fi
15224
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015225if test $ac_sys_system = Darwin
15226then
15227 LIBS="$LIBS -framework CoreFoundation"
15228fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015229
Matthias Kloseb9621712010-04-24 17:59:49 +000015230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15231$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015232if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015233 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015234else
Matthias Kloseb9621712010-04-24 17:59:49 +000015235 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015236 ac_cv_have_size_t_format="cross -- assuming yes"
15237
Thomas Wouters477c8d52006-05-27 19:21:47 +000015238else
Matthias Kloseb9621712010-04-24 17:59:49 +000015239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015240/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015241
Thomas Wouters477c8d52006-05-27 19:21:47 +000015242#include <stdio.h>
15243#include <stddef.h>
15244#include <string.h>
15245
Christian Heimes2c181612007-12-17 20:04:13 +000015246#ifdef HAVE_SYS_TYPES_H
15247#include <sys/types.h>
15248#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015249
15250#ifdef HAVE_SSIZE_T
15251typedef ssize_t Py_ssize_t;
15252#elif SIZEOF_VOID_P == SIZEOF_LONG
15253typedef long Py_ssize_t;
15254#else
15255typedef int Py_ssize_t;
15256#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015257
Christian Heimes2c181612007-12-17 20:04:13 +000015258int main()
15259{
15260 char buffer[256];
15261
Thomas Wouters477c8d52006-05-27 19:21:47 +000015262 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15263 return 1;
15264
Thomas Wouters89f507f2006-12-13 04:49:30 +000015265 if (strcmp(buffer, "123"))
15266 return 1;
15267
15268 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15269 return 1;
15270
15271 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015272 return 1;
15273
15274 return 0;
15275}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015276
Thomas Wouters477c8d52006-05-27 19:21:47 +000015277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015278if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015279 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015280else
Matthias Kloseb9621712010-04-24 17:59:49 +000015281 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015283rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15284 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015285fi
15286
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015287fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15289$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015290if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015291
Matthias Kloseb9621712010-04-24 17:59:49 +000015292$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015293
15294fi
15295
Matthias Kloseb9621712010-04-24 17:59:49 +000015296ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015297#ifdef HAVE_SYS_TYPES_H
15298#include <sys/types.h>
15299#endif
15300#ifdef HAVE_SYS_SOCKET_H
15301#include <sys/socket.h>
15302#endif
15303
Matthias Kloseb9621712010-04-24 17:59:49 +000015304"
Victor Stinnere0be4232011-10-25 13:06:09 +020015305if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015306
Martin v. Löwis11437992002-04-12 09:54:03 +000015307else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015308
Matthias Kloseb9621712010-04-24 17:59:49 +000015309$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015310
15311fi
15312
Michael W. Hudson54241132001-12-07 15:38:26 +000015313
Matthias Kloseb9621712010-04-24 17:59:49 +000015314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15315$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015316if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015317 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015318else
Matthias Kloseb9621712010-04-24 17:59:49 +000015319 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015320 ac_cv_broken_mbstowcs=no
15321else
Matthias Kloseb9621712010-04-24 17:59:49 +000015322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015323/* end confdefs.h. */
15324
Stefan Krah19c21392012-11-22 23:47:32 +010015325#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015326#include<stdlib.h>
15327int main() {
15328 size_t len = -1;
15329 const char *str = "text";
15330 len = mbstowcs(NULL, str, 0);
15331 return (len != 4);
15332}
15333
15334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015335if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015336 ac_cv_broken_mbstowcs=no
15337else
Matthias Kloseb9621712010-04-24 17:59:49 +000015338 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015339fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015340rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15341 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015342fi
15343
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015344fi
15345
Matthias Kloseb9621712010-04-24 17:59:49 +000015346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15347$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015348if test "$ac_cv_broken_mbstowcs" = yes
15349then
15350
Matthias Kloseb9621712010-04-24 17:59:49 +000015351$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015352
15353fi
15354
Antoine Pitroub52ec782009-01-25 16:34:23 +000015355# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15357$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015358
15359# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015360if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015361 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015362if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015363then
15364
Matthias Kloseb9621712010-04-24 17:59:49 +000015365$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015366
Matthias Kloseb9621712010-04-24 17:59:49 +000015367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15368$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015369fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015370if test "$withval" = no
15371then
15372
15373$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15374
Matthias Kloseb9621712010-04-24 17:59:49 +000015375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15376$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015377fi
15378
Antoine Pitrou042b1282010-08-13 21:15:58 +000015379else
15380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15381$as_echo "no value specified" >&6; }
15382fi
15383
Antoine Pitroub52ec782009-01-25 16:34:23 +000015384
Matthias Kloseb17289e2012-03-15 19:51:34 +010015385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15386$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15387if ${ac_cv_computed_gotos+:} false; then :
15388 $as_echo_n "(cached) " >&6
15389else
15390 if test "$cross_compiling" = yes; then :
15391 if test "${with_computed_gotos+set}" = set; then
15392 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15393 else
15394 ac_cv_computed_gotos=no
15395 fi
15396else
15397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15398/* end confdefs.h. */
15399
15400int main(int argc, char **argv)
15401{
15402 static void *targets[1] = { &&LABEL1 };
15403 goto LABEL2;
15404LABEL1:
15405 return 0;
15406LABEL2:
15407 goto *targets[0];
15408 return 1;
15409}
15410
15411_ACEOF
15412if ac_fn_c_try_run "$LINENO"; then :
15413 ac_cv_computed_gotos=yes
15414else
15415 ac_cv_computed_gotos=no
15416fi
15417rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15418 conftest.$ac_objext conftest.beam conftest.$ac_ext
15419fi
15420
15421fi
15422
15423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15424$as_echo "$ac_cv_computed_gotos" >&6; }
15425case "$ac_cv_computed_gotos" in yes*)
15426
15427$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15428
15429esac
15430
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015431case $ac_sys_system in
15432AIX*)
15433
15434$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15435 ;;
15436esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015437
Michael W. Hudson54241132001-12-07 15:38:26 +000015438
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015439
15440
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015441for h in `(cd $srcdir;echo Python/thread_*.h)`
15442do
15443 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15444done
15445
Michael W. Hudson54241132001-12-07 15:38:26 +000015446
Ned Deily0db50cf2014-07-25 12:41:31 -070015447SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15449$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015450for dir in $SRCDIRS; do
15451 if test ! -d $dir; then
15452 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015453 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015454done
Matthias Kloseb9621712010-04-24 17:59:49 +000015455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15456$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015457
Stefan Krah1919b7e2012-03-21 18:25:23 +010015458# Availability of -O2:
15459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15460$as_echo_n "checking for -O2... " >&6; }
15461saved_cflags="$CFLAGS"
15462CFLAGS="-O2"
15463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15464/* end confdefs.h. */
15465
15466int
15467main ()
15468{
15469
15470
15471 ;
15472 return 0;
15473}
15474_ACEOF
15475if ac_fn_c_try_compile "$LINENO"; then :
15476 have_O2=yes
15477else
15478 have_O2=no
15479fi
15480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15482$as_echo "$have_O2" >&6; }
15483CFLAGS="$saved_cflags"
15484
15485# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15486# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15488$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15489saved_cflags="$CFLAGS"
15490CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15491if test "$have_O2" = no; then
15492 CFLAGS=""
15493fi
15494if test "$cross_compiling" = yes; then :
15495 have_glibc_memmove_bug=undefined
15496else
15497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15498/* end confdefs.h. */
15499
15500#include <stdio.h>
15501#include <stdlib.h>
15502#include <string.h>
15503void foo(void *p, void *q) { memmove(p, q, 19); }
15504int main() {
15505 char a[32] = "123456789000000000";
15506 foo(&a[9], a);
15507 if (strcmp(a, "123456789123456789000000000") != 0)
15508 return 1;
15509 foo(a, &a[9]);
15510 if (strcmp(a, "123456789000000000") != 0)
15511 return 1;
15512 return 0;
15513}
15514
15515_ACEOF
15516if ac_fn_c_try_run "$LINENO"; then :
15517 have_glibc_memmove_bug=no
15518else
15519 have_glibc_memmove_bug=yes
15520fi
15521rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15522 conftest.$ac_objext conftest.beam conftest.$ac_ext
15523fi
15524
15525CFLAGS="$saved_cflags"
15526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15527$as_echo "$have_glibc_memmove_bug" >&6; }
15528if test "$have_glibc_memmove_bug" = yes; then
15529
15530$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15531
15532fi
15533
15534if test "$have_gcc_asm_for_x87" = yes; then
15535 # Some versions of gcc miscompile inline asm:
15536 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15537 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15538 case $CC in
15539 *gcc*)
15540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15541$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15542 saved_cflags="$CFLAGS"
15543 CFLAGS="-O2"
15544 if test "$cross_compiling" = yes; then :
15545 have_ipa_pure_const_bug=undefined
15546else
15547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15548/* end confdefs.h. */
15549
15550 __attribute__((noinline)) int
15551 foo(int *p) {
15552 int r;
15553 asm ( "movl \$6, (%1)\n\t"
15554 "xorl %0, %0\n\t"
15555 : "=r" (r) : "r" (p) : "memory"
15556 );
15557 return r;
15558 }
15559 int main() {
15560 int p = 8;
15561 if ((foo(&p) ? : p) != 6)
15562 return 1;
15563 return 0;
15564 }
15565
15566_ACEOF
15567if ac_fn_c_try_run "$LINENO"; then :
15568 have_ipa_pure_const_bug=no
15569else
15570 have_ipa_pure_const_bug=yes
15571fi
15572rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15573 conftest.$ac_objext conftest.beam conftest.$ac_ext
15574fi
15575
15576 CFLAGS="$saved_cflags"
15577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15578$as_echo "$have_ipa_pure_const_bug" >&6; }
15579 if test "$have_ipa_pure_const_bug" = yes; then
15580
15581$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15582
15583 fi
15584 ;;
15585 esac
15586fi
15587
Ned Deily322f5ba2013-11-21 23:01:59 -080015588# ensurepip option
15589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15590$as_echo_n "checking for ensurepip... " >&6; }
15591
15592# Check whether --with-ensurepip was given.
15593if test "${with_ensurepip+set}" = set; then :
15594 withval=$with_ensurepip;
15595else
15596 with_ensurepip=upgrade
15597fi
15598
15599case $with_ensurepip in #(
15600 yes|upgrade) :
15601 ENSUREPIP=upgrade ;; #(
15602 install) :
15603 ENSUREPIP=install ;; #(
15604 no) :
15605 ENSUREPIP=no ;; #(
15606 *) :
15607 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15608esac
15609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15610$as_echo "$ENSUREPIP" >&6; }
15611
15612
Guido van Rossum627b2d71993-12-24 10:39:16 +000015613# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015614ac_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 +000015615
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015616ac_config_files="$ac_config_files Modules/ld_so_aix"
15617
Martin v. Löwis11437992002-04-12 09:54:03 +000015618cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015619# This file is a shell script that caches the results of configure
15620# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015621# scripts and configure runs, see configure's option --config-cache.
15622# It is not useful on other systems. If it contains results you don't
15623# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015624#
Martin v. Löwis11437992002-04-12 09:54:03 +000015625# config.status only pays attention to the cache file if you give it
15626# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015627#
Skip Montanaro6dead952003-09-25 14:50:04 +000015628# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015629# loading this file, other *unset* `ac_cv_foo' will be assigned the
15630# following values.
15631
15632_ACEOF
15633
Guido van Rossumf78abae1997-01-21 22:02:36 +000015634# The following way of writing the cache mishandles newlines in values,
15635# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015636# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015637# Ultrix sh set writes to stderr and can't be redirected directly,
15638# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015639(
15640 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15641 eval ac_val=\$$ac_var
15642 case $ac_val in #(
15643 *${as_nl}*)
15644 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015645 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15646$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015647 esac
15648 case $ac_var in #(
15649 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015650 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15651 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015652 esac ;;
15653 esac
15654 done
15655
Martin v. Löwis11437992002-04-12 09:54:03 +000015656 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015657 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15658 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015659 # `set' does not quote correctly, so add quotes: double-quote
15660 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015661 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015662 "s/'/'\\\\''/g;
15663 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015664 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015665 *)
15666 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015667 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015668 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015669 esac |
15670 sort
15671) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015672 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015673 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015674 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015675 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015676 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15677 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015678 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15679 :end' >>confcache
15680if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15681 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015682 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015683 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15684$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015685 if test ! -f "$cache_file" || test -h "$cache_file"; then
15686 cat confcache >"$cache_file"
15687 else
15688 case $cache_file in #(
15689 */* | ?:*)
15690 mv -f confcache "$cache_file"$$ &&
15691 mv -f "$cache_file"$$ "$cache_file" ;; #(
15692 *)
15693 mv -f confcache "$cache_file" ;;
15694 esac
15695 fi
15696 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015697 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015698 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15699$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015700 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015701fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015702rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015703
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015704test "x$prefix" = xNONE && prefix=$ac_default_prefix
15705# Let make expand exec_prefix.
15706test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015707
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015708DEFS=-DHAVE_CONFIG_H
15709
Skip Montanaro6dead952003-09-25 14:50:04 +000015710ac_libobjs=
15711ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015712U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015713for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15714 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015715 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015716 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015717 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15718 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015719 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15720 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015721done
15722LIBOBJS=$ac_libobjs
15723
15724LTLIBOBJS=$ac_ltlibobjs
15725
15726
Martin v. Löwis11437992002-04-12 09:54:03 +000015727
Matthias Kloseb9621712010-04-24 17:59:49 +000015728
Victor Stinnere0be4232011-10-25 13:06:09 +020015729: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015730ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015731ac_clean_files_save=$ac_clean_files
15732ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015733{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15734$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15735as_write_fail=0
15736cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015737#! $SHELL
15738# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015739# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015740# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015741# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015742
Martin v. Löwis11437992002-04-12 09:54:03 +000015743debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015744ac_cs_recheck=false
15745ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015746
Matthias Kloseb9621712010-04-24 17:59:49 +000015747SHELL=\${CONFIG_SHELL-$SHELL}
15748export SHELL
15749_ASEOF
15750cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15751## -------------------- ##
15752## M4sh Initialization. ##
15753## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015755# Be more Bourne compatible
15756DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015757if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015758 emulate sh
15759 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015760 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015761 # is contrary to our usage. Disable this feature.
15762 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015763 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015764else
Matthias Kloseb9621712010-04-24 17:59:49 +000015765 case `(set -o) 2>/dev/null` in #(
15766 *posix*) :
15767 set -o posix ;; #(
15768 *) :
15769 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015770esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015771fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015772
15773
Matthias Kloseb9621712010-04-24 17:59:49 +000015774as_nl='
15775'
15776export as_nl
15777# Printing a long string crashes Solaris 7 /usr/bin/printf.
15778as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15779as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15780as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15781# Prefer a ksh shell builtin over an external printf program on Solaris,
15782# but without wasting forks for bash or zsh.
15783if test -z "$BASH_VERSION$ZSH_VERSION" \
15784 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15785 as_echo='print -r --'
15786 as_echo_n='print -rn --'
15787elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15788 as_echo='printf %s\n'
15789 as_echo_n='printf %s'
15790else
15791 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15792 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15793 as_echo_n='/usr/ucb/echo -n'
15794 else
15795 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15796 as_echo_n_body='eval
15797 arg=$1;
15798 case $arg in #(
15799 *"$as_nl"*)
15800 expr "X$arg" : "X\\(.*\\)$as_nl";
15801 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15802 esac;
15803 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15804 '
15805 export as_echo_n_body
15806 as_echo_n='sh -c $as_echo_n_body as_echo'
15807 fi
15808 export as_echo_body
15809 as_echo='sh -c $as_echo_body as_echo'
15810fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015811
15812# The user is always right.
15813if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015814 PATH_SEPARATOR=:
15815 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15816 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15817 PATH_SEPARATOR=';'
15818 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015819fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015821
15822# IFS
15823# We need space, tab and new line, in precisely that order. Quoting is
15824# there to prevent editors from complaining about space-tab.
15825# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15826# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015827IFS=" "" $as_nl"
15828
15829# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015830as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015831case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015832 *[\\/]* ) as_myself=$0 ;;
15833 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015834for as_dir in $PATH
15835do
15836 IFS=$as_save_IFS
15837 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015838 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15839 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015840IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015841
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015842 ;;
15843esac
15844# We did not find ourselves, most probably we were run as `sh COMMAND'
15845# in which case we are not to be found in the path.
15846if test "x$as_myself" = x; then
15847 as_myself=$0
15848fi
15849if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015850 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15851 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015852fi
15853
Matthias Kloseb9621712010-04-24 17:59:49 +000015854# Unset variables that we do not need and which cause bugs (e.g. in
15855# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15856# suppresses any "Segmentation fault" message there. '((' could
15857# trigger a bug in pdksh 5.2.14.
15858for as_var in BASH_ENV ENV MAIL MAILPATH
15859do eval test x\${$as_var+set} = xset \
15860 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015861done
15862PS1='$ '
15863PS2='> '
15864PS4='+ '
15865
15866# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015867LC_ALL=C
15868export LC_ALL
15869LANGUAGE=C
15870export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015871
Matthias Kloseb9621712010-04-24 17:59:49 +000015872# CDPATH.
15873(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15874
15875
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015876# as_fn_error STATUS ERROR [LINENO LOG_FD]
15877# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015878# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15879# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015880# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015881as_fn_error ()
15882{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015883 as_status=$1; test $as_status -eq 0 && as_status=1
15884 if test "$4"; then
15885 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15886 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015887 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015888 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015889 as_fn_exit $as_status
15890} # as_fn_error
15891
15892
15893# as_fn_set_status STATUS
15894# -----------------------
15895# Set $? to STATUS, without forking.
15896as_fn_set_status ()
15897{
15898 return $1
15899} # as_fn_set_status
15900
15901# as_fn_exit STATUS
15902# -----------------
15903# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15904as_fn_exit ()
15905{
15906 set +e
15907 as_fn_set_status $1
15908 exit $1
15909} # as_fn_exit
15910
15911# as_fn_unset VAR
15912# ---------------
15913# Portably unset VAR.
15914as_fn_unset ()
15915{
15916 { eval $1=; unset $1;}
15917}
15918as_unset=as_fn_unset
15919# as_fn_append VAR VALUE
15920# ----------------------
15921# Append the text in VALUE to the end of the definition contained in VAR. Take
15922# advantage of any shell optimizations that allow amortized linear growth over
15923# repeated appends, instead of the typical quadratic growth present in naive
15924# implementations.
15925if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15926 eval 'as_fn_append ()
15927 {
15928 eval $1+=\$2
15929 }'
15930else
15931 as_fn_append ()
15932 {
15933 eval $1=\$$1\$2
15934 }
15935fi # as_fn_append
15936
15937# as_fn_arith ARG...
15938# ------------------
15939# Perform arithmetic evaluation on the ARGs, and store the result in the
15940# global $as_val. Take advantage of shells that can avoid forks. The arguments
15941# must be portable across $(()) and expr.
15942if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15943 eval 'as_fn_arith ()
15944 {
15945 as_val=$(( $* ))
15946 }'
15947else
15948 as_fn_arith ()
15949 {
15950 as_val=`expr "$@" || test $? -eq 1`
15951 }
15952fi # as_fn_arith
15953
15954
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015955if expr a : '\(a\)' >/dev/null 2>&1 &&
15956 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15957 as_expr=expr
15958else
15959 as_expr=false
15960fi
15961
15962if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15963 as_basename=basename
15964else
15965 as_basename=false
15966fi
15967
Matthias Kloseb9621712010-04-24 17:59:49 +000015968if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15969 as_dirname=dirname
15970else
15971 as_dirname=false
15972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015974as_me=`$as_basename -- "$0" ||
15975$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15976 X"$0" : 'X\(//\)$' \| \
15977 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015978$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015979 sed '/^.*\/\([^/][^/]*\)\/*$/{
15980 s//\1/
15981 q
15982 }
15983 /^X\/\(\/\/\)$/{
15984 s//\1/
15985 q
15986 }
15987 /^X\/\(\/\).*/{
15988 s//\1/
15989 q
15990 }
15991 s/.*/./; q'`
15992
Matthias Kloseb9621712010-04-24 17:59:49 +000015993# Avoid depending upon Character Ranges.
15994as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15995as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15996as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15997as_cr_digits='0123456789'
15998as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015999
16000ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016001case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016002-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016003 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016004 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016005 xy) ECHO_C='\c';;
16006 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16007 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016008 esac;;
16009*)
16010 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016011esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016012
Martin v. Löwis11437992002-04-12 09:54:03 +000016013rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016014if test -d conf$$.dir; then
16015 rm -f conf$$.dir/conf$$.file
16016else
16017 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016018 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016019fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016020if (echo >conf$$.file) 2>/dev/null; then
16021 if ln -s conf$$.file conf$$ 2>/dev/null; then
16022 as_ln_s='ln -s'
16023 # ... but there are two gotchas:
16024 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16025 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016026 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016027 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016028 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016029 elif ln conf$$.file conf$$ 2>/dev/null; then
16030 as_ln_s=ln
16031 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016032 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016033 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016034else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016035 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016037rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16038rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016039
Matthias Kloseb9621712010-04-24 17:59:49 +000016040
16041# as_fn_mkdir_p
16042# -------------
16043# Create "$as_dir" as a directory, including parents if necessary.
16044as_fn_mkdir_p ()
16045{
16046
16047 case $as_dir in #(
16048 -*) as_dir=./$as_dir;;
16049 esac
16050 test -d "$as_dir" || eval $as_mkdir_p || {
16051 as_dirs=
16052 while :; do
16053 case $as_dir in #(
16054 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16055 *) as_qdir=$as_dir;;
16056 esac
16057 as_dirs="'$as_qdir' $as_dirs"
16058 as_dir=`$as_dirname -- "$as_dir" ||
16059$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16060 X"$as_dir" : 'X\(//\)[^/]' \| \
16061 X"$as_dir" : 'X\(//\)$' \| \
16062 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16063$as_echo X"$as_dir" |
16064 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16065 s//\1/
16066 q
16067 }
16068 /^X\(\/\/\)[^/].*/{
16069 s//\1/
16070 q
16071 }
16072 /^X\(\/\/\)$/{
16073 s//\1/
16074 q
16075 }
16076 /^X\(\/\).*/{
16077 s//\1/
16078 q
16079 }
16080 s/.*/./; q'`
16081 test -d "$as_dir" && break
16082 done
16083 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016084 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016085
16086
16087} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016088if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016089 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016090else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016091 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016092 as_mkdir_p=false
16093fi
16094
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016095
16096# as_fn_executable_p FILE
16097# -----------------------
16098# Test if FILE is an executable regular file.
16099as_fn_executable_p ()
16100{
16101 test -f "$1" && test -x "$1"
16102} # as_fn_executable_p
16103as_test_x='test -x'
16104as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016105
16106# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016107as_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 +000016108
16109# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016110as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016111
16112
Martin v. Löwis11437992002-04-12 09:54:03 +000016113exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016114## ----------------------------------- ##
16115## Main body of $CONFIG_STATUS script. ##
16116## ----------------------------------- ##
16117_ASEOF
16118test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016119
Matthias Kloseb9621712010-04-24 17:59:49 +000016120cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16121# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016122# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016123# values after options handling.
16124ac_log="
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016125This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016126generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016127
16128 CONFIG_FILES = $CONFIG_FILES
16129 CONFIG_HEADERS = $CONFIG_HEADERS
16130 CONFIG_LINKS = $CONFIG_LINKS
16131 CONFIG_COMMANDS = $CONFIG_COMMANDS
16132 $ $0 $@
16133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016134on `(hostname || uname -n) 2>/dev/null | sed 1q`
16135"
16136
Martin v. Löwis11437992002-04-12 09:54:03 +000016137_ACEOF
16138
Matthias Kloseb9621712010-04-24 17:59:49 +000016139case $ac_config_files in *"
16140"*) set x $ac_config_files; shift; ac_config_files=$*;;
16141esac
16142
16143case $ac_config_headers in *"
16144"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16145esac
16146
16147
16148cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016149# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016150config_files="$ac_config_files"
16151config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016152
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016153_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016154
Matthias Kloseb9621712010-04-24 17:59:49 +000016155cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016156ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016157\`$as_me' instantiates files and other configuration actions
16158from templates according to the current configuration. Unless the files
16159and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016160
Matthias Kloseb9621712010-04-24 17:59:49 +000016161Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016162
16163 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016164 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016165 --config print configuration, then exit
16166 -q, --quiet, --silent
16167 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016168 -d, --debug don't remove temporary files
16169 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016170 --file=FILE[:TEMPLATE]
16171 instantiate the configuration file FILE
16172 --header=FILE[:TEMPLATE]
16173 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016174
16175Configuration files:
16176$config_files
16177
16178Configuration headers:
16179$config_headers
16180
Matthias Kloseb9621712010-04-24 17:59:49 +000016181Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016184cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16185ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016186ac_cs_version="\\
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016187python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016188configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016189 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016190
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016191Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016192This config.status script is free software; the Free Software Foundation
16193gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016194
16195ac_pwd='$ac_pwd'
16196srcdir='$srcdir'
16197INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016198MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016199test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016200_ACEOF
16201
Matthias Kloseb9621712010-04-24 17:59:49 +000016202cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16203# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016204ac_need_defaults=:
16205while test $# != 0
16206do
16207 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016208 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016209 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16210 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016211 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016212 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016213 --*=)
16214 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16215 ac_optarg=
16216 ac_shift=:
16217 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016218 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016219 ac_option=$1
16220 ac_optarg=$2
16221 ac_shift=shift
16222 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016223 esac
16224
Skip Montanaro6dead952003-09-25 14:50:04 +000016225 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016226 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016227 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16228 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016229 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016230 $as_echo "$ac_cs_version"; exit ;;
16231 --config | --confi | --conf | --con | --co | --c )
16232 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016233 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016234 debug=: ;;
16235 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016236 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016237 case $ac_optarg in
16238 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016239 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016240 esac
16241 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016242 ac_need_defaults=false;;
16243 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016244 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016245 case $ac_optarg in
16246 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16247 esac
16248 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016249 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016250 --he | --h)
16251 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016252 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016253Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016254 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016255 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016256 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16257 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16258 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016259
16260 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016261 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016262Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016263
Matthias Kloseb9621712010-04-24 17:59:49 +000016264 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016265 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016266
16267 esac
16268 shift
16269done
16270
Skip Montanaro6dead952003-09-25 14:50:04 +000016271ac_configure_extra_args=
16272
16273if $ac_cs_silent; then
16274 exec 6>/dev/null
16275 ac_configure_extra_args="$ac_configure_extra_args --silent"
16276fi
16277
16278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016279cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016280if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016281 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016282 shift
16283 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16284 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016285 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016286 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016287fi
16288
Martin v. Löwis11437992002-04-12 09:54:03 +000016289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016290cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016291exec 5>>config.log
16292{
16293 echo
16294 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16295## Running $as_me. ##
16296_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016297 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016298} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016301cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016302_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016303
Matthias Kloseb9621712010-04-24 17:59:49 +000016304cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016305
16306# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016307for ac_config_target in $ac_config_targets
16308do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016309 case $ac_config_target in
16310 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16311 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16312 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016313 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16314 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016315 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16316 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016317 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016318 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016319 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016320
Victor Stinnere0be4232011-10-25 13:06:09 +020016321 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016322 esac
16323done
16324
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016325
Martin v. Löwis11437992002-04-12 09:54:03 +000016326# If the user did not use the arguments to specify the items to instantiate,
16327# then the envvar interface is used. Set only those that are not.
16328# We use the long form for the default assignment because of an extremely
16329# bizarre bug on SunOS 4.1.3.
16330if $ac_need_defaults; then
16331 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16332 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16333fi
16334
Skip Montanaro6dead952003-09-25 14:50:04 +000016335# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016336# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016337# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016338# Hook for its removal unless debugging.
16339# Note that there is a small window in which the directory will not be cleaned:
16340# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016341$debug ||
16342{
Victor Stinnere0be4232011-10-25 13:06:09 +020016343 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016344 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016345 : "${ac_tmp:=$tmp}"
16346 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016347' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016348 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016349}
Martin v. Löwis11437992002-04-12 09:54:03 +000016350# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016351
Martin v. Löwis11437992002-04-12 09:54:03 +000016352{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016353 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016354 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016355} ||
16356{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016357 tmp=./conf$$-$RANDOM
16358 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016359} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016360ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016361
Matthias Kloseb9621712010-04-24 17:59:49 +000016362# Set up the scripts for CONFIG_FILES section.
16363# No need to generate them if there are no CONFIG_FILES.
16364# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016365if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016366
Matthias Kloseb9621712010-04-24 17:59:49 +000016367
16368ac_cr=`echo X | tr X '\015'`
16369# On cygwin, bash can eat \r inside `` if the user requested igncr.
16370# But we know of no other shell where ac_cr would be empty at this
16371# point, so we can use a bashism as a fallback.
16372if test "x$ac_cr" = x; then
16373 eval ac_cr=\$\'\\r\'
16374fi
16375ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16376if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016377 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016378else
16379 ac_cs_awk_cr=$ac_cr
16380fi
16381
Victor Stinnere0be4232011-10-25 13:06:09 +020016382echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016383_ACEOF
16384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016385
Matthias Kloseb9621712010-04-24 17:59:49 +000016386{
16387 echo "cat >conf$$subs.awk <<_ACEOF" &&
16388 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16389 echo "_ACEOF"
16390} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016391 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16392ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016393ac_delim='%!_!# '
16394for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016395 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016396 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016397
Matthias Kloseb9621712010-04-24 17:59:49 +000016398 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16399 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016400 break
16401 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016402 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016403 else
16404 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016405 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016406done
Matthias Kloseb9621712010-04-24 17:59:49 +000016407rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016408
Matthias Kloseb9621712010-04-24 17:59:49 +000016409cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016410cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016412sed -n '
16413h
16414s/^/S["/; s/!.*/"]=/
16415p
16416g
16417s/^[^!]*!//
16418:repl
16419t repl
16420s/'"$ac_delim"'$//
16421t delim
16422:nl
16423h
16424s/\(.\{148\}\)..*/\1/
16425t more1
16426s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16427p
16428n
16429b repl
16430:more1
16431s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16432p
16433g
16434s/.\{148\}//
16435t nl
16436:delim
16437h
16438s/\(.\{148\}\)..*/\1/
16439t more2
16440s/["\\]/\\&/g; s/^/"/; s/$/"/
16441p
16442b
16443:more2
16444s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16445p
16446g
16447s/.\{148\}//
16448t delim
16449' <conf$$subs.awk | sed '
16450/^[^""]/{
16451 N
16452 s/\n//
16453}
16454' >>$CONFIG_STATUS || ac_write_fail=1
16455rm -f conf$$subs.awk
16456cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16457_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016458cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016459 for (key in S) S_is_set[key] = 1
16460 FS = ""
16461
16462}
16463{
16464 line = $ 0
16465 nfields = split(line, field, "@")
16466 substed = 0
16467 len = length(field[1])
16468 for (i = 2; i < nfields; i++) {
16469 key = field[i]
16470 keylen = length(key)
16471 if (S_is_set[key]) {
16472 value = S[key]
16473 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16474 len += length(value) + length(field[++i])
16475 substed = 1
16476 } else
16477 len += 1 + keylen
16478 }
16479
16480 print line
16481}
16482
16483_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016485cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16486if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16487 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16488else
16489 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016490fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016491 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016492_ACEOF
16493
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016494# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16495# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016496# trailing colons and then remove the whole line if VPATH becomes empty
16497# (actually we leave an empty line to preserve line numbers).
16498if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016499 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16500h
16501s///
16502s/^/:/
16503s/[ ]*$/:/
16504s/:\$(srcdir):/:/g
16505s/:\${srcdir}:/:/g
16506s/:@srcdir@:/:/g
16507s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016508s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016509x
16510s/\(=[ ]*\).*/\1/
16511G
16512s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016513s/^[^=]*=[ ]*$//
16514}'
16515fi
16516
Matthias Kloseb9621712010-04-24 17:59:49 +000016517cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016518fi # test -n "$CONFIG_FILES"
16519
Matthias Kloseb9621712010-04-24 17:59:49 +000016520# Set up the scripts for CONFIG_HEADERS section.
16521# No need to generate them if there are no CONFIG_HEADERS.
16522# This happens for instance with `./config.status Makefile'.
16523if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016524cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016525BEGIN {
16526_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016527
Matthias Kloseb9621712010-04-24 17:59:49 +000016528# Transform confdefs.h into an awk script `defines.awk', embedded as
16529# here-document in config.status, that substitutes the proper values into
16530# config.h.in to produce config.h.
16531
16532# Create a delimiter string that does not exist in confdefs.h, to ease
16533# handling of long lines.
16534ac_delim='%!_!# '
16535for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016536 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16537 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016538 break
16539 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016540 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016541 else
16542 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16543 fi
16544done
16545
16546# For the awk script, D is an array of macro values keyed by name,
16547# likewise P contains macro parameters if any. Preserve backslash
16548# newline sequences.
16549
16550ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16551sed -n '
16552s/.\{148\}/&'"$ac_delim"'/g
16553t rset
16554:rset
16555s/^[ ]*#[ ]*define[ ][ ]*/ /
16556t def
16557d
16558:def
16559s/\\$//
16560t bsnl
16561s/["\\]/\\&/g
16562s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16563D["\1"]=" \3"/p
16564s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16565d
16566:bsnl
16567s/["\\]/\\&/g
16568s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16569D["\1"]=" \3\\\\\\n"\\/p
16570t cont
16571s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16572t cont
16573d
16574:cont
16575n
16576s/.\{148\}/&'"$ac_delim"'/g
16577t clear
16578:clear
16579s/\\$//
16580t bsnlc
16581s/["\\]/\\&/g; s/^/"/; s/$/"/p
16582d
16583:bsnlc
16584s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16585b cont
16586' <confdefs.h | sed '
16587s/'"$ac_delim"'/"\\\
16588"/g' >>$CONFIG_STATUS || ac_write_fail=1
16589
16590cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16591 for (key in D) D_is_set[key] = 1
16592 FS = ""
16593}
16594/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16595 line = \$ 0
16596 split(line, arg, " ")
16597 if (arg[1] == "#") {
16598 defundef = arg[2]
16599 mac1 = arg[3]
16600 } else {
16601 defundef = substr(arg[1], 2)
16602 mac1 = arg[2]
16603 }
16604 split(mac1, mac2, "(") #)
16605 macro = mac2[1]
16606 prefix = substr(line, 1, index(line, defundef) - 1)
16607 if (D_is_set[macro]) {
16608 # Preserve the white space surrounding the "#".
16609 print prefix "define", macro P[macro] D[macro]
16610 next
16611 } else {
16612 # Replace #undef with comments. This is necessary, for example,
16613 # in the case of _POSIX_SOURCE, which is predefined and required
16614 # on some systems where configure will not decide to define it.
16615 if (defundef == "undef") {
16616 print "/*", prefix defundef, macro, "*/"
16617 next
16618 }
16619 }
16620}
16621{ print }
16622_ACAWK
16623_ACEOF
16624cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016625 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016626fi # test -n "$CONFIG_HEADERS"
16627
16628
16629eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16630shift
16631for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016632do
16633 case $ac_tag in
16634 :[FHLC]) ac_mode=$ac_tag; continue;;
16635 esac
16636 case $ac_mode$ac_tag in
16637 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016638 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016639 :[FH]-) ac_tag=-:-;;
16640 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16641 esac
16642 ac_save_IFS=$IFS
16643 IFS=:
16644 set x $ac_tag
16645 IFS=$ac_save_IFS
16646 shift
16647 ac_file=$1
16648 shift
16649
16650 case $ac_mode in
16651 :L) ac_source=$1;;
16652 :[FH])
16653 ac_file_inputs=
16654 for ac_f
16655 do
16656 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016657 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016658 *) # Look for the file first in the build tree, then in the source tree
16659 # (if the path is not absolute). The absolute path cannot be DOS-style,
16660 # because $ac_f cannot contain `:'.
16661 test -f "$ac_f" ||
16662 case $ac_f in
16663 [\\/$]*) false;;
16664 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16665 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016666 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016667 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016668 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16669 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016670 done
16671
16672 # Let's still pretend it is `configure' which instantiates (i.e., don't
16673 # use $as_me), people would be surprised to read:
16674 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016675 configure_input='Generated from '`
16676 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16677 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016678 if test x"$ac_file" != x-; then
16679 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016680 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16681$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016682 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016683 # Neutralize special characters interpreted by sed in replacement strings.
16684 case $configure_input in #(
16685 *\&* | *\|* | *\\* )
16686 ac_sed_conf_input=`$as_echo "$configure_input" |
16687 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16688 *) ac_sed_conf_input=$configure_input;;
16689 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016690
16691 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016692 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16693 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016694 esac
16695 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016696 esac
16697
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016698 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016699$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016700 X"$ac_file" : 'X\(//\)[^/]' \| \
16701 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016702 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016703$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016704 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16705 s//\1/
16706 q
16707 }
16708 /^X\(\/\/\)[^/].*/{
16709 s//\1/
16710 q
16711 }
16712 /^X\(\/\/\)$/{
16713 s//\1/
16714 q
16715 }
16716 /^X\(\/\).*/{
16717 s//\1/
16718 q
16719 }
16720 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016721 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016722 ac_builddir=.
16723
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016724case "$ac_dir" in
16725.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16726*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016727 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016728 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016729 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016730 case $ac_top_builddir_sub in
16731 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16732 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16733 esac ;;
16734esac
16735ac_abs_top_builddir=$ac_pwd
16736ac_abs_builddir=$ac_pwd$ac_dir_suffix
16737# for backward compatibility:
16738ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016739
16740case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016741 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016742 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016743 ac_top_srcdir=$ac_top_builddir_sub
16744 ac_abs_top_srcdir=$ac_pwd ;;
16745 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016746 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016747 ac_top_srcdir=$srcdir
16748 ac_abs_top_srcdir=$srcdir ;;
16749 *) # Relative name.
16750 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16751 ac_top_srcdir=$ac_top_build_prefix$srcdir
16752 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016753esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016754ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016755
Martin v. Löwis11437992002-04-12 09:54:03 +000016756
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016757 case $ac_mode in
16758 :F)
16759 #
16760 # CONFIG_FILE
16761 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016762
16763 case $INSTALL in
16764 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016765 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016766 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016767 ac_MKDIR_P=$MKDIR_P
16768 case $MKDIR_P in
16769 [\\/$]* | ?:[\\/]* ) ;;
16770 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16771 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016772_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016773
Matthias Kloseb9621712010-04-24 17:59:49 +000016774cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016775# If the template does not know about datarootdir, expand it.
16776# FIXME: This hack should be removed a few years after 2.60.
16777ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016778ac_sed_dataroot='
16779/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016780 p
16781 q
16782}
16783/@datadir@/p
16784/@docdir@/p
16785/@infodir@/p
16786/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016787/@mandir@/p'
16788case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016789*datarootdir*) ac_datarootdir_seen=yes;;
16790*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016791 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16792$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016794cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016795 ac_datarootdir_hack='
16796 s&@datadir@&$datadir&g
16797 s&@docdir@&$docdir&g
16798 s&@infodir@&$infodir&g
16799 s&@localedir@&$localedir&g
16800 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016801 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016802esac
16803_ACEOF
16804
16805# Neutralize VPATH when `$srcdir' = `.'.
16806# Shell code in configure.ac might set extrasub.
16807# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016808cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16809ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016810$extrasub
16811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016812cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016813:t
16814/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016815s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016816s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016817s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016818s&@srcdir@&$ac_srcdir&;t t
16819s&@abs_srcdir@&$ac_abs_srcdir&;t t
16820s&@top_srcdir@&$ac_top_srcdir&;t t
16821s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16822s&@builddir@&$ac_builddir&;t t
16823s&@abs_builddir@&$ac_abs_builddir&;t t
16824s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16825s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016826s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016827$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016828"
Victor Stinnere0be4232011-10-25 13:06:09 +020016829eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16830 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016832test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016833 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16834 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16835 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016837which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016838$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016839which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016840
Victor Stinnere0be4232011-10-25 13:06:09 +020016841 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016842 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016843 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16844 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016845 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016846 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016847 ;;
16848 :H)
16849 #
16850 # CONFIG_HEADER
16851 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016852 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016853 {
16854 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016855 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16856 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016857 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016858 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016859 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16860$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016861 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016862 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016863 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016864 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016865 fi
16866 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016867 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016868 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016869 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016870 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016871 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016872
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016873
16874 esac
16875
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016876
16877 case $ac_file$ac_mode in
16878 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16879
16880 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016881done # for ac_tag
16882
Guido van Rossum627b2d71993-12-24 10:39:16 +000016883
Matthias Kloseb9621712010-04-24 17:59:49 +000016884as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016885_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016886ac_clean_files=$ac_clean_files_save
16887
Matthias Kloseb9621712010-04-24 17:59:49 +000016888test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016889 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016890
Martin v. Löwis11437992002-04-12 09:54:03 +000016891
16892# configure is writing to config.log, and then calls config.status.
16893# config.status does its own redirection, appending to config.log.
16894# Unfortunately, on DOS this fails, as config.log is still kept open
16895# by configure, so config.status won't be able to write to it; its
16896# output is simply discarded. So we exec the FD to /dev/null,
16897# effectively closing config.log, so it can be properly (re)opened and
16898# appended to by config.status. When coming back to configure, we
16899# need to make the FD available again.
16900if test "$no_create" != yes; then
16901 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016902 ac_config_status_args=
16903 test "$silent" = yes &&
16904 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016905 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016906 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016907 exec 5>>config.log
16908 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16909 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016910 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016911fi
16912if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16913 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16914$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016915fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016916
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016917
Christian Heimes75ed8902013-11-20 01:11:18 +010016918echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016919if test ! -f Modules/Setup
16920then
16921 cp $srcdir/Modules/Setup.dist Modules/Setup
16922fi
16923
Christian Heimes75ed8902013-11-20 01:11:18 +010016924echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016925if test ! -f Modules/Setup.local
16926then
16927 echo "# Edit this file for local setup changes" >Modules/Setup.local
16928fi
16929
Christian Heimes75ed8902013-11-20 01:11:18 +010016930echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016931$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16932 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016933 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016934mv config.c Modules