blob: 983f68c49c957a6887d1729356f538a8582febb9 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ned Deilycbfb9a52012-06-23 16:02:19 -07003# Generated by GNU Autoconf 2.69 for python 3.3.
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#
Ned Deilycbfb9a52012-06-23 16:02:19 -07008# 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
Ned Deilycbfb9a52012-06-23 16:02:19 -0700137# 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
Ned Deilycbfb9a52012-06-23 16:02:19 -0700195test 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 :
Ned Deilycbfb9a52012-06-23 16:02:19 -0700241 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
Ned Deilycbfb9a52012-06-23 16:02:19 -0700362
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
Ned Deilycbfb9a52012-06-23 16:02:19 -0700491 # 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.
Ned Deilycbfb9a52012-06-23 16:02:19 -0700529 # 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 ||
Ned Deilycbfb9a52012-06-23 16:02:19 -0700531 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
Ned Deilycbfb9a52012-06-23 16:02:19 -0700535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ned Deilycbfb9a52012-06-23 16:02:19 -0700538 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
Ned Deilycbfb9a52012-06-23 16:02:19 -0700550as_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'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000583PACKAGE_VERSION='3.3'
584PACKAGE_STRING='python 3.3'
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
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000626SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000627THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000628SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000629LIBC
630LIBM
631HAVE_GETHOSTBYNAME
632HAVE_GETHOSTBYNAME_R
633HAVE_GETHOSTBYNAME_R_3_ARG
634HAVE_GETHOSTBYNAME_R_5_ARG
635HAVE_GETHOSTBYNAME_R_6_ARG
636LIBOBJS
637TRUE
638MACHDEP_OBJS
639DYNLOADFILE
640DLINCLDIR
641THREADOBJ
642LDLAST
643USE_THREAD_MODULE
644SIGNAL_OBJS
645USE_SIGNAL_MODULE
646LIBFFI_INCLUDEDIR
647PKG_CONFIG
648SHLIBS
649CFLAGSFORSHARED
650LINKFORSHARED
651CCSHARED
652BLDSHARED
653LDCXXSHARED
654LDSHARED
655SO
656LIBTOOL_CRUFT
657OTHER_LIBTOOL_OPT
658UNIVERSAL_ARCH_FLAGS
659BASECFLAGS
660OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000661ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000662LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100663MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000664INSTALL_DATA
665INSTALL_SCRIPT
666INSTALL_PROGRAM
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500667HAS_PYTHON
668DISABLE_ASDLGEN
Matthias Kloseb9621712010-04-24 17:59:49 +0000669ARFLAGS
670AR
671RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000672USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000673GNULD
674LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000675LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000676RUNSHARED
677INSTSONAME
678LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000679PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000680BLDLIBRARY
681DLLLIBRARY
682LDLIBRARY
683LIBRARY
684BUILDEXEEXT
685EGREP
686GREP
687CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200688NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000689MAINCC
690CXX
691OBJEXT
692EXEEXT
693ac_ct_CC
694CPPFLAGS
695LDFLAGS
696CFLAGS
697CC
698EXPORT_MACOSX_DEPLOYMENT_TARGET
699CONFIGURE_MACOSX_DEPLOYMENT_TARGET
700SGI_ABI
701MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000702FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000703FRAMEWORKUNIXTOOLSPREFIX
704FRAMEWORKALTINSTALLLAST
705FRAMEWORKALTINSTALLFIRST
706FRAMEWORKINSTALLLAST
707FRAMEWORKINSTALLFIRST
708PYTHONFRAMEWORKINSTALLDIR
709PYTHONFRAMEWORKPREFIX
710PYTHONFRAMEWORKDIR
711PYTHONFRAMEWORKIDENTIFIER
712PYTHONFRAMEWORK
713LIPO_32BIT_FLAGS
714ARCH_RUN_32BIT
715UNIVERSALSDK
716CONFIG_ARGS
717SOVERSION
718VERSION
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100719host_os
720host_vendor
721host_cpu
722host
723build_os
724build_vendor
725build_cpu
726build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500727HAS_HG
728HGBRANCH
729HGTAG
730HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000731target_alias
732host_alias
733build_alias
734LIBS
735ECHO_T
736ECHO_N
737ECHO_C
738DEFS
739mandir
740localedir
741libdir
742psdir
743pdfdir
744dvidir
745htmldir
746infodir
747docdir
748oldincludedir
749includedir
750localstatedir
751sharedstatedir
752sysconfdir
753datadir
754datarootdir
755libexecdir
756sbindir
757bindir
758program_transform_name
759prefix
760exec_prefix
761PACKAGE_URL
762PACKAGE_BUGREPORT
763PACKAGE_STRING
764PACKAGE_VERSION
765PACKAGE_TARNAME
766PACKAGE_NAME
767PATH_SEPARATOR
768SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000769ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000770ac_user_opts='
771enable_option_checking
772enable_universalsdk
773with_universal_archs
774with_framework_name
775enable_framework
776with_gcc
777with_cxx_main
778with_suffix
779enable_shared
780enable_profiling
781with_pydebug
782with_libs
783with_system_expat
784with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100785with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000786enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000787with_dbmliborder
788with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000789with_threads
790with_thread
791enable_ipv6
792with_doc_strings
793with_tsc
794with_pymalloc
795with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000796with_fpectl
797with_libm
798with_libc
799enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000800with_computed_gotos
801'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000802 ac_precious_vars='build_alias
803host_alias
804target_alias
805CC
806CFLAGS
807LDFLAGS
808LIBS
809CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200810CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000811
Guido van Rossum627b2d71993-12-24 10:39:16 +0000812
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000814ac_init_help=
815ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000816ac_unrecognized_opts=
817ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818# The variables have the same names as the options, with
819# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000820cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000821exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000823no_recursion=
824prefix=NONE
825program_prefix=NONE
826program_suffix=NONE
827program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000828silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000829site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000832x_includes=NONE
833x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000834
835# Installation directory options.
836# These are left unexpanded so users can "make install exec_prefix=/foo"
837# and all the variables that are supposed to be based on exec_prefix
838# by default will actually change.
839# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841bindir='${exec_prefix}/bin'
842sbindir='${exec_prefix}/sbin'
843libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000844datarootdir='${prefix}/share'
845datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000846sysconfdir='${prefix}/etc'
847sharedstatedir='${prefix}/com'
848localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000849includedir='${prefix}/include'
850oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
852infodir='${datarootdir}/info'
853htmldir='${docdir}'
854dvidir='${docdir}'
855pdfdir='${docdir}'
856psdir='${docdir}'
857libdir='${exec_prefix}/lib'
858localedir='${datarootdir}/locale'
859mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000864do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865 # If the previous option needs an argument, assign it.
866 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868 ac_prev=
869 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000870 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000872 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200873 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
874 *=) ac_optarg= ;;
875 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000876 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878 # Accept the important Cygnus configure options, so we can diagnose typos.
879
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880 case $ac_dashdash$ac_option in
881 --)
882 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000884 -bindir | --bindir | --bindi | --bind | --bin | --bi)
885 ac_prev=bindir ;;
886 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000887 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000888
889 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000890 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000892 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000894 -cache-file | --cache-file | --cache-fil | --cache-fi \
895 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
896 ac_prev=cache_file ;;
897 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
898 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 cache_file=$ac_optarg ;;
900
901 --config-cache | -C)
902 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000903
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000904 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000905 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000907 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000909 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
910 | --dataroo | --dataro | --datar)
911 ac_prev=datarootdir ;;
912 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
913 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
914 datarootdir=$ac_optarg ;;
915
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000917 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000918 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000919 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200920 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000921 ac_useropt_orig=$ac_useropt
922 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
923 case $ac_user_opts in
924 *"
925"enable_$ac_useropt"
926"*) ;;
927 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
928 ac_unrecognized_sep=', ';;
929 esac
930 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931
932 -docdir | --docdir | --docdi | --doc | --do)
933 ac_prev=docdir ;;
934 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
935 docdir=$ac_optarg ;;
936
937 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
938 ac_prev=dvidir ;;
939 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
940 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
942 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000943 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000945 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200946 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000947 ac_useropt_orig=$ac_useropt
948 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
949 case $ac_user_opts in
950 *"
951"enable_$ac_useropt"
952"*) ;;
953 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
954 ac_unrecognized_sep=', ';;
955 esac
956 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
959 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
960 | --exec | --exe | --ex)
961 ac_prev=exec_prefix ;;
962 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
963 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
964 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966
967 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000968 # Obsolete; use --with-gas.
969 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 -help | --help | --hel | --he | -h)
972 ac_init_help=long ;;
973 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
974 ac_init_help=recursive ;;
975 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
976 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
978 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000979 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000983 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
984 ac_prev=htmldir ;;
985 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
986 | --ht=*)
987 htmldir=$ac_optarg ;;
988
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000989 -includedir | --includedir | --includedi | --included | --include \
990 | --includ | --inclu | --incl | --inc)
991 ac_prev=includedir ;;
992 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
993 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000994 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000995
996 -infodir | --infodir | --infodi | --infod | --info | --inf)
997 ac_prev=infodir ;;
998 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000
1001 -libdir | --libdir | --libdi | --libd)
1002 ac_prev=libdir ;;
1003 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005
1006 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1007 | --libexe | --libex | --libe)
1008 ac_prev=libexecdir ;;
1009 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1010 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001013 -localedir | --localedir | --localedi | --localed | --locale)
1014 ac_prev=localedir ;;
1015 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1016 localedir=$ac_optarg ;;
1017
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001018 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001019 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020 ac_prev=localstatedir ;;
1021 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001022 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001024
1025 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1026 ac_prev=mandir ;;
1027 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001031 # Obsolete; use --without-fp.
1032 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
1034 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001036 no_create=yes ;;
1037
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1039 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1040 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1043 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1044 | --oldin | --oldi | --old | --ol | --o)
1045 ac_prev=oldincludedir ;;
1046 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1047 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1048 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
Guido van Rossum7f43da71994-08-01 12:15:30 +00001051 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1052 ac_prev=prefix ;;
1053 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055
1056 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1057 | --program-pre | --program-pr | --program-p)
1058 ac_prev=program_prefix ;;
1059 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1060 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1064 | --program-suf | --program-su | --program-s)
1065 ac_prev=program_suffix ;;
1066 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1067 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001069
1070 -program-transform-name | --program-transform-name \
1071 | --program-transform-nam | --program-transform-na \
1072 | --program-transform-n | --program-transform- \
1073 | --program-transform | --program-transfor \
1074 | --program-transfo | --program-transf \
1075 | --program-trans | --program-tran \
1076 | --progr-tra | --program-tr | --program-t)
1077 ac_prev=program_transform_name ;;
1078 -program-transform-name=* | --program-transform-name=* \
1079 | --program-transform-nam=* | --program-transform-na=* \
1080 | --program-transform-n=* | --program-transform-=* \
1081 | --program-transform=* | --program-transfor=* \
1082 | --program-transfo=* | --program-transf=* \
1083 | --program-trans=* | --program-tran=* \
1084 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001087 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1088 ac_prev=pdfdir ;;
1089 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1090 pdfdir=$ac_optarg ;;
1091
1092 -psdir | --psdir | --psdi | --psd | --ps)
1093 ac_prev=psdir ;;
1094 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1095 psdir=$ac_optarg ;;
1096
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1098 | -silent | --silent | --silen | --sile | --sil)
1099 silent=yes ;;
1100
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001101 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1102 ac_prev=sbindir ;;
1103 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1104 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001106
1107 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1108 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1109 | --sharedst | --shareds | --shared | --share | --shar \
1110 | --sha | --sh)
1111 ac_prev=sharedstatedir ;;
1112 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1113 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1114 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1115 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001117
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118 -site | --site | --sit)
1119 ac_prev=site ;;
1120 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001122
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1124 ac_prev=srcdir ;;
1125 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001128 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1129 | --syscon | --sysco | --sysc | --sys | --sy)
1130 ac_prev=sysconfdir ;;
1131 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1132 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001134
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139
1140 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1141 verbose=yes ;;
1142
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 -version | --version | --versio | --versi | --vers | -V)
1144 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145
1146 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001147 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001148 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001149 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001150 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001151 ac_useropt_orig=$ac_useropt
1152 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1153 case $ac_user_opts in
1154 *"
1155"with_$ac_useropt"
1156"*) ;;
1157 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1158 ac_unrecognized_sep=', ';;
1159 esac
1160 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161
1162 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001163 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001164 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001165 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001166 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001167 ac_useropt_orig=$ac_useropt
1168 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1169 case $ac_user_opts in
1170 *"
1171"with_$ac_useropt"
1172"*) ;;
1173 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1174 ac_unrecognized_sep=', ';;
1175 esac
1176 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001178 --x)
1179 # Obsolete; use --with-x.
1180 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181
1182 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1183 | --x-incl | --x-inc | --x-in | --x-i)
1184 ac_prev=x_includes ;;
1185 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1186 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
1189 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1190 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1191 ac_prev=x_libraries ;;
1192 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1193 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001196 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1197Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198 ;;
1199
Martin v. Löwis11437992002-04-12 09:54:03 +00001200 *=*)
1201 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1202 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 case $ac_envvar in #(
1204 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001205 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001207 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001208 export $ac_envvar ;;
1209
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001210 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001211 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001213 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001215 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216 ;;
1217
1218 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001219done
1220
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001223 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001224fi
1225
Matthias Kloseb9621712010-04-24 17:59:49 +00001226if test -n "$ac_unrecognized_opts"; then
1227 case $enable_option_checking in
1228 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001229 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001230 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1231 esac
1232fi
1233
1234# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001235for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1236 datadir sysconfdir sharedstatedir localstatedir includedir \
1237 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1238 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001239do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001240 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001241 # Remove trailing slashes.
1242 case $ac_val in
1243 */ )
1244 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1245 eval $ac_var=\$ac_val;;
1246 esac
1247 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001249 [\\/$]* | ?:[\\/]* ) continue;;
1250 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001252 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001253done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001254
Martin v. Löwis11437992002-04-12 09:54:03 +00001255# There might be people who depend on the old broken behavior: `$host'
1256# used to hold the argument of --host etc.
1257# FIXME: To remove some day.
1258build=$build_alias
1259host=$host_alias
1260target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001261
Martin v. Löwis11437992002-04-12 09:54:03 +00001262# FIXME: To remove some day.
1263if test "x$host_alias" != x; then
1264 if test "x$build_alias" = x; then
1265 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 elif test "x$build_alias" != "x$host_alias"; then
1267 cross_compiling=yes
1268 fi
1269fi
1270
1271ac_tool_prefix=
1272test -n "$host_alias" && ac_tool_prefix=$host_alias-
1273
1274test "$silent" = yes && exec 6>/dev/null
1275
Guido van Rossum627b2d71993-12-24 10:39:16 +00001276
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277ac_pwd=`pwd` && test -n "$ac_pwd" &&
1278ac_ls_di=`ls -di .` &&
1279ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001280 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001281test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001282 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283
1284
Guido van Rossum627b2d71993-12-24 10:39:16 +00001285# Find the source files, if location was not specified.
1286if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001287 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001289 ac_confdir=`$as_dirname -- "$as_myself" ||
1290$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1291 X"$as_myself" : 'X\(//\)[^/]' \| \
1292 X"$as_myself" : 'X\(//\)$' \| \
1293 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1294$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1296 s//\1/
1297 q
1298 }
1299 /^X\(\/\/\)[^/].*/{
1300 s//\1/
1301 q
1302 }
1303 /^X\(\/\/\)$/{
1304 s//\1/
1305 q
1306 }
1307 /^X\(\/\).*/{
1308 s//\1/
1309 q
1310 }
1311 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001312 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001313 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314 srcdir=..
1315 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001316else
1317 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001319if test ! -r "$srcdir/$ac_unique_file"; then
1320 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001321 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001323ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1324ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001325 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001326 pwd)`
1327# When building in place, set srcdir=.
1328if test "$ac_abs_confdir" = "$ac_pwd"; then
1329 srcdir=.
1330fi
1331# Remove unnecessary trailing slashes from srcdir.
1332# Double slashes in file names in object file debugging info
1333# mess up M-x gdb in Emacs.
1334case $srcdir in
1335*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1336esac
1337for ac_var in $ac_precious_vars; do
1338 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1339 eval ac_env_${ac_var}_value=\$${ac_var}
1340 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1341 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1342done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001343
Martin v. Löwis11437992002-04-12 09:54:03 +00001344#
1345# Report the --help message.
1346#
1347if test "$ac_init_help" = "long"; then
1348 # Omit some internal or obsolete options to make the list less imposing.
1349 # This message is too long to be a string in the A/UX 3.1 sh.
1350 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001351\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001352
1353Usage: $0 [OPTION]... [VAR=VALUE]...
1354
1355To assign environment variables (e.g., CC, CFLAGS...), specify them as
1356VAR=VALUE. See below for descriptions of some of the useful variables.
1357
1358Defaults for the options are specified in brackets.
1359
1360Configuration:
1361 -h, --help display this help and exit
1362 --help=short display options specific to this package
1363 --help=recursive display the short help of all the included packages
1364 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001365 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001366 --cache-file=FILE cache test results in FILE [disabled]
1367 -C, --config-cache alias for \`--cache-file=config.cache'
1368 -n, --no-create do not create output files
1369 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1370
Martin v. Löwis11437992002-04-12 09:54:03 +00001371Installation directories:
1372 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001373 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001374 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001375 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001376
1377By default, \`make install' will install all the files in
1378\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1379an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1380for instance \`--prefix=\$HOME'.
1381
1382For better control, use the options below.
1383
1384Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001385 --bindir=DIR user executables [EPREFIX/bin]
1386 --sbindir=DIR system admin executables [EPREFIX/sbin]
1387 --libexecdir=DIR program executables [EPREFIX/libexec]
1388 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1389 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1390 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1391 --libdir=DIR object code libraries [EPREFIX/lib]
1392 --includedir=DIR C header files [PREFIX/include]
1393 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1394 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1395 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1396 --infodir=DIR info documentation [DATAROOTDIR/info]
1397 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1398 --mandir=DIR man documentation [DATAROOTDIR/man]
1399 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1400 --htmldir=DIR html documentation [DOCDIR]
1401 --dvidir=DIR dvi documentation [DOCDIR]
1402 --pdfdir=DIR pdf documentation [DOCDIR]
1403 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001404_ACEOF
1405
1406 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001407
1408System types:
1409 --build=BUILD configure for building on BUILD [guessed]
1410 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001411_ACEOF
1412fi
1413
1414if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001415 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001416 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001417 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 cat <<\_ACEOF
1419
1420Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001421 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001422 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1423 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001424 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001425 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001426 --enable-framework[=INSTALLDIR]
1427 Build (MacOSX|Darwin) framework
1428 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001429 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001430 --enable-loadable-sqlite-extensions
1431 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001432 --enable-ipv6 Enable ipv6 (with ipv4) support
1433 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001434 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001435 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001436
1437Optional Packages:
1438 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1439 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001440 --with-universal-archs=ARCH
1441 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001442 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001443 --with-framework-name=FRAMEWORK
1444 specify an alternate name of the framework built
1445 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001446 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001447 --with-cxx-main=<compiler>
1448 compile main() and link python executable with C++
1449 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001450 --with-suffix=.exe set executable suffix
1451 --with-pydebug build with Py_DEBUG defined
1452 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001453 --with-system-expat build pyexpat module using an installed expat
1454 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001455 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001456 --with-system-libmpdec build _decimal module using an installed libmpdec
1457 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001458 --with-dbmliborder=db1:db2:...
1459 order to check db backends for dbm. Valid value is a
1460 colon separated string with the backend names
1461 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001462 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001463 --with(out)-threads[=DIRECTORY]
1464 disable/enable thread support
1465 --with(out)-thread[=DIRECTORY]
1466 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001467 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001468 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001469 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001470 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001471 --with-fpectl enable SIGFPE catching
1472 --with-libm=STRING math library
1473 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001474 --with(out)-computed-gotos
1475 Use computed gotos in evaluation loop (enabled by
1476 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001477
1478Some influential environment variables:
1479 CC C compiler command
1480 CFLAGS C compiler flags
1481 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1482 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001483 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001484 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001485 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001486 CPP C preprocessor
1487
1488Use these variables to override the choices made by `configure' or to help
1489it to find libraries and programs with nonstandard names/locations.
1490
Georg Brandle2e15612009-05-20 18:25:10 +00001491Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001492_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001493ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001494fi
1495
1496if test "$ac_init_help" = "recursive"; then
1497 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001498 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001499 test -d "$ac_dir" ||
1500 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1501 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001502 ac_builddir=.
1503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504case "$ac_dir" in
1505.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1506*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001507 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001508 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001509 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001510 case $ac_top_builddir_sub in
1511 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1512 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1513 esac ;;
1514esac
1515ac_abs_top_builddir=$ac_pwd
1516ac_abs_builddir=$ac_pwd$ac_dir_suffix
1517# for backward compatibility:
1518ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001519
1520case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001521 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001522 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001523 ac_top_srcdir=$ac_top_builddir_sub
1524 ac_abs_top_srcdir=$ac_pwd ;;
1525 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001526 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001527 ac_top_srcdir=$srcdir
1528 ac_abs_top_srcdir=$srcdir ;;
1529 *) # Relative name.
1530 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1531 ac_top_srcdir=$ac_top_build_prefix$srcdir
1532 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001533esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001534ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001535
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001536 cd "$ac_dir" || { ac_status=$?; continue; }
1537 # Check for guested configure.
1538 if test -f "$ac_srcdir/configure.gnu"; then
1539 echo &&
1540 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1541 elif test -f "$ac_srcdir/configure"; then
1542 echo &&
1543 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001544 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001545 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001546 fi || ac_status=$?
1547 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001548 done
1549fi
1550
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001551test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001552if $ac_init_version; then
1553 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001554python configure 3.3
Ned Deilycbfb9a52012-06-23 16:02:19 -07001555generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001556
Ned Deilycbfb9a52012-06-23 16:02:19 -07001557Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001558This configure script is free software; the Free Software Foundation
1559gives unlimited permission to copy, distribute and modify it.
1560_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001561 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001563
1564## ------------------------ ##
1565## Autoconf initialization. ##
1566## ------------------------ ##
1567
1568# ac_fn_c_try_compile LINENO
1569# --------------------------
1570# Try to compile conftest.$ac_ext, and return whether this succeeded.
1571ac_fn_c_try_compile ()
1572{
1573 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1574 rm -f conftest.$ac_objext
1575 if { { ac_try="$ac_compile"
1576case "(($ac_try" in
1577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1578 *) ac_try_echo=$ac_try;;
1579esac
1580eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1581$as_echo "$ac_try_echo"; } >&5
1582 (eval "$ac_compile") 2>conftest.err
1583 ac_status=$?
1584 if test -s conftest.err; then
1585 grep -v '^ *+' conftest.err >conftest.er1
1586 cat conftest.er1 >&5
1587 mv -f conftest.er1 conftest.err
1588 fi
1589 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1590 test $ac_status = 0; } && {
1591 test -z "$ac_c_werror_flag" ||
1592 test ! -s conftest.err
1593 } && test -s conftest.$ac_objext; then :
1594 ac_retval=0
1595else
1596 $as_echo "$as_me: failed program was:" >&5
1597sed 's/^/| /' conftest.$ac_ext >&5
1598
1599 ac_retval=1
1600fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001601 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001602 as_fn_set_status $ac_retval
1603
1604} # ac_fn_c_try_compile
1605
Matthias Kloseb9621712010-04-24 17:59:49 +00001606# ac_fn_c_try_link LINENO
1607# -----------------------
1608# Try to link conftest.$ac_ext, and return whether this succeeded.
1609ac_fn_c_try_link ()
1610{
1611 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1612 rm -f conftest.$ac_objext conftest$ac_exeext
1613 if { { ac_try="$ac_link"
1614case "(($ac_try" in
1615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1616 *) ac_try_echo=$ac_try;;
1617esac
1618eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1619$as_echo "$ac_try_echo"; } >&5
1620 (eval "$ac_link") 2>conftest.err
1621 ac_status=$?
1622 if test -s conftest.err; then
1623 grep -v '^ *+' conftest.err >conftest.er1
1624 cat conftest.er1 >&5
1625 mv -f conftest.er1 conftest.err
1626 fi
1627 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1628 test $ac_status = 0; } && {
1629 test -z "$ac_c_werror_flag" ||
1630 test ! -s conftest.err
1631 } && test -s conftest$ac_exeext && {
1632 test "$cross_compiling" = yes ||
Ned Deilycbfb9a52012-06-23 16:02:19 -07001633 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001634 }; then :
1635 ac_retval=0
1636else
1637 $as_echo "$as_me: failed program was:" >&5
1638sed 's/^/| /' conftest.$ac_ext >&5
1639
1640 ac_retval=1
1641fi
1642 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1643 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1644 # interfere with the next link command; also delete a directory that is
1645 # left behind by Apple's compiler. We do this before executing the actions.
1646 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001647 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001648 as_fn_set_status $ac_retval
1649
1650} # ac_fn_c_try_link
1651
Matthias Kloseb9621712010-04-24 17:59:49 +00001652# ac_fn_c_try_cpp LINENO
1653# ----------------------
1654# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1655ac_fn_c_try_cpp ()
1656{
1657 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1658 if { { ac_try="$ac_cpp conftest.$ac_ext"
1659case "(($ac_try" in
1660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1661 *) ac_try_echo=$ac_try;;
1662esac
1663eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1664$as_echo "$ac_try_echo"; } >&5
1665 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1666 ac_status=$?
1667 if test -s conftest.err; then
1668 grep -v '^ *+' conftest.err >conftest.er1
1669 cat conftest.er1 >&5
1670 mv -f conftest.er1 conftest.err
1671 fi
1672 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001673 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001674 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1675 test ! -s conftest.err
1676 }; then :
1677 ac_retval=0
1678else
1679 $as_echo "$as_me: failed program was:" >&5
1680sed 's/^/| /' conftest.$ac_ext >&5
1681
1682 ac_retval=1
1683fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001684 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001685 as_fn_set_status $ac_retval
1686
1687} # ac_fn_c_try_cpp
1688
1689# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1690# -------------------------------------------------------
1691# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1692# the include files in INCLUDES and setting the cache variable VAR
1693# accordingly.
1694ac_fn_c_check_header_mongrel ()
1695{
1696 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001697 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1699$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001700if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001701 $as_echo_n "(cached) " >&6
1702fi
1703eval ac_res=\$$3
1704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1705$as_echo "$ac_res" >&6; }
1706else
1707 # Is the header compilable?
1708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1709$as_echo_n "checking $2 usability... " >&6; }
1710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1711/* end confdefs.h. */
1712$4
1713#include <$2>
1714_ACEOF
1715if ac_fn_c_try_compile "$LINENO"; then :
1716 ac_header_compiler=yes
1717else
1718 ac_header_compiler=no
1719fi
1720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1722$as_echo "$ac_header_compiler" >&6; }
1723
1724# Is the header present?
1725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1726$as_echo_n "checking $2 presence... " >&6; }
1727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1728/* end confdefs.h. */
1729#include <$2>
1730_ACEOF
1731if ac_fn_c_try_cpp "$LINENO"; then :
1732 ac_header_preproc=yes
1733else
1734 ac_header_preproc=no
1735fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001736rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1738$as_echo "$ac_header_preproc" >&6; }
1739
1740# So? What about this header?
1741case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1742 yes:no: )
1743 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1744$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1745 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1746$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1747 ;;
1748 no:yes:* )
1749 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1750$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1751 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1752$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1753 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1754$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1755 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1756$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1757 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1758$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001759( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001760## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001761## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001762 ) | sed "s/^/$as_me: WARNING: /" >&2
1763 ;;
1764esac
1765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1766$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001767if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001768 $as_echo_n "(cached) " >&6
1769else
1770 eval "$3=\$ac_header_compiler"
1771fi
1772eval ac_res=\$$3
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1774$as_echo "$ac_res" >&6; }
1775fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001776 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001777
1778} # ac_fn_c_check_header_mongrel
1779
1780# ac_fn_c_try_run LINENO
1781# ----------------------
1782# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1783# that executables *can* be run.
1784ac_fn_c_try_run ()
1785{
1786 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1787 if { { ac_try="$ac_link"
1788case "(($ac_try" in
1789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1790 *) ac_try_echo=$ac_try;;
1791esac
1792eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1793$as_echo "$ac_try_echo"; } >&5
1794 (eval "$ac_link") 2>&5
1795 ac_status=$?
1796 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1797 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1798 { { case "(($ac_try" in
1799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1800 *) ac_try_echo=$ac_try;;
1801esac
1802eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1803$as_echo "$ac_try_echo"; } >&5
1804 (eval "$ac_try") 2>&5
1805 ac_status=$?
1806 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1807 test $ac_status = 0; }; }; then :
1808 ac_retval=0
1809else
1810 $as_echo "$as_me: program exited with status $ac_status" >&5
1811 $as_echo "$as_me: failed program was:" >&5
1812sed 's/^/| /' conftest.$ac_ext >&5
1813
1814 ac_retval=$ac_status
1815fi
1816 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001817 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001818 as_fn_set_status $ac_retval
1819
1820} # ac_fn_c_try_run
1821
1822# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1823# -------------------------------------------------------
1824# Tests whether HEADER exists and can be compiled using the include files in
1825# INCLUDES, setting the cache variable VAR accordingly.
1826ac_fn_c_check_header_compile ()
1827{
1828 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1830$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001831if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001832 $as_echo_n "(cached) " >&6
1833else
1834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1835/* end confdefs.h. */
1836$4
1837#include <$2>
1838_ACEOF
1839if ac_fn_c_try_compile "$LINENO"; then :
1840 eval "$3=yes"
1841else
1842 eval "$3=no"
1843fi
1844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1845fi
1846eval ac_res=\$$3
1847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1848$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001849 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001850
1851} # ac_fn_c_check_header_compile
1852
Matthias Kloseb9621712010-04-24 17:59:49 +00001853# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1854# -------------------------------------------
1855# Tests whether TYPE exists after having included INCLUDES, setting cache
1856# variable VAR accordingly.
1857ac_fn_c_check_type ()
1858{
1859 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1861$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001862if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001863 $as_echo_n "(cached) " >&6
1864else
1865 eval "$3=no"
1866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1867/* end confdefs.h. */
1868$4
1869int
1870main ()
1871{
1872if (sizeof ($2))
1873 return 0;
1874 ;
1875 return 0;
1876}
1877_ACEOF
1878if ac_fn_c_try_compile "$LINENO"; then :
1879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1880/* end confdefs.h. */
1881$4
1882int
1883main ()
1884{
1885if (sizeof (($2)))
1886 return 0;
1887 ;
1888 return 0;
1889}
1890_ACEOF
1891if ac_fn_c_try_compile "$LINENO"; then :
1892
1893else
1894 eval "$3=yes"
1895fi
1896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1897fi
1898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1899fi
1900eval ac_res=\$$3
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1902$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001903 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001904
1905} # ac_fn_c_check_type
1906
1907# ac_fn_c_find_uintX_t LINENO BITS VAR
1908# ------------------------------------
1909# Finds an unsigned integer type with width BITS, setting cache variable VAR
1910# accordingly.
1911ac_fn_c_find_uintX_t ()
1912{
1913 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1915$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001916if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001917 $as_echo_n "(cached) " >&6
1918else
1919 eval "$3=no"
1920 # Order is important - never check a type that is potentially smaller
1921 # than half of the expected target width.
1922 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1923 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1925/* end confdefs.h. */
1926$ac_includes_default
1927int
1928main ()
1929{
1930static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ned Deilycbfb9a52012-06-23 16:02:19 -07001931test_array [0] = 0;
1932return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001933
1934 ;
1935 return 0;
1936}
1937_ACEOF
1938if ac_fn_c_try_compile "$LINENO"; then :
1939 case $ac_type in #(
1940 uint$2_t) :
1941 eval "$3=yes" ;; #(
1942 *) :
1943 eval "$3=\$ac_type" ;;
1944esac
1945fi
1946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001947 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001948
1949else
1950 break
1951fi
1952 done
1953fi
1954eval ac_res=\$$3
1955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1956$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001957 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001958
1959} # ac_fn_c_find_uintX_t
1960
1961# ac_fn_c_find_intX_t LINENO BITS VAR
1962# -----------------------------------
1963# Finds a signed integer type with width BITS, setting cache variable VAR
1964# accordingly.
1965ac_fn_c_find_intX_t ()
1966{
1967 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1969$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001970if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001971 $as_echo_n "(cached) " >&6
1972else
1973 eval "$3=no"
1974 # Order is important - never check a type that is potentially smaller
1975 # than half of the expected target width.
1976 for ac_type in int$2_t 'int' 'long int' \
1977 'long long int' 'short int' 'signed char'; do
1978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1979/* end confdefs.h. */
1980$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001981 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001982int
1983main ()
1984{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001985static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ned Deilycbfb9a52012-06-23 16:02:19 -07001986test_array [0] = 0;
1987return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001988
1989 ;
1990 return 0;
1991}
1992_ACEOF
1993if ac_fn_c_try_compile "$LINENO"; then :
1994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995/* end confdefs.h. */
1996$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001997 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001998int
1999main ()
2000{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002001static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002002 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ned Deilycbfb9a52012-06-23 16:02:19 -07002003test_array [0] = 0;
2004return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002005
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011
2012else
2013 case $ac_type in #(
2014 int$2_t) :
2015 eval "$3=yes" ;; #(
2016 *) :
2017 eval "$3=\$ac_type" ;;
2018esac
2019fi
2020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2021fi
2022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002023 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002024
2025else
2026 break
2027fi
2028 done
2029fi
2030eval ac_res=\$$3
2031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2032$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002033 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002034
2035} # ac_fn_c_find_intX_t
2036
2037# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2038# --------------------------------------------
2039# Tries to find the compile-time value of EXPR in a program that includes
2040# INCLUDES, setting VAR accordingly. Returns whether the value could be
2041# computed
2042ac_fn_c_compute_int ()
2043{
2044 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2045 if test "$cross_compiling" = yes; then
2046 # Depending upon the size, compute the lo and hi bounds.
2047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2048/* end confdefs.h. */
2049$4
2050int
2051main ()
2052{
2053static int test_array [1 - 2 * !(($2) >= 0)];
Ned Deilycbfb9a52012-06-23 16:02:19 -07002054test_array [0] = 0;
2055return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002056
2057 ;
2058 return 0;
2059}
2060_ACEOF
2061if ac_fn_c_try_compile "$LINENO"; then :
2062 ac_lo=0 ac_mid=0
2063 while :; do
2064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2065/* end confdefs.h. */
2066$4
2067int
2068main ()
2069{
2070static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ned Deilycbfb9a52012-06-23 16:02:19 -07002071test_array [0] = 0;
2072return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002073
2074 ;
2075 return 0;
2076}
2077_ACEOF
2078if ac_fn_c_try_compile "$LINENO"; then :
2079 ac_hi=$ac_mid; break
2080else
2081 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2082 if test $ac_lo -le $ac_mid; then
2083 ac_lo= ac_hi=
2084 break
2085 fi
2086 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089 done
2090else
2091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2092/* end confdefs.h. */
2093$4
2094int
2095main ()
2096{
2097static int test_array [1 - 2 * !(($2) < 0)];
Ned Deilycbfb9a52012-06-23 16:02:19 -07002098test_array [0] = 0;
2099return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002100
2101 ;
2102 return 0;
2103}
2104_ACEOF
2105if ac_fn_c_try_compile "$LINENO"; then :
2106 ac_hi=-1 ac_mid=-1
2107 while :; do
2108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2109/* end confdefs.h. */
2110$4
2111int
2112main ()
2113{
2114static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ned Deilycbfb9a52012-06-23 16:02:19 -07002115test_array [0] = 0;
2116return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002117
2118 ;
2119 return 0;
2120}
2121_ACEOF
2122if ac_fn_c_try_compile "$LINENO"; then :
2123 ac_lo=$ac_mid; break
2124else
2125 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2126 if test $ac_mid -le $ac_hi; then
2127 ac_lo= ac_hi=
2128 break
2129 fi
2130 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2131fi
2132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2133 done
2134else
2135 ac_lo= ac_hi=
2136fi
2137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2138fi
2139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2140# Binary search between lo and hi bounds.
2141while test "x$ac_lo" != "x$ac_hi"; do
2142 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2144/* end confdefs.h. */
2145$4
2146int
2147main ()
2148{
2149static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ned Deilycbfb9a52012-06-23 16:02:19 -07002150test_array [0] = 0;
2151return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002152
2153 ;
2154 return 0;
2155}
2156_ACEOF
2157if ac_fn_c_try_compile "$LINENO"; then :
2158 ac_hi=$ac_mid
2159else
2160 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2161fi
2162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2163done
2164case $ac_lo in #((
2165?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2166'') ac_retval=1 ;;
2167esac
2168 else
2169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2170/* end confdefs.h. */
2171$4
2172static long int longval () { return $2; }
2173static unsigned long int ulongval () { return $2; }
2174#include <stdio.h>
2175#include <stdlib.h>
2176int
2177main ()
2178{
2179
2180 FILE *f = fopen ("conftest.val", "w");
2181 if (! f)
2182 return 1;
2183 if (($2) < 0)
2184 {
2185 long int i = longval ();
2186 if (i != ($2))
2187 return 1;
2188 fprintf (f, "%ld", i);
2189 }
2190 else
2191 {
2192 unsigned long int i = ulongval ();
2193 if (i != ($2))
2194 return 1;
2195 fprintf (f, "%lu", i);
2196 }
2197 /* Do not output a trailing newline, as this causes \r\n confusion
2198 on some platforms. */
2199 return ferror (f) || fclose (f) != 0;
2200
2201 ;
2202 return 0;
2203}
2204_ACEOF
2205if ac_fn_c_try_run "$LINENO"; then :
2206 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2207else
2208 ac_retval=1
2209fi
2210rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2211 conftest.$ac_objext conftest.beam conftest.$ac_ext
2212rm -f conftest.val
2213
2214 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002215 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002216 as_fn_set_status $ac_retval
2217
2218} # ac_fn_c_compute_int
2219
2220# ac_fn_c_check_func LINENO FUNC VAR
2221# ----------------------------------
2222# Tests whether FUNC exists, setting the cache variable VAR accordingly
2223ac_fn_c_check_func ()
2224{
2225 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2227$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002228if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002229 $as_echo_n "(cached) " >&6
2230else
2231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2232/* end confdefs.h. */
2233/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2234 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2235#define $2 innocuous_$2
2236
2237/* System header to define __stub macros and hopefully few prototypes,
2238 which can conflict with char $2 (); below.
2239 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2240 <limits.h> exists even on freestanding compilers. */
2241
2242#ifdef __STDC__
2243# include <limits.h>
2244#else
2245# include <assert.h>
2246#endif
2247
2248#undef $2
2249
2250/* Override any GCC internal prototype to avoid an error.
2251 Use char because int might match the return type of a GCC
2252 builtin and then its argument prototype would still apply. */
2253#ifdef __cplusplus
2254extern "C"
2255#endif
2256char $2 ();
2257/* The GNU C library defines this for functions which it implements
2258 to always fail with ENOSYS. Some functions are actually named
2259 something starting with __ and the normal name is an alias. */
2260#if defined __stub_$2 || defined __stub___$2
2261choke me
2262#endif
2263
2264int
2265main ()
2266{
2267return $2 ();
2268 ;
2269 return 0;
2270}
2271_ACEOF
2272if ac_fn_c_try_link "$LINENO"; then :
2273 eval "$3=yes"
2274else
2275 eval "$3=no"
2276fi
2277rm -f core conftest.err conftest.$ac_objext \
2278 conftest$ac_exeext conftest.$ac_ext
2279fi
2280eval ac_res=\$$3
2281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2282$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002283 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002284
2285} # ac_fn_c_check_func
2286
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002287# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2288# ---------------------------------------------
2289# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2290# accordingly.
2291ac_fn_c_check_decl ()
2292{
2293 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2294 as_decl_name=`echo $2|sed 's/ *(.*//'`
2295 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2297$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2298if eval \${$3+:} false; then :
2299 $as_echo_n "(cached) " >&6
2300else
2301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h. */
2303$4
2304int
2305main ()
2306{
2307#ifndef $as_decl_name
2308#ifdef __cplusplus
2309 (void) $as_decl_use;
2310#else
2311 (void) $as_decl_name;
2312#endif
2313#endif
2314
2315 ;
2316 return 0;
2317}
2318_ACEOF
2319if ac_fn_c_try_compile "$LINENO"; then :
2320 eval "$3=yes"
2321else
2322 eval "$3=no"
2323fi
2324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325fi
2326eval ac_res=\$$3
2327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2328$as_echo "$ac_res" >&6; }
2329 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2330
2331} # ac_fn_c_check_decl
2332
Matthias Kloseb9621712010-04-24 17:59:49 +00002333# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2334# ----------------------------------------------------
2335# Tries to find if the field MEMBER exists in type AGGR, after including
2336# INCLUDES, setting cache variable VAR accordingly.
2337ac_fn_c_check_member ()
2338{
2339 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2341$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002342if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002343 $as_echo_n "(cached) " >&6
2344else
2345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2346/* end confdefs.h. */
2347$5
2348int
2349main ()
2350{
2351static $2 ac_aggr;
2352if (ac_aggr.$3)
2353return 0;
2354 ;
2355 return 0;
2356}
2357_ACEOF
2358if ac_fn_c_try_compile "$LINENO"; then :
2359 eval "$4=yes"
2360else
2361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2362/* end confdefs.h. */
2363$5
2364int
2365main ()
2366{
2367static $2 ac_aggr;
2368if (sizeof ac_aggr.$3)
2369return 0;
2370 ;
2371 return 0;
2372}
2373_ACEOF
2374if ac_fn_c_try_compile "$LINENO"; then :
2375 eval "$4=yes"
2376else
2377 eval "$4=no"
2378fi
2379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2380fi
2381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2382fi
2383eval ac_res=\$$4
2384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2385$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002386 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002387
2388} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002389cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002390This file contains any messages produced by compilers while
2391running configure, to aid debugging if configure makes a mistake.
2392
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002393It was created by python $as_me 3.3, which was
Ned Deilycbfb9a52012-06-23 16:02:19 -07002394generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002395
2396 $ $0 $@
2397
2398_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002399exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002400{
2401cat <<_ASUNAME
2402## --------- ##
2403## Platform. ##
2404## --------- ##
2405
2406hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2407uname -m = `(uname -m) 2>/dev/null || echo unknown`
2408uname -r = `(uname -r) 2>/dev/null || echo unknown`
2409uname -s = `(uname -s) 2>/dev/null || echo unknown`
2410uname -v = `(uname -v) 2>/dev/null || echo unknown`
2411
2412/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2413/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2414
2415/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2416/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2417/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002418/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002419/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2420/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2421/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2422
2423_ASUNAME
2424
2425as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2426for as_dir in $PATH
2427do
2428 IFS=$as_save_IFS
2429 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002430 $as_echo "PATH: $as_dir"
2431 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002432IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002433
2434} >&5
2435
2436cat >&5 <<_ACEOF
2437
2438
2439## ----------- ##
2440## Core tests. ##
2441## ----------- ##
2442
2443_ACEOF
2444
2445
2446# Keep a trace of the command line.
2447# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002448# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002449# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002450# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002451ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002452ac_configure_args0=
2453ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002454ac_must_keep_next=false
2455for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002456do
Skip Montanaro6dead952003-09-25 14:50:04 +00002457 for ac_arg
2458 do
2459 case $ac_arg in
2460 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2461 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2462 | -silent | --silent | --silen | --sile | --sil)
2463 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002464 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002466 esac
2467 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002468 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002469 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002470 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002471 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002472 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002473 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002474 case $ac_arg in
2475 *=* | --config-cache | -C | -disable-* | --disable-* \
2476 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2477 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2478 | -with-* | --with-* | -without-* | --without-* | --x)
2479 case "$ac_configure_args0 " in
2480 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2481 esac
2482 ;;
2483 -* ) ac_must_keep_next=true ;;
2484 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002485 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002486 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002487 ;;
2488 esac
2489 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002490done
Matthias Kloseb9621712010-04-24 17:59:49 +00002491{ ac_configure_args0=; unset ac_configure_args0;}
2492{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002493
2494# When interrupted or exit'd, cleanup temporary files, and complete
2495# config.log. We remove comments because anyway the quotes in there
2496# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497# WARNING: Use '\'' to represent an apostrophe within the trap.
2498# 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 +00002499trap 'exit_status=$?
2500 # Save into config.log some information that might help in debugging.
2501 {
2502 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002503
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002504 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002505## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002506## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002507 echo
2508 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509(
2510 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2511 eval ac_val=\$$ac_var
2512 case $ac_val in #(
2513 *${as_nl}*)
2514 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2516$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517 esac
2518 case $ac_var in #(
2519 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002520 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2521 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 esac ;;
2523 esac
2524 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2527 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 "s/'\''/'\''\\\\'\'''\''/g;
2530 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2531 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002532 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002534 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 esac |
2536 sort
2537)
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002539
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002540 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002541## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002542## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002543 echo
2544 for ac_var in $ac_subst_vars
2545 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546 eval ac_val=\$$ac_var
2547 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002548 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002550 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002551 done | sort
2552 echo
2553
2554 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002555 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002557## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002558 echo
2559 for ac_var in $ac_subst_files
2560 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002561 eval ac_val=\$$ac_var
2562 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002563 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002564 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002565 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002566 done | sort
2567 echo
2568 fi
2569
Martin v. Löwis11437992002-04-12 09:54:03 +00002570 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002571 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002572## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002573## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002576 echo
2577 fi
2578 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002579 $as_echo "$as_me: caught signal $ac_signal"
2580 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002581 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582 rm -f core *.core core.conftest.* &&
2583 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002584 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002586for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002588done
2589ac_signal=0
2590
2591# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002593
Matthias Kloseb9621712010-04-24 17:59:49 +00002594$as_echo "/* confdefs.h */" > confdefs.h
2595
Martin v. Löwis11437992002-04-12 09:54:03 +00002596# Predefined preprocessor variables.
2597
2598cat >>confdefs.h <<_ACEOF
2599#define PACKAGE_NAME "$PACKAGE_NAME"
2600_ACEOF
2601
Martin v. Löwis11437992002-04-12 09:54:03 +00002602cat >>confdefs.h <<_ACEOF
2603#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2604_ACEOF
2605
Martin v. Löwis11437992002-04-12 09:54:03 +00002606cat >>confdefs.h <<_ACEOF
2607#define PACKAGE_VERSION "$PACKAGE_VERSION"
2608_ACEOF
2609
Martin v. Löwis11437992002-04-12 09:54:03 +00002610cat >>confdefs.h <<_ACEOF
2611#define PACKAGE_STRING "$PACKAGE_STRING"
2612_ACEOF
2613
Martin v. Löwis11437992002-04-12 09:54:03 +00002614cat >>confdefs.h <<_ACEOF
2615#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2616_ACEOF
2617
Matthias Kloseb9621712010-04-24 17:59:49 +00002618cat >>confdefs.h <<_ACEOF
2619#define PACKAGE_URL "$PACKAGE_URL"
2620_ACEOF
2621
Martin v. Löwis11437992002-04-12 09:54:03 +00002622
2623# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002624# Prefer an explicitly selected file to automatically selected ones.
2625ac_site_file1=NONE
2626ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002628 # We do not want a PATH search for config.site.
2629 case $CONFIG_SITE in #((
2630 -*) ac_site_file1=./$CONFIG_SITE;;
2631 */*) ac_site_file1=$CONFIG_SITE;;
2632 *) ac_site_file1=./$CONFIG_SITE;;
2633 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 ac_site_file1=$prefix/share/config.site
2636 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637else
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 ac_site_file1=$ac_default_prefix/share/config.site
2639 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002641for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002642do
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 test "x$ac_site_file" = xNONE && continue
2644 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2646$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002647 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002648 . "$ac_site_file" \
2649 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2650$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2651as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002652See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002653 fi
2654done
2655
2656if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002657 # Some versions of bash will fail to source /dev/null (special files
2658 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2659 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2660 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2661$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002662 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002663 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2664 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 esac
2666 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002667else
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2669$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 >$cache_file
2671fi
2672
2673# Check that the precious variables saved in the cache have kept the same
2674# value.
2675ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002676for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2678 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002679 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2680 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 case $ac_old_set,$ac_new_set in
2682 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002683 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2684$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 +00002685 ac_cache_corrupted=: ;;
2686 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002687 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2688$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002689 ac_cache_corrupted=: ;;
2690 ,);;
2691 *)
2692 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002693 # differences in whitespace do not lead to failure.
2694 ac_old_val_w=`echo x $ac_old_val`
2695 ac_new_val_w=`echo x $ac_new_val`
2696 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2697 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2698$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2699 ac_cache_corrupted=:
2700 else
2701 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2702$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2703 eval $ac_var=\$ac_old_val
2704 fi
2705 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2706$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2707 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2708$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002709 fi;;
2710 esac
2711 # Pass precious variables to config.status.
2712 if test "$ac_new_set" = set; then
2713 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002714 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002715 *) ac_arg=$ac_var=$ac_new_val ;;
2716 esac
2717 case " $ac_configure_args " in
2718 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002719 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002720 esac
2721 fi
2722done
2723if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002724 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2725$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2726 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2727$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002728 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002730## -------------------- ##
2731## Main body of script. ##
2732## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002733
Guido van Rossum7f43da71994-08-01 12:15:30 +00002734ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002735ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002736ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2737ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2738ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002739
Guido van Rossum627b2d71993-12-24 10:39:16 +00002740
Michael W. Hudson54241132001-12-07 15:38:26 +00002741
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002742
2743
2744
2745
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002746if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002747then
2748# Extract the first word of "hg", so it can be a program name with args.
2749set dummy hg; ac_word=$2
2750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2751$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002752if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002753 $as_echo_n "(cached) " >&6
2754else
2755 if test -n "$HAS_HG"; then
2756 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2757else
2758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2759for as_dir in $PATH
2760do
2761 IFS=$as_save_IFS
2762 test -z "$as_dir" && as_dir=.
2763 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07002764 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002765 ac_cv_prog_HAS_HG="found"
2766 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2767 break 2
2768 fi
2769done
2770 done
2771IFS=$as_save_IFS
2772
2773 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2774fi
2775fi
2776HAS_HG=$ac_cv_prog_HAS_HG
2777if test -n "$HAS_HG"; then
2778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2779$as_echo "$HAS_HG" >&6; }
2780else
2781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2782$as_echo "no" >&6; }
2783fi
2784
2785
2786else
2787HAS_HG=no-repository
2788fi
2789if test $HAS_HG = found
2790then
2791 HGVERSION="hg id -i \$(srcdir)"
2792 HGTAG="hg id -t \$(srcdir)"
2793 HGBRANCH="hg id -b \$(srcdir)"
2794else
2795 HGVERSION=""
2796 HGTAG=""
2797 HGBRANCH=""
2798fi
2799
2800
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002801ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002802
2803
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002804ac_aux_dir=
2805for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2806 if test -f "$ac_dir/install-sh"; then
2807 ac_aux_dir=$ac_dir
2808 ac_install_sh="$ac_aux_dir/install-sh -c"
2809 break
2810 elif test -f "$ac_dir/install.sh"; then
2811 ac_aux_dir=$ac_dir
2812 ac_install_sh="$ac_aux_dir/install.sh -c"
2813 break
2814 elif test -f "$ac_dir/shtool"; then
2815 ac_aux_dir=$ac_dir
2816 ac_install_sh="$ac_aux_dir/shtool install -c"
2817 break
2818 fi
2819done
2820if test -z "$ac_aux_dir"; then
2821 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2822fi
2823
2824# These three variables are undocumented and unsupported,
2825# and are intended to be withdrawn in a future Autoconf release.
2826# They can cause serious problems if a builder's source tree is in a directory
2827# whose full name contains unusual characters.
2828ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2829ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2830ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2831
2832
2833# Make sure we can run config.sub.
2834$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2835 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2836
2837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2838$as_echo_n "checking build system type... " >&6; }
2839if ${ac_cv_build+:} false; then :
2840 $as_echo_n "(cached) " >&6
2841else
2842 ac_build_alias=$build_alias
2843test "x$ac_build_alias" = x &&
2844 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2845test "x$ac_build_alias" = x &&
2846 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2847ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2848 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2849
2850fi
2851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2852$as_echo "$ac_cv_build" >&6; }
2853case $ac_cv_build in
2854*-*-*) ;;
2855*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2856esac
2857build=$ac_cv_build
2858ac_save_IFS=$IFS; IFS='-'
2859set x $ac_cv_build
2860shift
2861build_cpu=$1
2862build_vendor=$2
2863shift; shift
2864# Remember, the first character of IFS is used to create $*,
2865# except with old shells:
2866build_os=$*
2867IFS=$ac_save_IFS
2868case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2869
2870
2871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2872$as_echo_n "checking host system type... " >&6; }
2873if ${ac_cv_host+:} false; then :
2874 $as_echo_n "(cached) " >&6
2875else
2876 if test "x$host_alias" = x; then
2877 ac_cv_host=$ac_cv_build
2878else
2879 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2880 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2881fi
2882
2883fi
2884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2885$as_echo "$ac_cv_host" >&6; }
2886case $ac_cv_host in
2887*-*-*) ;;
2888*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2889esac
2890host=$ac_cv_host
2891ac_save_IFS=$IFS; IFS='-'
2892set x $ac_cv_host
2893shift
2894host_cpu=$1
2895host_vendor=$2
2896shift; shift
2897# Remember, the first character of IFS is used to create $*,
2898# except with old shells:
2899host_os=$*
2900IFS=$ac_save_IFS
2901case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2902
2903
2904
Martin v. Löwis11437992002-04-12 09:54:03 +00002905
Benjamin Petersond23f8222009-04-05 19:13:16 +00002906if test "$prefix" != "/"; then
2907 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2908fi
2909
2910
Martin v. Löwis11437992002-04-12 09:54:03 +00002911
2912
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002913# We don't use PACKAGE_ variables, and they cause conflicts
2914# with other autoconf-based packages that include Python.h
2915grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2916rm confdefs.h
2917mv confdefs.h.new confdefs.h
2918
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002919
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002920VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002921
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002922# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002923
2924SOVERSION=1.0
2925
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002926# The later defininition of _XOPEN_SOURCE disables certain features
2927# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2928
Matthias Kloseb9621712010-04-24 17:59:49 +00002929$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002930
2931
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002932# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2933# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2934# them.
2935
Matthias Kloseb9621712010-04-24 17:59:49 +00002936$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002937
2938
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002939# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2940# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2941# them.
2942
Matthias Kloseb9621712010-04-24 17:59:49 +00002943$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002944
2945
Martin v. Löwisd6320502004-08-12 13:45:08 +00002946# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2947# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2948
Matthias Kloseb9621712010-04-24 17:59:49 +00002949$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002950
2951
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002952# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2953# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2954# them.
2955
Matthias Kloseb9621712010-04-24 17:59:49 +00002956$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002957
2958
2959
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002960define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002961
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002962# Arguments passed to configure.
2963
2964CONFIG_ARGS="$ac_configure_args"
2965
Matthias Kloseb9621712010-04-24 17:59:49 +00002966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2967$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002968# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002969if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002970 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002971 case $enableval in
2972 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07002973 # Locate the best usable SDK, see Mac/README.txt for more
2974 # information
2975 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
2976 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002977 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07002978 enableval=/Developer/SDKs/MacOSX10.4u.sdk
2979 if test ! -d "${enableval}"
2980 then
2981 enableval=/
2982 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002983 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002984 ;;
2985 esac
2986 case $enableval in
2987 no)
2988 UNIVERSALSDK=
2989 enable_universalsdk=
2990 ;;
2991 *)
2992 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002993 if test ! -d "${UNIVERSALSDK}"
2994 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002995 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002996 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002997 ;;
2998 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002999
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003000
Thomas Wouters477c8d52006-05-27 19:21:47 +00003001else
3002
3003 UNIVERSALSDK=
3004 enable_universalsdk=
3005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003006fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003007
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003008if test -n "${UNIVERSALSDK}"
3009then
Matthias Kloseb9621712010-04-24 17:59:49 +00003010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3011$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003012else
Matthias Kloseb9621712010-04-24 17:59:49 +00003013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3014$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003015fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003016
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003017
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003018
3019
Ned Deilycbfb9a52012-06-23 16:02:19 -07003020# For backward compatibility reasons we prefer to select '32-bit' if available,
3021# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003022UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003023if test "`uname -s`" = "Darwin"
3024then
3025 if test -n "${UNIVERSALSDK}"
3026 then
3027 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3028 then
3029 UNIVERSAL_ARCHS="intel"
3030 fi
3031 fi
3032fi
3033
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003034
Matthias Kloseb9621712010-04-24 17:59:49 +00003035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3036$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003037
3038# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003039if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003040 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3042$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003043 UNIVERSAL_ARCHS="$withval"
3044
3045else
3046
Ned Deilycbfb9a52012-06-23 16:02:19 -07003047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3048$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003049
3050fi
3051
3052
3053
3054
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003055
3056# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003057if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003058 withval=$with_framework_name;
3059 PYTHONFRAMEWORK=${withval}
3060 PYTHONFRAMEWORKDIR=${withval}.framework
3061 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3062
3063else
3064
3065 PYTHONFRAMEWORK=Python
3066 PYTHONFRAMEWORKDIR=Python.framework
3067 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3068
3069fi
3070
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003071# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003072if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003073 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003074 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003075 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003076 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003077 esac
3078 case $enableval in
3079 no)
3080 PYTHONFRAMEWORK=
3081 PYTHONFRAMEWORKDIR=no-framework
3082 PYTHONFRAMEWORKPREFIX=
3083 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003084 FRAMEWORKINSTALLFIRST=
3085 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003086 FRAMEWORKALTINSTALLFIRST=
3087 FRAMEWORKALTINSTALLLAST=
3088 if test "x${prefix}" = "xNONE"; then
3089 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3090 else
3091 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3092 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003093 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003094 ;;
3095 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003096 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003097 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003098 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003099 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003100 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3101 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003102 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003103
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003104 if test "x${prefix}" = "xNONE" ; then
3105 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003106
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003107 else
3108 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3109 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003110
3111 case "${enableval}" in
3112 /System*)
3113 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3114 if test "${prefix}" = "NONE" ; then
3115 # See below
3116 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3117 fi
3118 ;;
3119
3120 /Library*)
3121 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3122 ;;
3123
3124 */Library/Frameworks)
3125 MDIR="`dirname "${enableval}"`"
3126 MDIR="`dirname "${MDIR}"`"
3127 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3128
3129 if test "${prefix}" = "NONE"; then
3130 # User hasn't specified the
3131 # --prefix option, but wants to install
3132 # the framework in a non-default location,
3133 # ensure that the compatibility links get
3134 # installed relative to that prefix as well
3135 # instead of in /usr/local.
3136 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3137 fi
3138 ;;
3139
3140 *)
3141 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3142 ;;
3143 esac
3144
Jack Jansen127e56e2001-09-11 14:41:54 +00003145 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003146
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003147 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003148 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003149 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003150
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003151 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003152
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003153 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3154
3155 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3156
Jack Jansene578a632001-08-15 01:27:14 +00003157 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003158
Guido van Rossum563e7081996-09-10 18:20:48 +00003159else
Martin v. Löwis11437992002-04-12 09:54:03 +00003160
Jack Jansene578a632001-08-15 01:27:14 +00003161 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003162 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003163 PYTHONFRAMEWORKPREFIX=
3164 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003165 FRAMEWORKINSTALLFIRST=
3166 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003167 FRAMEWORKALTINSTALLFIRST=
3168 FRAMEWORKALTINSTALLLAST=
3169 if test "x${prefix}" = "xNONE" ; then
3170 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3171 else
3172 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3173 fi
Jack Jansene578a632001-08-15 01:27:14 +00003174 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003175
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003176
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003177fi
3178
Thomas Wouters477c8d52006-05-27 19:21:47 +00003179
3180
Michael W. Hudson54241132001-12-07 15:38:26 +00003181
3182
3183
3184
Jack Jansene578a632001-08-15 01:27:14 +00003185
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003186
3187
3188
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003189
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003190
Jack Jansene578a632001-08-15 01:27:14 +00003191##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003192## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003193## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003194##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003195# Set name for machine-dependent library files
3196
Matthias Kloseb9621712010-04-24 17:59:49 +00003197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3198$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003199if test -z "$MACHDEP"
3200then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003201 # avoid using uname for cross builds
3202 if test "$cross_compiling" = yes; then
3203 # ac_sys_system and ac_sys_release are only used for setting
3204 # `define_xopen_source' in the case statement below. For the
3205 # current supported cross builds, this macro is not adjusted.
3206 case "$host" in
3207 *-*-linux*)
3208 ac_sys_system=Linux
3209 ;;
3210 *-*-cygwin*)
3211 ac_sys_system=Cygwin
3212 ;;
3213 *)
3214 # for now, limit cross builds to known configurations
3215 MACHDEP="unknown"
3216 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3217 esac
3218 ac_sys_release=
3219 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003220 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003221 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003222 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003223 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003224 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003225 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003226 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003227 fi
3228 ac_md_system=`echo $ac_sys_system |
3229 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3230 ac_md_release=`echo $ac_sys_release |
3231 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3232 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003233
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003234 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003235 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003236 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003237 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003238 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003239 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003240 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003241fi
Guido van Rossum91922671997-10-09 20:24:13 +00003242
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003243# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3244# disable features if it is defined, without any means to access these
3245# features as extensions. For these systems, we skip the definition of
3246# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3247# some feature, make sure there is no alternative way to access this
3248# feature. Also, when using wildcards, make sure you have verified the
3249# need for not defining _XOPEN_SOURCE on all systems matching the
3250# wildcard, and that the wildcard does not include future systems
3251# (which may remove their limitations).
3252case $ac_sys_system/$ac_sys_release in
3253 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3254 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003255 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003256 # In addition, Stefan Krah confirms that issue #1244610 exists through
3257 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003258 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003259 define_xopen_source=no
3260 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3261 # also defined. This can be overridden by defining _BSD_SOURCE
3262 # As this has a different meaning on Linux, only define it on OpenBSD
3263
Matthias Kloseb9621712010-04-24 17:59:49 +00003264$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003265
3266 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003267 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003268 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3269 # also defined. This can be overridden by defining _BSD_SOURCE
3270 # As this has a different meaning on Linux, only define it on OpenBSD
3271
Matthias Kloseb9621712010-04-24 17:59:49 +00003272$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003273
3274 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003275 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3276 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3277 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003278 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 +00003279 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003280 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3281 # request to enable features supported by the standard as a request
3282 # to disable features not supported by the standard. The best way
3283 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3284 # entirely and define __EXTENSIONS__ instead.
3285 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003286 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003287 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3288 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003289 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003290 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003291 define_xopen_source=no;;
3292 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003293 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003294 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003295 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003296 # On FreeBSD 4, the math functions C89 does not cover are never defined
3297 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3298 FreeBSD/4.*)
3299 define_xopen_source=no;;
3300 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3301 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3302 # identifies itself as Darwin/7.*
3303 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3304 # disables platform specific features beyond repair.
3305 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3306 # has no effect, don't bother defining them
3307 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003308 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003309 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003310 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003311 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3312 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3313 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003314 AIX/4)
3315 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003316 AIX/5)
3317 if test `uname -r` -eq 1; then
3318 define_xopen_source=no
3319 fi
3320 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003321 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3322 # defining NI_NUMERICHOST.
3323 QNX/6.3.2)
3324 define_xopen_source=no
3325 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003326
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003327esac
3328
3329if test $define_xopen_source = yes
3330then
Victor Stinner14d098d2011-09-07 22:29:43 +02003331 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003332
Victor Stinner14d098d2011-09-07 22:29:43 +02003333$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003334
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003335
3336 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3337 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3338 # several APIs are not declared. Since this is also needed in some
3339 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003340
Matthias Kloseb9621712010-04-24 17:59:49 +00003341$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003342
3343
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003344
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003345$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003346
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003347fi
3348
Guido van Rossum91922671997-10-09 20:24:13 +00003349#
3350# SGI compilers allow the specification of the both the ABI and the
3351# ISA on the command line. Depending on the values of these switches,
3352# different and often incompatable code will be generated.
3353#
3354# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3355# thus supply support for various ABI/ISA combinations. The MACHDEP
3356# variable is also adjusted.
3357#
3358
3359if test ! -z "$SGI_ABI"
3360then
3361 CC="cc $SGI_ABI"
3362 LDFLAGS="$SGI_ABI $LDFLAGS"
3363 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3364fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3366$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003367
Jack Jansen6b08a402004-06-03 12:41:45 +00003368# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3369# it may influence the way we can build extensions, so distutils
3370# needs to check it
3371
Thomas Wouters477c8d52006-05-27 19:21:47 +00003372
Jack Jansen6b08a402004-06-03 12:41:45 +00003373CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003374EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003375
Guido van Rossum627b2d71993-12-24 10:39:16 +00003376# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003377
3378# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3379# for debug/optimization stuff. BASECFLAGS is for flags that are required
3380# just to get things to compile and link. Users are free to override OPT
3381# when running configure or make. The build should not break if they do.
3382# BASECFLAGS should generally not be messed with, however.
3383
3384# XXX shouldn't some/most/all of this code be merged with the stuff later
3385# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3387$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003388
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003389# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003390if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003391 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003392 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003393 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003394 without_gcc=yes;;
3395 yes) CC=gcc
3396 without_gcc=no;;
3397 *) CC=$withval
3398 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003399 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003400else
Martin v. Löwis11437992002-04-12 09:54:03 +00003401
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003402 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003403 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003404 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003405 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003406 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003407fi
3408
Matthias Kloseb9621712010-04-24 17:59:49 +00003409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3410$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003411
Guido van Rossum8b131c51995-03-09 14:10:13 +00003412# If the user switches compilers, we can't believe the cache
3413if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3414then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003415 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003416(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003417fi
3418
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003419# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3420# when the compiler supports them, but we don't always want -O2, and
3421# we set -g later.
3422if test -z "$CFLAGS"; then
3423 CFLAGS=
3424fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003425
3426if test "$ac_sys_system" = "Darwin"
3427then
3428 # Compiler selection on MacOSX is more complicated than
3429 # AC_PROG_CC can handle, see Mac/README.txt for more
3430 # information
3431 if test -z "${CC}"
3432 then
3433 found_gcc=
3434 found_clang=
3435 as_save_IFS=$IFS; IFS=:
3436 for as_dir in $PATH
3437 do
3438 IFS=$as_save_IFS
3439 if test -x $as_dir/gcc; then
3440 if test -z "${found_gcc}"; then
3441 found_gcc=$as_dir/gcc
3442 fi
3443 fi
3444 if test -x $as_dir/clang; then
3445 if test -z "${found_clang}"; then
3446 found_clang=$as_dir/clang
3447 fi
3448 fi
3449 done
3450 IFS=$as_save_IFS
3451
3452 if test -n "$found_gcc" -a -n "$found_clang"
3453 then
3454 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3455 then
3456 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3457$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3458 CC="$found_clang"
3459 CXX="$found_clang++"
3460 fi
3461
3462
3463 elif test -z "$found_gcc" -a -n "$found_clang"
3464 then
3465 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3466$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3467 CC="$found_clang"
3468 CXX="$found_clang++"
3469
3470 elif test -z "$found_gcc" -a -z "$found_clang"
3471 then
3472 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3473 if test -n "${found_clang}"
3474 then
3475 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3476$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3477 CC="${found_clang}"
3478 CXX="`/usr/bin/xcrun -find clang++`"
3479
3480 # else: use default behaviour
3481 fi
3482 fi
3483 fi
3484fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003485ac_ext=c
3486ac_cpp='$CPP $CPPFLAGS'
3487ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3488ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3489ac_compiler_gnu=$ac_cv_c_compiler_gnu
3490if test -n "$ac_tool_prefix"; then
3491 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3492set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3494$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003495if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003496 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003497else
3498 if test -n "$CC"; then
3499 ac_cv_prog_CC="$CC" # Let the user override the test.
3500else
Martin v. Löwis11437992002-04-12 09:54:03 +00003501as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3502for as_dir in $PATH
3503do
3504 IFS=$as_save_IFS
3505 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003506 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07003507 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003508 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003509 $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 +00003510 break 2
3511 fi
3512done
Matthias Kloseb9621712010-04-24 17:59:49 +00003513 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003514IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003515
Jack Jansendd19cf82001-12-06 22:36:17 +00003516fi
3517fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003518CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003519if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3521$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003522else
Matthias Kloseb9621712010-04-24 17:59:49 +00003523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3524$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003525fi
3526
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003527
Martin v. Löwis11437992002-04-12 09:54:03 +00003528fi
3529if test -z "$ac_cv_prog_CC"; then
3530 ac_ct_CC=$CC
3531 # Extract the first word of "gcc", so it can be a program name with args.
3532set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3534$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003535if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003536 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003537else
3538 if test -n "$ac_ct_CC"; then
3539 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3540else
3541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3542for as_dir in $PATH
3543do
3544 IFS=$as_save_IFS
3545 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003546 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07003547 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003548 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003549 $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 +00003550 break 2
3551 fi
3552done
Matthias Kloseb9621712010-04-24 17:59:49 +00003553 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003554IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003555
3556fi
3557fi
3558ac_ct_CC=$ac_cv_prog_ac_ct_CC
3559if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3561$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003562else
Matthias Kloseb9621712010-04-24 17:59:49 +00003563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3564$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003565fi
3566
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003567 if test "x$ac_ct_CC" = x; then
3568 CC=""
3569 else
3570 case $cross_compiling:$ac_tool_warned in
3571yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003572{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3573$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003574ac_tool_warned=yes ;;
3575esac
3576 CC=$ac_ct_CC
3577 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003578else
3579 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003580fi
3581
Jack Jansendd19cf82001-12-06 22:36:17 +00003582if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003583 if test -n "$ac_tool_prefix"; then
3584 # 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 +00003585set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3587$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003588if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003590else
3591 if test -n "$CC"; then
3592 ac_cv_prog_CC="$CC" # Let the user override the test.
3593else
Martin v. Löwis11437992002-04-12 09:54:03 +00003594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3595for as_dir in $PATH
3596do
3597 IFS=$as_save_IFS
3598 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003599 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07003600 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003601 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003602 $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 +00003603 break 2
3604 fi
3605done
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003607IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003608
3609fi
3610fi
3611CC=$ac_cv_prog_CC
3612if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3614$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003615else
Matthias Kloseb9621712010-04-24 17:59:49 +00003616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3617$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003618fi
3619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003620
Martin v. Löwis11437992002-04-12 09:54:03 +00003621 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003622fi
3623if test -z "$CC"; then
3624 # Extract the first word of "cc", so it can be a program name with args.
3625set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3627$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003628if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003629 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003630else
3631 if test -n "$CC"; then
3632 ac_cv_prog_CC="$CC" # Let the user override the test.
3633else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003634 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3636for as_dir in $PATH
3637do
3638 IFS=$as_save_IFS
3639 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003640 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07003641 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003642 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3643 ac_prog_rejected=yes
3644 continue
3645 fi
3646 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 $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 +00003648 break 2
3649 fi
3650done
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003652IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003653
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003654if test $ac_prog_rejected = yes; then
3655 # We found a bogon in the path, so make sure we never use it.
3656 set dummy $ac_cv_prog_CC
3657 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003658 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003659 # We chose a different compiler from the bogus one.
3660 # However, it has the same basename, so the bogon will be chosen
3661 # first if we set CC to just the basename; use the full file name.
3662 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003663 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003664 fi
3665fi
3666fi
3667fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003668CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003669if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3671$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003672else
Matthias Kloseb9621712010-04-24 17:59:49 +00003673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3674$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003675fi
3676
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003677
Martin v. Löwis11437992002-04-12 09:54:03 +00003678fi
3679if test -z "$CC"; then
3680 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003681 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 do
3683 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3684set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3686$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003687if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003689else
3690 if test -n "$CC"; then
3691 ac_cv_prog_CC="$CC" # Let the user override the test.
3692else
Martin v. Löwis11437992002-04-12 09:54:03 +00003693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3694for as_dir in $PATH
3695do
3696 IFS=$as_save_IFS
3697 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003698 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07003699 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003700 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 $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 +00003702 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003703 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003704done
Matthias Kloseb9621712010-04-24 17:59:49 +00003705 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003706IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003707
3708fi
3709fi
3710CC=$ac_cv_prog_CC
3711if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3713$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003714else
Matthias Kloseb9621712010-04-24 17:59:49 +00003715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3716$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003717fi
3718
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003719
Martin v. Löwis11437992002-04-12 09:54:03 +00003720 test -n "$CC" && break
3721 done
3722fi
3723if test -z "$CC"; then
3724 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003726do
3727 # Extract the first word of "$ac_prog", so it can be a program name with args.
3728set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3730$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003731if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003733else
3734 if test -n "$ac_ct_CC"; then
3735 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3736else
3737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3738for as_dir in $PATH
3739do
3740 IFS=$as_save_IFS
3741 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07003743 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003744 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 $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 +00003746 break 2
3747 fi
3748done
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003751
Martin v. Löwis11437992002-04-12 09:54:03 +00003752fi
3753fi
3754ac_ct_CC=$ac_cv_prog_ac_ct_CC
3755if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3757$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003758else
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3760$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003761fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003762
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003763
Martin v. Löwis11437992002-04-12 09:54:03 +00003764 test -n "$ac_ct_CC" && break
3765done
Michael W. Hudson54241132001-12-07 15:38:26 +00003766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767 if test "x$ac_ct_CC" = x; then
3768 CC=""
3769 else
3770 case $cross_compiling:$ac_tool_warned in
3771yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003772{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3773$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003774ac_tool_warned=yes ;;
3775esac
3776 CC=$ac_ct_CC
3777 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003778fi
3779
3780fi
3781
3782
Matthias Kloseb9621712010-04-24 17:59:49 +00003783test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3784$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003785as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003786See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003787
3788# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003789$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3790set X $ac_compile
3791ac_compiler=$2
3792for ac_option in --version -v -V -qversion; do
3793 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003794case "(($ac_try" in
3795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3796 *) ac_try_echo=$ac_try;;
3797esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003798eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3799$as_echo "$ac_try_echo"; } >&5
3800 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003801 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 if test -s conftest.err; then
3803 sed '10a\
3804... rest of stderr output deleted ...
3805 10q' conftest.err >conftest.er1
3806 cat conftest.er1 >&5
3807 fi
3808 rm -f conftest.er1 conftest.err
3809 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3810 test $ac_status = 0; }
3811done
Martin v. Löwis11437992002-04-12 09:54:03 +00003812
Matthias Kloseb9621712010-04-24 17:59:49 +00003813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003814/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003815
Martin v. Löwis11437992002-04-12 09:54:03 +00003816int
3817main ()
3818{
3819
3820 ;
3821 return 0;
3822}
3823_ACEOF
3824ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003825ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003826# Try to create an executable without -o first, disregard a.out.
3827# It will help us diagnose broken compilers, and finding out an intuition
3828# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3830$as_echo_n "checking whether the C compiler works... " >&6; }
3831ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3832
3833# The possible output files:
3834ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3835
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003836ac_rmfiles=
3837for ac_file in $ac_files
3838do
3839 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003841 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3842 esac
3843done
3844rm -f $ac_rmfiles
3845
Matthias Kloseb9621712010-04-24 17:59:49 +00003846if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847case "(($ac_try" in
3848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3849 *) ac_try_echo=$ac_try;;
3850esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003851eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3852$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003853 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003854 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003855 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3856 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003857 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3858# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3859# in a Makefile. We should not override ac_cv_exeext if it was cached,
3860# so that the user can short-circuit this test for compilers unknown to
3861# Autoconf.
3862for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003863do
3864 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003865 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003866 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003867 ;;
3868 [ab].out )
3869 # We found the default executable, but exeext='' is most
3870 # certainly right.
3871 break;;
3872 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003873 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003874 then :; else
3875 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3876 fi
3877 # We set ac_cv_exeext here because the later test for it is not
3878 # safe: cross compilers may not add the suffix if given an `-o'
3879 # argument, so we may need to know it at that point already.
3880 # Even if this section looks crufty: it has the advantage of
3881 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003882 break;;
3883 * )
3884 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003885 esac
3886done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003887test "$ac_cv_exeext" = no && ac_cv_exeext=
3888
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003889else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890 ac_file=''
3891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003892if test -z "$ac_file"; then :
3893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3894$as_echo "no" >&6; }
3895$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003896sed 's/^/| /' conftest.$ac_ext >&5
3897
Matthias Kloseb9621712010-04-24 17:59:49 +00003898{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3899$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003900as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003901See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003902else
3903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3904$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3907$as_echo_n "checking for C compiler default output file name... " >&6; }
3908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3909$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003910ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003911
Matthias Kloseb9621712010-04-24 17:59:49 +00003912rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003913ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3915$as_echo_n "checking for suffix of executables... " >&6; }
3916if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003917case "(($ac_try" in
3918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3919 *) ac_try_echo=$ac_try;;
3920esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003921eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3922$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003924 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003925 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3926 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003927 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3928# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3929# work properly (i.e., refer to `conftest.exe'), while it won't with
3930# `rm'.
3931for ac_file in conftest.exe conftest conftest.*; do
3932 test -f "$ac_file" || continue
3933 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003934 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003935 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3936 break;;
3937 * ) break;;
3938 esac
3939done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003940else
Matthias Kloseb9621712010-04-24 17:59:49 +00003941 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3942$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003943as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003944See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003946rm -f conftest conftest$ac_cv_exeext
3947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3948$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003949
3950rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003951EXEEXT=$ac_cv_exeext
3952ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3954/* end confdefs.h. */
3955#include <stdio.h>
3956int
3957main ()
3958{
3959FILE *f = fopen ("conftest.out", "w");
3960 return ferror (f) || fclose (f) != 0;
3961
3962 ;
3963 return 0;
3964}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003966ac_clean_files="$ac_clean_files conftest.out"
3967# Check that the compiler produces executables we can run. If not, either
3968# the compiler is broken, or we cross compile.
3969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3970$as_echo_n "checking whether we are cross compiling... " >&6; }
3971if test "$cross_compiling" != yes; then
3972 { { ac_try="$ac_link"
3973case "(($ac_try" in
3974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3975 *) ac_try_echo=$ac_try;;
3976esac
3977eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3978$as_echo "$ac_try_echo"; } >&5
3979 (eval "$ac_link") 2>&5
3980 ac_status=$?
3981 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3982 test $ac_status = 0; }
3983 if { ac_try='./conftest$ac_cv_exeext'
3984 { { case "(($ac_try" in
3985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3986 *) ac_try_echo=$ac_try;;
3987esac
3988eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3989$as_echo "$ac_try_echo"; } >&5
3990 (eval "$ac_try") 2>&5
3991 ac_status=$?
3992 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3993 test $ac_status = 0; }; }; then
3994 cross_compiling=no
3995 else
3996 if test "$cross_compiling" = maybe; then
3997 cross_compiling=yes
3998 else
3999 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4000$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004001as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004002If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004003See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004004 fi
4005 fi
4006fi
4007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4008$as_echo "$cross_compiling" >&6; }
4009
4010rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4011ac_clean_files=$ac_clean_files_save
4012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4013$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004014if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004015 $as_echo_n "(cached) " >&6
4016else
4017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004018/* end confdefs.h. */
4019
4020int
4021main ()
4022{
4023
4024 ;
4025 return 0;
4026}
4027_ACEOF
4028rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004029if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004030case "(($ac_try" in
4031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4032 *) ac_try_echo=$ac_try;;
4033esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004034eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4035$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004036 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004037 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004038 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4039 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004040 for ac_file in conftest.o conftest.obj conftest.*; do
4041 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004042 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004043 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004044 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4045 break;;
4046 esac
4047done
4048else
Matthias Kloseb9621712010-04-24 17:59:49 +00004049 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004050sed 's/^/| /' conftest.$ac_ext >&5
4051
Matthias Kloseb9621712010-04-24 17:59:49 +00004052{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4053$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004054as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004055See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004056fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004057rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004058fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4060$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004061OBJEXT=$ac_cv_objext
4062ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4064$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004065if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004066 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004067else
Matthias Kloseb9621712010-04-24 17:59:49 +00004068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004069/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004070
Martin v. Löwis11437992002-04-12 09:54:03 +00004071int
4072main ()
4073{
4074#ifndef __GNUC__
4075 choke me
4076#endif
4077
4078 ;
4079 return 0;
4080}
4081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004082if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004083 ac_compiler_gnu=yes
4084else
Matthias Kloseb9621712010-04-24 17:59:49 +00004085 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004088ac_cv_c_compiler_gnu=$ac_compiler_gnu
4089
4090fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4092$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4093if test $ac_compiler_gnu = yes; then
4094 GCC=yes
4095else
4096 GCC=
4097fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004098ac_test_CFLAGS=${CFLAGS+set}
4099ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4101$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004102if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004103 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004104else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004105 ac_save_c_werror_flag=$ac_c_werror_flag
4106 ac_c_werror_flag=yes
4107 ac_cv_prog_cc_g=no
4108 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004110/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004111
Martin v. Löwis11437992002-04-12 09:54:03 +00004112int
4113main ()
4114{
4115
4116 ;
4117 return 0;
4118}
4119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004120if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004121 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004122else
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 CFLAGS=""
4124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004125/* end confdefs.h. */
4126
4127int
4128main ()
4129{
4130
4131 ;
4132 return 0;
4133}
4134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004135if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004136
Matthias Kloseb9621712010-04-24 17:59:49 +00004137else
4138 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004139 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004141/* end confdefs.h. */
4142
4143int
4144main ()
4145{
4146
4147 ;
4148 return 0;
4149}
4150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004151if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004152 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4159 ac_c_werror_flag=$ac_save_c_werror_flag
4160fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4162$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004163if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004164 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004165elif test $ac_cv_prog_cc_g = yes; then
4166 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004167 CFLAGS="-g -O2"
4168 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004169 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004170 fi
4171else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004172 if test "$GCC" = yes; then
4173 CFLAGS="-O2"
4174 else
4175 CFLAGS=
4176 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4179$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004180if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004181 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004182else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004183 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004184ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004186/* end confdefs.h. */
4187#include <stdarg.h>
4188#include <stdio.h>
Ned Deilycbfb9a52012-06-23 16:02:19 -07004189struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004190/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4191struct buf { int x; };
4192FILE * (*rcsopen) (struct buf *, struct stat *, int);
4193static char *e (p, i)
4194 char **p;
4195 int i;
4196{
4197 return p[i];
4198}
4199static char *f (char * (*g) (char **, int), char **p, ...)
4200{
4201 char *s;
4202 va_list v;
4203 va_start (v,p);
4204 s = g (p, va_arg (v,int));
4205 va_end (v);
4206 return s;
4207}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004208
4209/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4210 function prototypes and stuff, but not '\xHH' hex character constants.
4211 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004213 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4214 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004215 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004216int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004218/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4219 inside strings and character constants. */
4220#define FOO(x) 'x'
4221int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4222
Skip Montanaro6dead952003-09-25 14:50:04 +00004223int test (int i, double x);
4224struct s1 {int (*f) (int a);};
4225struct s2 {int (*f) (double a);};
4226int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4227int argc;
4228char **argv;
4229int
4230main ()
4231{
4232return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4233 ;
4234 return 0;
4235}
4236_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4238 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004239do
4240 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004241 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004242 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244rm -f core conftest.err conftest.$ac_objext
4245 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004246done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004247rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004248CC=$ac_save_CC
4249
4250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251# AC_CACHE_VAL
4252case "x$ac_cv_prog_cc_c89" in
4253 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4255$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4258$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004259 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4262$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004263esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004264if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004265
Matthias Kloseb9621712010-04-24 17:59:49 +00004266fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004267
Martin v. Löwis11437992002-04-12 09:54:03 +00004268ac_ext=c
4269ac_cpp='$CPP $CPPFLAGS'
4270ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4271ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4272ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004273
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004274
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004275
4276
Matthias Kloseb9621712010-04-24 17:59:49 +00004277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4278$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004279
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004280# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004281if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004282 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004283
4284 case $withval in
4285 no) with_cxx_main=no
4286 MAINCC='$(CC)';;
4287 yes) with_cxx_main=yes
4288 MAINCC='$(CXX)';;
4289 *) with_cxx_main=yes
4290 MAINCC=$withval
4291 if test -z "$CXX"
4292 then
4293 CXX=$withval
4294 fi;;
4295 esac
4296else
4297
4298 with_cxx_main=no
4299 MAINCC='$(CC)'
4300
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301fi
4302
Matthias Kloseb9621712010-04-24 17:59:49 +00004303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4304$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004305
4306preset_cxx="$CXX"
4307if test -z "$CXX"
4308then
4309 case "$CC" in
4310 gcc) # Extract the first word of "g++", so it can be a program name with args.
4311set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4313$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004314if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004315 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004316else
4317 case $CXX in
4318 [\\/]* | ?:[\\/]*)
4319 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4320 ;;
4321 *)
4322 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4323for as_dir in notfound
4324do
4325 IFS=$as_save_IFS
4326 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004327 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07004328 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004329 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004330 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004331 break 2
4332 fi
4333done
Matthias Kloseb9621712010-04-24 17:59:49 +00004334 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004335IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004336
4337 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4338 ;;
4339esac
4340fi
4341CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004342if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4344$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004345else
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4347$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004350 ;;
4351 cc) # Extract the first word of "c++", so it can be a program name with args.
4352set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4354$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004355if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004356 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004357else
4358 case $CXX in
4359 [\\/]* | ?:[\\/]*)
4360 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4361 ;;
4362 *)
4363 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4364for as_dir in notfound
4365do
4366 IFS=$as_save_IFS
4367 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004368 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07004369 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004370 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004371 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004372 break 2
4373 fi
4374done
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004377
4378 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4379 ;;
4380esac
4381fi
4382CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004383if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4385$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004386else
Matthias Kloseb9621712010-04-24 17:59:49 +00004387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4388$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004389fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004390
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004391 ;;
Ned Deilycbfb9a52012-06-23 16:02:19 -07004392 clang|*/clang) # Extract the first word of "clang++", so it can be a program name with args.
4393set dummy clang++; ac_word=$2
4394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4395$as_echo_n "checking for $ac_word... " >&6; }
4396if ${ac_cv_path_CXX+:} false; then :
4397 $as_echo_n "(cached) " >&6
4398else
4399 case $CXX in
4400 [\\/]* | ?:[\\/]*)
4401 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4402 ;;
4403 *)
4404 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4405for as_dir in notfound
4406do
4407 IFS=$as_save_IFS
4408 test -z "$as_dir" && as_dir=.
4409 for ac_exec_ext in '' $ac_executable_extensions; do
4410 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4411 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4412 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4413 break 2
4414 fi
4415done
4416 done
4417IFS=$as_save_IFS
4418
4419 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="clang++"
4420 ;;
4421esac
4422fi
4423CXX=$ac_cv_path_CXX
4424if test -n "$CXX"; then
4425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4426$as_echo "$CXX" >&6; }
4427else
4428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4429$as_echo "no" >&6; }
4430fi
4431
4432 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004433 esac
4434 if test "$CXX" = "notfound"
4435 then
4436 CXX=""
4437 fi
4438fi
4439if test -z "$CXX"
4440then
4441 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4442do
4443 # Extract the first word of "$ac_prog", so it can be a program name with args.
4444set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4446$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004447if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004448 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004449else
4450 if test -n "$CXX"; then
4451 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4452else
4453as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4454for as_dir in $PATH
4455do
4456 IFS=$as_save_IFS
4457 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004458 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07004459 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004460 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004461 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004462 break 2
4463 fi
4464done
Matthias Kloseb9621712010-04-24 17:59:49 +00004465 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004466IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004467
4468fi
4469fi
4470CXX=$ac_cv_prog_CXX
4471if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4473$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004474else
Matthias Kloseb9621712010-04-24 17:59:49 +00004475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4476$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004477fi
4478
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004479
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004480 test -n "$CXX" && break
4481done
4482test -n "$CXX" || CXX="notfound"
4483
4484 if test "$CXX" = "notfound"
4485 then
4486 CXX=""
4487 fi
4488fi
4489if test "$preset_cxx" != "$CXX"
4490then
Matthias Kloseb9621712010-04-24 17:59:49 +00004491 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004492
4493 By default, distutils will build C++ extension modules with \"$CXX\".
4494 If this is not intended, then set CXX on the configure command line.
4495 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004496$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004497
4498 By default, distutils will build C++ extension modules with \"$CXX\".
4499 If this is not intended, then set CXX on the configure command line.
4500 " >&2;}
4501fi
4502
4503
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4505$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4506save_LDFLAGS="$LDFLAGS"
4507LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004508
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4510/* end confdefs.h. */
4511
4512int
4513main ()
4514{
4515
4516 ;
4517 return 0;
4518}
4519_ACEOF
4520if ac_fn_c_try_link "$LINENO"; then :
4521 NO_AS_NEEDED="-Wl,--no-as-needed"
4522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4523$as_echo "yes" >&6; }
4524else
4525 NO_AS_NEEDED=""
4526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4527$as_echo "no" >&6; }
4528fi
4529rm -f core conftest.err conftest.$ac_objext \
4530 conftest$ac_exeext conftest.$ac_ext
4531LDFLAGS="$save_LDFLAGS"
4532
4533
4534
4535# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004536ac_ext=c
4537ac_cpp='$CPP $CPPFLAGS'
4538ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4539ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4540ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4542$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004543# On Suns, sometimes $CPP names a directory.
4544if test -n "$CPP" && test -d "$CPP"; then
4545 CPP=
4546fi
4547if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004548 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004549 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004550else
Martin v. Löwis11437992002-04-12 09:54:03 +00004551 # Double quotes because CPP needs to be expanded
4552 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4553 do
4554 ac_preproc_ok=false
4555for ac_c_preproc_warn_flag in '' yes
4556do
4557 # Use a header file that comes with gcc, so configuring glibc
4558 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004559 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4560 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004561 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004562 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004564/* end confdefs.h. */
4565#ifdef __STDC__
4566# include <limits.h>
4567#else
4568# include <assert.h>
4569#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004570 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004572if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004573
Matthias Kloseb9621712010-04-24 17:59:49 +00004574else
Martin v. Löwis11437992002-04-12 09:54:03 +00004575 # Broken: fails on valid input.
4576continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004577fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004578rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004579
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004580 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004581 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004584#include <ac_nonexistent.h>
4585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004586if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004587 # Broken: success on invalid input.
4588continue
4589else
Martin v. Löwis11437992002-04-12 09:54:03 +00004590 # Passes both tests.
4591ac_preproc_ok=:
4592break
4593fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004594rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004595
4596done
4597# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004598rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004599if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004600 break
4601fi
4602
4603 done
4604 ac_cv_prog_CPP=$CPP
4605
4606fi
4607 CPP=$ac_cv_prog_CPP
4608else
4609 ac_cv_prog_CPP=$CPP
4610fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4612$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004613ac_preproc_ok=false
4614for ac_c_preproc_warn_flag in '' yes
4615do
4616 # Use a header file that comes with gcc, so configuring glibc
4617 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004618 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4619 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004620 # On the NeXT, cc -E runs the code through the compiler's parser,
4621 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004623/* end confdefs.h. */
4624#ifdef __STDC__
4625# include <limits.h>
4626#else
4627# include <assert.h>
4628#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004629 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004631if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004632
Matthias Kloseb9621712010-04-24 17:59:49 +00004633else
Martin v. Löwis11437992002-04-12 09:54:03 +00004634 # Broken: fails on valid input.
4635continue
4636fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004637rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004638
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004639 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004640 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004642/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004643#include <ac_nonexistent.h>
4644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004645if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004646 # Broken: success on invalid input.
4647continue
4648else
Martin v. Löwis11437992002-04-12 09:54:03 +00004649 # Passes both tests.
4650ac_preproc_ok=:
4651break
4652fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004653rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004654
4655done
4656# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004657rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004658if $ac_preproc_ok; then :
4659
Martin v. Löwis11437992002-04-12 09:54:03 +00004660else
Matthias Kloseb9621712010-04-24 17:59:49 +00004661 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004663as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004664See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004665fi
4666
4667ac_ext=c
4668ac_cpp='$CPP $CPPFLAGS'
4669ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4670ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4671ac_compiler_gnu=$ac_cv_c_compiler_gnu
4672
4673
Matthias Kloseb9621712010-04-24 17:59:49 +00004674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4675$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004676if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004677 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004678else
Matthias Kloseb9621712010-04-24 17:59:49 +00004679 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004680 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004681 # Loop through the user's path and test for each of PROGNAME-LIST
4682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004683for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4684do
4685 IFS=$as_save_IFS
4686 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004687 for ac_prog in grep ggrep; do
4688 for ac_exec_ext in '' $ac_executable_extensions; do
4689 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ned Deilycbfb9a52012-06-23 16:02:19 -07004690 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004691# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004692 # Check for GNU $ac_path_GREP
4693case `"$ac_path_GREP" --version 2>&1` in
4694*GNU*)
4695 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4696*)
4697 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004698 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004699 while :
4700 do
4701 cat "conftest.in" "conftest.in" >"conftest.tmp"
4702 mv "conftest.tmp" "conftest.in"
4703 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004704 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004705 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4706 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004707 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004708 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4709 # Best one so far, save it but keep looking for a better one
4710 ac_cv_path_GREP="$ac_path_GREP"
4711 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004712 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004713 # 10*(2^10) chars as input seems more than enough
4714 test $ac_count -gt 10 && break
4715 done
4716 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4717esac
4718
Matthias Kloseb9621712010-04-24 17:59:49 +00004719 $ac_path_GREP_found && break 3
4720 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004721 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004722 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004723IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004724 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004725 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 +00004726 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004727else
4728 ac_cv_path_GREP=$GREP
4729fi
4730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4733$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004734 GREP="$ac_cv_path_GREP"
4735
4736
Matthias Kloseb9621712010-04-24 17:59:49 +00004737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4738$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004739if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004740 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004741else
4742 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4743 then ac_cv_path_EGREP="$GREP -E"
4744 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004745 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004746 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004747 # Loop through the user's path and test for each of PROGNAME-LIST
4748 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004749for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4750do
4751 IFS=$as_save_IFS
4752 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004753 for ac_prog in egrep; do
4754 for ac_exec_ext in '' $ac_executable_extensions; do
4755 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ned Deilycbfb9a52012-06-23 16:02:19 -07004756 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004757# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004758 # Check for GNU $ac_path_EGREP
4759case `"$ac_path_EGREP" --version 2>&1` in
4760*GNU*)
4761 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4762*)
4763 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004764 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004765 while :
4766 do
4767 cat "conftest.in" "conftest.in" >"conftest.tmp"
4768 mv "conftest.tmp" "conftest.in"
4769 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004770 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004771 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4772 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004773 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004774 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4775 # Best one so far, save it but keep looking for a better one
4776 ac_cv_path_EGREP="$ac_path_EGREP"
4777 ac_path_EGREP_max=$ac_count
4778 fi
4779 # 10*(2^10) chars as input seems more than enough
4780 test $ac_count -gt 10 && break
4781 done
4782 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4783esac
4784
Matthias Kloseb9621712010-04-24 17:59:49 +00004785 $ac_path_EGREP_found && break 3
4786 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004787 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004788 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004789IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004790 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004791 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 +00004792 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004793else
4794 ac_cv_path_EGREP=$EGREP
4795fi
4796
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004797 fi
4798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4800$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004801 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004802
4803
Matthias Kloseb9621712010-04-24 17:59:49 +00004804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4805$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004806if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004807 $as_echo_n "(cached) " >&6
4808else
4809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004810/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004811#include <stdlib.h>
4812#include <stdarg.h>
4813#include <string.h>
4814#include <float.h>
4815
4816int
4817main ()
4818{
4819
4820 ;
4821 return 0;
4822}
4823_ACEOF
4824if ac_fn_c_try_compile "$LINENO"; then :
4825 ac_cv_header_stdc=yes
4826else
4827 ac_cv_header_stdc=no
4828fi
4829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4830
4831if test $ac_cv_header_stdc = yes; then
4832 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4834/* end confdefs.h. */
4835#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004836
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004837_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004838if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004839 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004840
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004841else
Matthias Kloseb9621712010-04-24 17:59:49 +00004842 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004843fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004844rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845
Matthias Kloseb9621712010-04-24 17:59:49 +00004846fi
4847
4848if test $ac_cv_header_stdc = yes; then
4849 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4851/* end confdefs.h. */
4852#include <stdlib.h>
4853
4854_ACEOF
4855if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4856 $EGREP "free" >/dev/null 2>&1; then :
4857
4858else
4859 ac_cv_header_stdc=no
4860fi
4861rm -f conftest*
4862
4863fi
4864
4865if test $ac_cv_header_stdc = yes; then
4866 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4867 if test "$cross_compiling" = yes; then :
4868 :
4869else
4870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4871/* end confdefs.h. */
4872#include <ctype.h>
4873#include <stdlib.h>
4874#if ((' ' & 0x0FF) == 0x020)
4875# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4876# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4877#else
4878# define ISLOWER(c) \
4879 (('a' <= (c) && (c) <= 'i') \
4880 || ('j' <= (c) && (c) <= 'r') \
4881 || ('s' <= (c) && (c) <= 'z'))
4882# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4883#endif
4884
4885#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4886int
4887main ()
4888{
4889 int i;
4890 for (i = 0; i < 256; i++)
4891 if (XOR (islower (i), ISLOWER (i))
4892 || toupper (i) != TOUPPER (i))
4893 return 2;
4894 return 0;
4895}
4896_ACEOF
4897if ac_fn_c_try_run "$LINENO"; then :
4898
4899else
4900 ac_cv_header_stdc=no
4901fi
4902rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4903 conftest.$ac_objext conftest.beam conftest.$ac_ext
4904fi
4905
4906fi
4907fi
4908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4909$as_echo "$ac_cv_header_stdc" >&6; }
4910if test $ac_cv_header_stdc = yes; then
4911
4912$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4913
4914fi
4915
4916# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4917for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4918 inttypes.h stdint.h unistd.h
4919do :
4920 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4921ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4922"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004923if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004924 cat >>confdefs.h <<_ACEOF
4925#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4926_ACEOF
4927
4928fi
4929
4930done
4931
4932
4933
4934 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 +02004935if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004936 MINIX=yes
4937else
4938 MINIX=
4939fi
4940
4941
4942 if test "$MINIX" = yes; then
4943
4944$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4945
4946
4947$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4948
4949
4950$as_echo "#define _MINIX 1" >>confdefs.h
4951
4952 fi
4953
4954
4955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4956$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004957if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004958 $as_echo_n "(cached) " >&6
4959else
4960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4961/* end confdefs.h. */
4962
Ned Deilycbfb9a52012-06-23 16:02:19 -07004963# define __EXTENSIONS__ 1
4964 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00004965int
4966main ()
4967{
4968
4969 ;
4970 return 0;
4971}
4972_ACEOF
4973if ac_fn_c_try_compile "$LINENO"; then :
4974 ac_cv_safe_to_define___extensions__=yes
4975else
4976 ac_cv_safe_to_define___extensions__=no
4977fi
4978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4979fi
4980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4981$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4982 test $ac_cv_safe_to_define___extensions__ = yes &&
4983 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4984
4985 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4986
4987 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4988
4989 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4990
4991 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4992
4993
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004994
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004995# Check for unsupported systems
4996case $ac_sys_system/$ac_sys_release in
4997atheos*|Linux*/1*)
4998 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4999 echo See README for details.
5000 exit 1;;
5001esac
5002
5003
Matthias Kloseb9621712010-04-24 17:59:49 +00005004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5005$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005006
5007# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005008if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005009 withval=$with_suffix;
5010 case $withval in
5011 no) EXEEXT=;;
5012 yes) EXEEXT=.exe;;
5013 *) EXEEXT=$withval;;
5014 esac
5015fi
5016
Matthias Kloseb9621712010-04-24 17:59:49 +00005017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5018$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005019
5020# Test whether we're running on a non-case-sensitive system, in which
5021# case we give a warning if no ext is given
5022
Matthias Kloseb9621712010-04-24 17:59:49 +00005023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5024$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005025if test ! -d CaseSensitiveTestDir; then
5026mkdir CaseSensitiveTestDir
5027fi
5028
5029if test -d casesensitivetestdir
5030then
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5032$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005033 BUILDEXEEXT=.exe
5034else
Matthias Kloseb9621712010-04-24 17:59:49 +00005035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5036$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005037 BUILDEXEEXT=$EXEEXT
5038fi
5039rmdir CaseSensitiveTestDir
5040
5041case $MACHDEP in
5042bsdos*)
5043 case $CC in
5044 gcc) CC="$CC -D_HAVE_BSDI";;
5045 esac;;
5046esac
5047
5048case $ac_sys_system in
5049hp*|HP*)
5050 case $CC in
5051 cc|*/cc) CC="$CC -Ae";;
5052 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005053esac
5054
5055
5056
Matthias Kloseb9621712010-04-24 17:59:49 +00005057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5058$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005059if test -z "$LIBRARY"
5060then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005061 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005062fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5064$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005065
5066# LDLIBRARY is the name of the library to link against (as opposed to the
5067# name of the library into which to insert object files). BLDLIBRARY is also
5068# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5069# is blank as the main program is not linked directly against LDLIBRARY.
5070# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5071# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5072# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5073# DLLLIBRARY is the shared (i.e., DLL) library.
5074#
5075# RUNSHARED is used to run shared python without installed libraries
5076#
5077# INSTSONAME is the name of the shared library that will be use to install
5078# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005079#
5080# LDVERSION is the shared library version number, normally the Python version
5081# with the ABI build flags appended.
5082
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005083
5084
5085
5086
5087
5088
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005089
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005090LDLIBRARY="$LIBRARY"
5091BLDLIBRARY='$(LDLIBRARY)'
5092INSTSONAME='$(LDLIBRARY)'
5093DLLLIBRARY=''
5094LDLIBRARYDIR=''
5095RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005096LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005097
5098# LINKCC is the command that links the python executable -- default is $(CC).
5099# If CXX is set, and if it is needed to link a main function that was
5100# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5101# python might then depend on the C++ runtime
5102# This is altered for AIX in order to build the export list before
5103# linking.
5104
Matthias Kloseb9621712010-04-24 17:59:49 +00005105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5106$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005107if test -z "$LINKCC"
5108then
5109 LINKCC='$(PURIFY) $(MAINCC)'
5110 case $ac_sys_system in
5111 AIX*)
5112 exp_extra="\"\""
5113 if test $ac_sys_release -ge 5 -o \
5114 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5115 exp_extra="."
5116 fi
5117 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005118 QNX*)
5119 # qcc must be used because the other compilers do not
5120 # support -N.
5121 LINKCC=qcc;;
5122 esac
5123fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5125$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005126
5127# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5128# make sure we default having it set to "no": this is used by
5129# distutils.unixccompiler to know if it should add --enable-new-dtags
5130# to linker command lines, and failing to detect GNU ld simply results
5131# in the same bahaviour as before.
5132
Matthias Kloseb9621712010-04-24 17:59:49 +00005133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5134$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005135ac_prog=ld
5136if test "$GCC" = yes; then
5137 ac_prog=`$CC -print-prog-name=ld`
5138fi
5139case `"$ac_prog" -V 2>&1 < /dev/null` in
5140 *GNU*)
5141 GNULD=yes;;
5142 *)
5143 GNULD=no;;
5144esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5146$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005147
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5149$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005150if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005151 $as_echo_n "(cached) " >&6
5152else
5153 ac_cv_c_inline=no
5154for ac_kw in inline __inline__ __inline; do
5155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5156/* end confdefs.h. */
5157#ifndef __cplusplus
5158typedef int foo_t;
5159static $ac_kw foo_t static_foo () {return 0; }
5160$ac_kw foo_t foo () {return 0; }
5161#endif
5162
5163_ACEOF
5164if ac_fn_c_try_compile "$LINENO"; then :
5165 ac_cv_c_inline=$ac_kw
5166fi
5167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5168 test "$ac_cv_c_inline" != no && break
5169done
5170
5171fi
5172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5173$as_echo "$ac_cv_c_inline" >&6; }
5174
5175case $ac_cv_c_inline in
5176 inline | yes) ;;
5177 *)
5178 case $ac_cv_c_inline in
5179 no) ac_val=;;
5180 *) ac_val=$ac_cv_c_inline;;
5181 esac
5182 cat >>confdefs.h <<_ACEOF
5183#ifndef __cplusplus
5184#define inline $ac_val
5185#endif
5186_ACEOF
5187 ;;
5188esac
5189
5190if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005191
5192$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005193
5194
5195fi
5196
5197
Matthias Kloseb9621712010-04-24 17:59:49 +00005198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5199$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005200# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005201if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005202 enableval=$enable_shared;
5203fi
5204
5205
5206if test -z "$enable_shared"
5207then
5208 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005209 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005210 enable_shared="yes";;
5211 *)
5212 enable_shared="no";;
5213 esac
5214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5216$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005217
Matthias Kloseb9621712010-04-24 17:59:49 +00005218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5219$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005220# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005221if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005222 enableval=$enable_profiling; ac_save_cc="$CC"
5223 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005224 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005225 ac_enable_profiling="no"
5226else
Matthias Kloseb9621712010-04-24 17:59:49 +00005227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005228/* end confdefs.h. */
5229int main() { return 0; }
5230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005231if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005232 ac_enable_profiling="yes"
5233else
Matthias Kloseb9621712010-04-24 17:59:49 +00005234 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005236rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5237 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005238fi
5239
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005240 CC="$ac_save_cc"
5241fi
5242
Matthias Kloseb9621712010-04-24 17:59:49 +00005243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
5244$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005245
5246case "$ac_enable_profiling" in
5247 "yes")
5248 BASECFLAGS="-pg $BASECFLAGS"
5249 LDFLAGS="-pg $LDFLAGS"
5250 ;;
5251esac
5252
Matthias Kloseb9621712010-04-24 17:59:49 +00005253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5254$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005255
5256# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5257# library that we build, but we do not want to link against it (we
5258# will find it with a -framework option). For this reason there is an
5259# extra variable BLDLIBRARY against which Python and the extension
5260# modules are linked, BLDLIBRARY. This is normally the same as
5261# LDLIBRARY, but empty for MacOSX framework builds.
5262if test "$enable_framework"
5263then
5264 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5265 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5266 BLDLIBRARY=''
5267else
5268 BLDLIBRARY='$(LDLIBRARY)'
5269fi
5270
5271# Other platforms follow
5272if test $enable_shared = "yes"; then
5273
Matthias Kloseb9621712010-04-24 17:59:49 +00005274$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005275
5276 case $ac_sys_system in
5277 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005278 LDLIBRARY='libpython$(LDVERSION).dll.a'
5279 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005280 ;;
5281 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005282 LDLIBRARY='libpython$(LDVERSION).so'
5283 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005284 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5285 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005286 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005287 then
5288 PY3LIBRARY=libpython3.so
5289 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005290 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005291 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005292 LDLIBRARY='libpython$(LDVERSION).so'
5293 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005294 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5295 case $ac_sys_system in
5296 FreeBSD*)
5297 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5298 ;;
5299 esac
5300 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005301 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005302 then
5303 PY3LIBRARY=libpython3.so
5304 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005305 ;;
5306 hp*|HP*)
5307 case `uname -m` in
5308 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005309 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310 ;;
5311 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005312 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005313 ;;
5314 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005315 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005316 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5317 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005318 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005319 LDLIBRARY='libpython$(LDVERSION).dylib'
5320 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005321 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5322 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005323 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005324 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005325 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5326 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005327
5328 esac
5329else # shared is disabled
5330 case $ac_sys_system in
5331 CYGWIN*)
5332 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005333 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334 ;;
5335 esac
5336fi
5337
Matthias Kloseb9621712010-04-24 17:59:49 +00005338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5339$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005340
5341if test -n "$ac_tool_prefix"; then
5342 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5343set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5345$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005346if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005347 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005348else
5349 if test -n "$RANLIB"; then
5350 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5351else
5352as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5353for as_dir in $PATH
5354do
5355 IFS=$as_save_IFS
5356 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005357 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07005358 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005359 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005360 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005361 break 2
5362 fi
5363done
Matthias Kloseb9621712010-04-24 17:59:49 +00005364 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005365IFS=$as_save_IFS
5366
5367fi
5368fi
5369RANLIB=$ac_cv_prog_RANLIB
5370if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5372$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005373else
Matthias Kloseb9621712010-04-24 17:59:49 +00005374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5375$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005376fi
5377
5378
5379fi
5380if test -z "$ac_cv_prog_RANLIB"; then
5381 ac_ct_RANLIB=$RANLIB
5382 # Extract the first word of "ranlib", so it can be a program name with args.
5383set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5385$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005386if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005387 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005388else
5389 if test -n "$ac_ct_RANLIB"; then
5390 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5391else
5392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5393for as_dir in $PATH
5394do
5395 IFS=$as_save_IFS
5396 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005397 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07005398 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005399 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005400 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005401 break 2
5402 fi
5403done
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005405IFS=$as_save_IFS
5406
5407fi
5408fi
5409ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5410if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5412$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005413else
Matthias Kloseb9621712010-04-24 17:59:49 +00005414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5415$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005416fi
5417
5418 if test "x$ac_ct_RANLIB" = x; then
5419 RANLIB=":"
5420 else
5421 case $cross_compiling:$ac_tool_warned in
5422yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005423{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5424$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425ac_tool_warned=yes ;;
5426esac
5427 RANLIB=$ac_ct_RANLIB
5428 fi
5429else
5430 RANLIB="$ac_cv_prog_RANLIB"
5431fi
5432
5433
5434for ac_prog in ar aal
5435do
5436 # Extract the first word of "$ac_prog", so it can be a program name with args.
5437set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5439$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005440if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005441 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005442else
5443 if test -n "$AR"; then
5444 ac_cv_prog_AR="$AR" # Let the user override the test.
5445else
5446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5447for as_dir in $PATH
5448do
5449 IFS=$as_save_IFS
5450 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005451 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07005452 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005454 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005455 break 2
5456 fi
5457done
Matthias Kloseb9621712010-04-24 17:59:49 +00005458 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005459IFS=$as_save_IFS
5460
5461fi
5462fi
5463AR=$ac_cv_prog_AR
5464if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5466$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005467else
Matthias Kloseb9621712010-04-24 17:59:49 +00005468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5469$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005470fi
5471
5472
5473 test -n "$AR" && break
5474done
5475test -n "$AR" || AR="ar"
5476
5477
5478# tweak ARFLAGS only if the user didn't set it on the command line
5479
5480if test -z "$ARFLAGS"
5481then
5482 ARFLAGS="rc"
5483fi
5484
5485
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005486DISABLE_ASDLGEN=""
5487# Extract the first word of "python", so it can be a program name with args.
5488set dummy python; ac_word=$2
5489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5490$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005491if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005492 $as_echo_n "(cached) " >&6
5493else
5494 if test -n "$HAS_PYTHON"; then
5495 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5496else
5497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5498for as_dir in $PATH
5499do
5500 IFS=$as_save_IFS
5501 test -z "$as_dir" && as_dir=.
5502 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07005503 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005504 ac_cv_prog_HAS_PYTHON="found"
5505 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5506 break 2
5507 fi
5508done
5509 done
5510IFS=$as_save_IFS
5511
5512 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5513fi
5514fi
5515HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5516if test -n "$HAS_PYTHON"; then
5517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5518$as_echo "$HAS_PYTHON" >&6; }
5519else
5520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5521$as_echo "no" >&6; }
5522fi
5523
5524
5525if test $HAS_HG != found -o $HAS_PYTHON != found
5526then
5527 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5528fi
5529
5530
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005531case $MACHDEP in
5532bsdos*|hp*|HP*)
5533 # install -d does not work on BSDI or HP-UX
5534 if test -z "$INSTALL"
5535 then
5536 INSTALL="${srcdir}/install-sh -c"
5537 fi
5538esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005539# Find a good install program. We prefer a C program (faster),
5540# so one script is as good as another. But avoid the broken or
5541# incompatible versions:
5542# SysV /etc/install, /usr/sbin/install
5543# SunOS /usr/etc/install
5544# IRIX /sbin/install
5545# AIX /bin/install
5546# AmigaOS /C/install, which installs bootblocks on floppy discs
5547# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5548# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5549# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5550# OS/2's system install, which has a completely different semantic
5551# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005552# Reject install programs that cannot install multiple files.
5553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5554$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005555if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02005556if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005557 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005558else
5559 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5560for as_dir in $PATH
5561do
5562 IFS=$as_save_IFS
5563 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005564 # Account for people who put trailing slashes in PATH elements.
5565case $as_dir/ in #((
5566 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005567 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005568 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005569 /usr/ucb/* ) ;;
5570 *)
5571 # OSF1 and SCO ODT 3.0 have their own names for install.
5572 # Don't use installbsd from OSF since it installs stuff as root
5573 # by default.
5574 for ac_prog in ginstall scoinst install; do
5575 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07005576 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005577 if test $ac_prog = install &&
5578 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5579 # AIX install. It has an incompatible calling convention.
5580 :
5581 elif test $ac_prog = install &&
5582 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5583 # program-specific install script used by HP pwplus--don't use.
5584 :
5585 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005586 rm -rf conftest.one conftest.two conftest.dir
5587 echo one > conftest.one
5588 echo two > conftest.two
5589 mkdir conftest.dir
5590 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5591 test -s conftest.one && test -s conftest.two &&
5592 test -s conftest.dir/conftest.one &&
5593 test -s conftest.dir/conftest.two
5594 then
5595 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5596 break 3
5597 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598 fi
5599 fi
5600 done
5601 done
5602 ;;
5603esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005604
5605 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005606IFS=$as_save_IFS
5607
Matthias Kloseb9621712010-04-24 17:59:49 +00005608rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005609
5610fi
5611 if test "${ac_cv_path_install+set}" = set; then
5612 INSTALL=$ac_cv_path_install
5613 else
5614 # As a last resort, use the slow shell script. Don't cache a
5615 # value for INSTALL within a source directory, because that will
5616 # break other packages using the cache if that directory is
5617 # removed, or if the value is a relative name.
5618 INSTALL=$ac_install_sh
5619 fi
5620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5622$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005623
5624# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5625# It thinks the first close brace ends the variable substitution.
5626test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5627
5628test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5629
5630test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5631
Matthias Klose93a0ef12012-03-15 18:08:34 +01005632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5633$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5634if test -z "$MKDIR_P"; then
5635 if ${ac_cv_path_mkdir+:} false; then :
5636 $as_echo_n "(cached) " >&6
5637else
5638 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5639for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5640do
5641 IFS=$as_save_IFS
5642 test -z "$as_dir" && as_dir=.
5643 for ac_prog in mkdir gmkdir; do
5644 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07005645 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01005646 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5647 'mkdir (GNU coreutils) '* | \
5648 'mkdir (coreutils) '* | \
5649 'mkdir (fileutils) '4.1*)
5650 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5651 break 3;;
5652 esac
5653 done
5654 done
5655 done
5656IFS=$as_save_IFS
5657
5658fi
5659
5660 test -d ./--version && rmdir ./--version
5661 if test "${ac_cv_path_mkdir+set}" = set; then
5662 MKDIR_P="$ac_cv_path_mkdir -p"
5663 else
5664 # As a last resort, use the slow shell script. Don't cache a
5665 # value for MKDIR_P within a source directory, because that will
5666 # break other packages using the cache if that directory is
5667 # removed, or if the value is a relative name.
5668 MKDIR_P="$ac_install_sh -d"
5669 fi
5670fi
5671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5672$as_echo "$MKDIR_P" >&6; }
5673
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674
5675# Not every filesystem supports hard links
5676
5677if test -z "$LN" ; then
5678 case $ac_sys_system in
5679 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680 *) LN=ln;;
5681 esac
5682fi
5683
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005684# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005685
5686ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005687
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5690$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691
5692# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005693if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694 withval=$with_pydebug;
5695if test "$withval" != no
5696then
5697
Matthias Kloseb9621712010-04-24 17:59:49 +00005698$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699
Matthias Kloseb9621712010-04-24 17:59:49 +00005700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5701$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005703 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005704else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5705$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706fi
5707else
Matthias Kloseb9621712010-04-24 17:59:49 +00005708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5709$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710fi
5711
5712
5713# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5714# merged with this chunk of code?
5715
5716# Optimizer/debugger flags
5717# ------------------------
5718# (The following bit of code is complicated enough - please keep things
5719# indented properly. Just pretend you're editing Python code. ;-)
5720
5721# There are two parallel sets of case statements below, one that checks to
5722# see if OPT was set and one that does BASECFLAGS setting based upon
5723# compiler and platform. BASECFLAGS tweaks need to be made even if the
5724# user set OPT.
5725
5726# tweak OPT based on compiler and platform, only if the user didn't set
5727# it on the command line
5728
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005729if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730then
5731 case $GCC in
5732 yes)
5733 if test "$CC" != 'g++' ; then
5734 STRICT_PROTO="-Wstrict-prototypes"
5735 fi
5736 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5737 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5738 WRAP="-fwrapv"
5739 fi
Stefan Krah962055d2011-09-14 15:14:08 +02005740
5741 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01005742 case $CC in
5743 *clang*) WRAP="-fwrapv"
5744 ;;
5745 esac
Stefan Krah962055d2011-09-14 15:14:08 +02005746
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747 case $ac_cv_prog_cc_g in
5748 yes)
5749 if test "$Py_DEBUG" = 'true' ; then
5750 # Optimization messes up debuggers, so turn it off for
5751 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005752 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753 else
5754 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5755 fi
5756 ;;
5757 *)
5758 OPT="-O3 -Wall $STRICT_PROTO"
5759 ;;
5760 esac
5761 case $ac_sys_system in
5762 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5763 ;;
5764 esac
5765 ;;
5766
5767 *)
5768 OPT="-O"
5769 ;;
5770 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771fi
5772
5773
5774
5775# The -arch flags for universal builds on OSX
5776UNIVERSAL_ARCH_FLAGS=
5777
5778
5779# tweak BASECFLAGS based on compiler and platform
5780case $GCC in
5781yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005782 # Python doesn't violate C99 aliasing rules, but older versions of
5783 # GCC produce warnings for legal Python code. Enable
5784 # -fno-strict-aliasing on versions of GCC that support but produce
5785 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5787$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788 ac_save_cc="$CC"
5789 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005790 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02005791 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005792 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005793else
Matthias Kloseb9621712010-04-24 17:59:49 +00005794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005796
Matthias Kloseb159a552010-04-25 21:00:44 +00005797
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005798int
5799main ()
5800{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005801
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005802 ;
5803 return 0;
5804}
Matthias Kloseb159a552010-04-25 21:00:44 +00005805
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005807if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005808
5809 CC="$ac_save_cc -fstrict-aliasing"
5810 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005812/* end confdefs.h. */
5813
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005814 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005815int
5816main ()
5817{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005818double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005819 ;
5820 return 0;
5821}
Matthias Kloseb159a552010-04-25 21:00:44 +00005822
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005824if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005825
5826 ac_cv_no_strict_aliasing=no
5827
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828else
Matthias Kloseb159a552010-04-25 21:00:44 +00005829
5830 ac_cv_no_strict_aliasing=yes
5831
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005832fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005834
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005835else
Matthias Kloseb159a552010-04-25 21:00:44 +00005836
5837 ac_cv_no_strict_aliasing=no
5838
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005841fi
5842
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005843 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5846$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005847 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848 then
5849 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5850 fi
5851
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04005852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
5853$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
5854 ac_save_cc="$CC"
5855 CC="$CC -Wunused-result -Werror"
5856 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02005857 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04005858 $as_echo_n "(cached) " >&6
5859else
5860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5861/* end confdefs.h. */
5862
5863
5864int
5865main ()
5866{
5867
5868 ;
5869 return 0;
5870}
5871
5872_ACEOF
5873if ac_fn_c_try_compile "$LINENO"; then :
5874
5875 ac_cv_disable_unused_result_warning=yes
5876
5877else
5878
5879 ac_cv_disable_unused_result_warning=no
5880
5881fi
5882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5883fi
5884
5885 CFLAGS="$save_CFLAGS"
5886 CC="$ac_save_cc"
5887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
5888$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
5889
5890 if test $ac_cv_disable_unused_result_warning = yes
5891 then
5892 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
5893 fi
5894
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5896 # support. Without this, treatment of subnormals doesn't follow
5897 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01005898 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899 alpha*)
5900 BASECFLAGS="$BASECFLAGS -mieee"
5901 ;;
5902 esac
5903
5904 case $ac_sys_system in
5905 SCO_SV*)
5906 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5907 ;;
5908 # is there any other compiler on Darwin besides gcc?
5909 Darwin*)
5910 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5911 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005912 if test "${CC}" = gcc
5913 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5915$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005916 case "${UNIVERSALSDK}" in
5917 */MacOSX10.4u.sdk)
5918 # Build using 10.4 SDK, force usage of gcc when the
5919 # compiler is gcc, otherwise the user will get very
5920 # confusing error messages when building on OSX 10.6
5921 CC=gcc-4.0
5922 CPP=cpp-4.0
5923 ;;
5924 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5926$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005927 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928
5929
5930 if test "${enable_universalsdk}"; then
5931 UNIVERSAL_ARCH_FLAGS=""
5932 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5933 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5934 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005935 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5937 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005938 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005939 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940
5941 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5942 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005943 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005944 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005946 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5947 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005948 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005949 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005950
5951 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5952 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005953 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005954 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005955
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005957 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958
5959 fi
5960
5961
Ronald Oussoren666028b2010-04-18 19:07:43 +00005962 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5963 if test "${UNIVERSALSDK}" != "/"
5964 then
5965 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5966 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005967 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968 fi
5969 fi
5970
5971 # Calculate the right deployment target for this build.
5972 #
5973 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07005974 if test ${cur_target} '>' 10.2 && \
5975 test ${cur_target} '<' 10.6
5976 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005977 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005978 if test ${enable_universalsdk}; then
5979 if test "${UNIVERSAL_ARCHS}" = "all"; then
5980 # Ensure that the default platform for a
5981 # 4-way universal build is OSX 10.5,
5982 # that's the first OS release where
5983 # 4-way builds make sense.
5984 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005985
5986 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5987 cur_target='10.5'
5988
5989 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5990 cur_target='10.5'
5991
5992 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5993 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005994 fi
5995 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005996 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005997 # On Intel macs default to a deployment
5998 # target of 10.4, that's the first OSX
5999 # release with Intel support.
6000 cur_target="10.4"
6001 fi
6002 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003 fi
6004 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6005
6006 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6007 # environment with a value that is the same as what we'll use
6008 # in the Makefile to ensure that we'll get the same compiler
6009 # environment during configure and build time.
6010 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6011 export MACOSX_DEPLOYMENT_TARGET
6012 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6013
6014 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015 esac
6016 ;;
6017
6018*)
6019 case $ac_sys_system in
6020 OpenUNIX*|UnixWare*)
6021 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6022 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006023 SCO_SV*)
6024 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6025 ;;
6026 esac
6027 ;;
6028esac
6029
6030if test "$Py_DEBUG" = 'true'; then
6031 :
6032else
6033 OPT="-DNDEBUG $OPT"
6034fi
6035
6036if test "$ac_arch_flags"
6037then
6038 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6039fi
6040
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041# Check whether GCC supports PyArg_ParseTuple format
6042if test "$GCC" = "yes"
6043then
Matthias Kloseb9621712010-04-24 17:59:49 +00006044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6045$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046 save_CFLAGS=$CFLAGS
6047 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00006048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006049/* end confdefs.h. */
6050
6051 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052int
6053main ()
6054{
6055
6056 ;
6057 return 0;
6058}
Matthias Kloseb159a552010-04-25 21:00:44 +00006059
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006061if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062
Matthias Kloseb159a552010-04-25 21:00:44 +00006063
Matthias Kloseb9621712010-04-24 17:59:49 +00006064$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006065
Matthias Kloseb159a552010-04-25 21:00:44 +00006066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006067$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006068
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069else
Matthias Kloseb159a552010-04-25 21:00:44 +00006070
6071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006072$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006073
6074fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6076 CFLAGS=$save_CFLAGS
6077fi
6078
6079# On some compilers, pthreads are available without further options
6080# (e.g. MacOS X). On some of these systems, the compiler will not
6081# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6082# So we have to see first whether pthreads are available without
6083# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6085$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006086if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006087 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088else
Matthias Kloseb9621712010-04-24 17:59:49 +00006089 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006090 ac_cv_pthread_is_default=no
6091else
Matthias Kloseb9621712010-04-24 17:59:49 +00006092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006093/* end confdefs.h. */
6094
6095#include <pthread.h>
6096
6097void* routine(void* p){return NULL;}
6098
6099int main(){
6100 pthread_t p;
6101 if(pthread_create(&p,NULL,routine,NULL)!=0)
6102 return 1;
6103 (void)pthread_detach(p);
6104 return 0;
6105}
6106
6107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006108if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006109
6110 ac_cv_pthread_is_default=yes
6111 ac_cv_kthread=no
6112 ac_cv_pthread=no
6113
6114else
Matthias Kloseb9621712010-04-24 17:59:49 +00006115 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006116fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006117rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6118 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006119fi
6120
6121
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006122fi
6123
Matthias Kloseb9621712010-04-24 17:59:49 +00006124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6125$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006126
6127
6128if test $ac_cv_pthread_is_default = yes
6129then
6130 ac_cv_kpthread=no
6131else
6132# -Kpthread, if available, provides the right #defines
6133# and linker options to make pthread_create available
6134# Some compilers won't report that they do not support -Kpthread,
6135# so we need to run a program to see whether it really made the
6136# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6138$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006139if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006140 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006141else
6142 ac_save_cc="$CC"
6143CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006144if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006145 ac_cv_kpthread=no
6146else
Matthias Kloseb9621712010-04-24 17:59:49 +00006147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006148/* end confdefs.h. */
6149
6150#include <pthread.h>
6151
6152void* routine(void* p){return NULL;}
6153
6154int main(){
6155 pthread_t p;
6156 if(pthread_create(&p,NULL,routine,NULL)!=0)
6157 return 1;
6158 (void)pthread_detach(p);
6159 return 0;
6160}
6161
6162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006163if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006164 ac_cv_kpthread=yes
6165else
Matthias Kloseb9621712010-04-24 17:59:49 +00006166 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006167fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006168rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6169 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006170fi
6171
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006172CC="$ac_save_cc"
6173fi
6174
Matthias Kloseb9621712010-04-24 17:59:49 +00006175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6176$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006177fi
6178
6179if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6180then
6181# -Kthread, if available, provides the right #defines
6182# and linker options to make pthread_create available
6183# Some compilers won't report that they do not support -Kthread,
6184# so we need to run a program to see whether it really made the
6185# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6187$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006188if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006189 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006190else
6191 ac_save_cc="$CC"
6192CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006193if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006194 ac_cv_kthread=no
6195else
Matthias Kloseb9621712010-04-24 17:59:49 +00006196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006197/* end confdefs.h. */
6198
6199#include <pthread.h>
6200
6201void* routine(void* p){return NULL;}
6202
6203int main(){
6204 pthread_t p;
6205 if(pthread_create(&p,NULL,routine,NULL)!=0)
6206 return 1;
6207 (void)pthread_detach(p);
6208 return 0;
6209}
6210
6211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006212if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006213 ac_cv_kthread=yes
6214else
Matthias Kloseb9621712010-04-24 17:59:49 +00006215 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006216fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6218 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006219fi
6220
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006221CC="$ac_save_cc"
6222fi
6223
Matthias Kloseb9621712010-04-24 17:59:49 +00006224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6225$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006226fi
6227
6228if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6229then
6230# -pthread, if available, provides the right #defines
6231# and linker options to make pthread_create available
6232# Some compilers won't report that they do not support -pthread,
6233# so we need to run a program to see whether it really made the
6234# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6236$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006237if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006238 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006239else
6240 ac_save_cc="$CC"
6241CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006242if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006243 ac_cv_pthread=no
6244else
Matthias Kloseb9621712010-04-24 17:59:49 +00006245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006246/* end confdefs.h. */
6247
6248#include <pthread.h>
6249
6250void* routine(void* p){return NULL;}
6251
6252int main(){
6253 pthread_t p;
6254 if(pthread_create(&p,NULL,routine,NULL)!=0)
6255 return 1;
6256 (void)pthread_detach(p);
6257 return 0;
6258}
6259
6260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006261if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006262 ac_cv_pthread=yes
6263else
Matthias Kloseb9621712010-04-24 17:59:49 +00006264 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006266rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6267 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006268fi
6269
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006270CC="$ac_save_cc"
6271fi
6272
Matthias Kloseb9621712010-04-24 17:59:49 +00006273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6274$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006275fi
6276
6277# If we have set a CC compiler flag for thread support then
6278# check if it works for CXX, too.
6279ac_cv_cxx_thread=no
6280if test ! -z "$CXX"
6281then
Matthias Kloseb9621712010-04-24 17:59:49 +00006282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6283$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006284ac_save_cxx="$CXX"
6285
6286if test "$ac_cv_kpthread" = "yes"
6287then
6288 CXX="$CXX -Kpthread"
6289 ac_cv_cxx_thread=yes
6290elif test "$ac_cv_kthread" = "yes"
6291then
6292 CXX="$CXX -Kthread"
6293 ac_cv_cxx_thread=yes
6294elif test "$ac_cv_pthread" = "yes"
6295then
6296 CXX="$CXX -pthread"
6297 ac_cv_cxx_thread=yes
6298fi
6299
6300if test $ac_cv_cxx_thread = yes
6301then
6302 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6303 $CXX -c conftest.$ac_ext 2>&5
6304 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6305 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6306 then
6307 ac_cv_cxx_thread=yes
6308 else
6309 ac_cv_cxx_thread=no
6310 fi
6311 rm -fr conftest*
6312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6314$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006315fi
6316CXX="$ac_save_cxx"
6317
6318
6319# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6321$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006322if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006323 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006324else
Matthias Kloseb9621712010-04-24 17:59:49 +00006325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006326/* end confdefs.h. */
6327#include <stdlib.h>
6328#include <stdarg.h>
6329#include <string.h>
6330#include <float.h>
6331
6332int
6333main ()
6334{
6335
6336 ;
6337 return 0;
6338}
6339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006340if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006341 ac_cv_header_stdc=yes
6342else
Matthias Kloseb9621712010-04-24 17:59:49 +00006343 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006344fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6346
6347if test $ac_cv_header_stdc = yes; then
6348 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006350/* end confdefs.h. */
6351#include <string.h>
6352
6353_ACEOF
6354if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006355 $EGREP "memchr" >/dev/null 2>&1; then :
6356
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006357else
6358 ac_cv_header_stdc=no
6359fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006360rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006361
6362fi
6363
6364if test $ac_cv_header_stdc = yes; then
6365 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006367/* end confdefs.h. */
6368#include <stdlib.h>
6369
6370_ACEOF
6371if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006372 $EGREP "free" >/dev/null 2>&1; then :
6373
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006374else
6375 ac_cv_header_stdc=no
6376fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006377rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006378
6379fi
6380
6381if test $ac_cv_header_stdc = yes; then
6382 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006383 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006384 :
6385else
Matthias Kloseb9621712010-04-24 17:59:49 +00006386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006387/* end confdefs.h. */
6388#include <ctype.h>
6389#include <stdlib.h>
6390#if ((' ' & 0x0FF) == 0x020)
6391# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6392# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6393#else
6394# define ISLOWER(c) \
6395 (('a' <= (c) && (c) <= 'i') \
6396 || ('j' <= (c) && (c) <= 'r') \
6397 || ('s' <= (c) && (c) <= 'z'))
6398# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6399#endif
6400
6401#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6402int
6403main ()
6404{
6405 int i;
6406 for (i = 0; i < 256; i++)
6407 if (XOR (islower (i), ISLOWER (i))
6408 || toupper (i) != TOUPPER (i))
6409 return 2;
6410 return 0;
6411}
6412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006413if ac_fn_c_try_run "$LINENO"; then :
6414
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006415else
Matthias Kloseb9621712010-04-24 17:59:49 +00006416 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006417fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006418rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6419 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006420fi
6421
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006422fi
6423fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6425$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006426if test $ac_cv_header_stdc = yes; then
6427
Matthias Kloseb9621712010-04-24 17:59:49 +00006428$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006429
6430fi
6431
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006432for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006433fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006434ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006435sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006436unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006437poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006438sys/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 +01006439sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006440sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006441sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006442sys/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 -07006443libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006444bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006445do :
6446 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6447ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006448if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006449 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006450#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006451_ACEOF
6452
6453fi
6454
Guido van Rossum627b2d71993-12-24 10:39:16 +00006455done
6456
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006457ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006458for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006459 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6461$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006462if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006463 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006464else
Matthias Kloseb9621712010-04-24 17:59:49 +00006465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006466/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006467#include <sys/types.h>
6468#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006469
Martin v. Löwis11437992002-04-12 09:54:03 +00006470int
6471main ()
6472{
6473if ((DIR *) 0)
6474return 0;
6475 ;
6476 return 0;
6477}
6478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006479if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006480 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006481else
Matthias Kloseb9621712010-04-24 17:59:49 +00006482 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006485fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006486eval ac_res=\$$as_ac_Header
6487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6488$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006489if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006490 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006491#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006492_ACEOF
6493
6494ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006495fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006496
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006497done
6498# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6499if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6501$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006502if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006503 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006504else
Martin v. Löwis11437992002-04-12 09:54:03 +00006505 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006507/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006508
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006509/* Override any GCC internal prototype to avoid an error.
6510 Use char because int might match the return type of a GCC
6511 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006512#ifdef __cplusplus
6513extern "C"
6514#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006515char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006516int
6517main ()
6518{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006519return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006520 ;
6521 return 0;
6522}
6523_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006524for ac_lib in '' dir; do
6525 if test -z "$ac_lib"; then
6526 ac_res="none required"
6527 else
6528 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006529 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006530 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006531 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006532 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006534rm -f core conftest.err conftest.$ac_objext \
6535 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006536 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006537 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006539done
Victor Stinnere0be4232011-10-25 13:06:09 +02006540if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006541
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006542else
6543 ac_cv_search_opendir=no
6544fi
6545rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006546LIBS=$ac_func_search_save_LIBS
6547fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6549$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006550ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006551if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006552 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006553
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006554fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006555
Michael W. Hudson54241132001-12-07 15:38:26 +00006556else
Matthias Kloseb9621712010-04-24 17:59:49 +00006557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6558$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006559if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006560 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006561else
6562 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006564/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006565
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006566/* Override any GCC internal prototype to avoid an error.
6567 Use char because int might match the return type of a GCC
6568 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006569#ifdef __cplusplus
6570extern "C"
6571#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006572char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006573int
6574main ()
6575{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006576return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006577 ;
6578 return 0;
6579}
6580_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006581for ac_lib in '' x; do
6582 if test -z "$ac_lib"; then
6583 ac_res="none required"
6584 else
6585 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006586 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006587 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006588 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006589 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006591rm -f core conftest.err conftest.$ac_objext \
6592 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006593 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006594 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006596done
Victor Stinnere0be4232011-10-25 13:06:09 +02006597if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006599else
6600 ac_cv_search_opendir=no
6601fi
6602rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006603LIBS=$ac_func_search_save_LIBS
6604fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6606$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006607ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006608if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006609 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006610
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006611fi
6612
6613fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006614
Matthias Kloseb9621712010-04-24 17:59:49 +00006615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6616$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006617if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006618 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006619else
Matthias Kloseb9621712010-04-24 17:59:49 +00006620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006621/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006622#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006623int
6624main ()
6625{
6626return makedev(0, 0);
6627 ;
6628 return 0;
6629}
6630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006631if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006632 ac_cv_header_sys_types_h_makedev=yes
6633else
Matthias Kloseb9621712010-04-24 17:59:49 +00006634 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006636rm -f core conftest.err conftest.$ac_objext \
6637 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006638
6639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6641$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006642
6643if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006644ac_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 +02006645if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006646
Matthias Kloseb9621712010-04-24 17:59:49 +00006647$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006648
6649fi
6650
6651
6652
6653 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006654 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 +02006655if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006656
Matthias Kloseb9621712010-04-24 17:59:49 +00006657$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006658
6659fi
6660
6661
6662 fi
6663fi
6664
Michael W. Hudson54241132001-12-07 15:38:26 +00006665
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006666# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6667for ac_header in net/if.h
6668do :
6669 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6670#ifdef STDC_HEADERS
6671# include <stdlib.h>
6672# include <stddef.h>
6673#else
6674# ifdef HAVE_STDLIB_H
6675# include <stdlib.h>
6676# endif
6677#endif
6678#ifdef HAVE_SYS_SOCKET_H
6679# include <sys/socket.h>
6680#endif
6681
6682"
Victor Stinnere0be4232011-10-25 13:06:09 +02006683if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006684 cat >>confdefs.h <<_ACEOF
6685#define HAVE_NET_IF_H 1
6686_ACEOF
6687
6688fi
6689
6690done
6691
6692
6693
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006694# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006695for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006696do :
6697 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006698#ifdef HAVE_CURSES_H
6699#include <curses.h>
6700#endif
6701
Matthias Kloseb9621712010-04-24 17:59:49 +00006702"
Victor Stinnere0be4232011-10-25 13:06:09 +02006703if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006704 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006705#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006706_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006707
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006708fi
6709
6710done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006711
6712
Martin v. Löwis11017b12006-01-14 18:12:57 +00006713# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006714for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006715do :
6716 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 +00006717#ifdef HAVE_ASM_TYPES_H
6718#include <asm/types.h>
6719#endif
6720#ifdef HAVE_SYS_SOCKET_H
6721#include <sys/socket.h>
6722#endif
6723
Matthias Kloseb9621712010-04-24 17:59:49 +00006724"
Victor Stinnere0be4232011-10-25 13:06:09 +02006725if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006726 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006727#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006728_ACEOF
6729
6730fi
6731
6732done
6733
6734
Charles-François Natali47413c12011-10-06 19:47:44 +02006735# On Linux, can.h and can/raw.h require sys/socket.h
6736for ac_header in linux/can.h linux/can/raw.h
6737do :
6738 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6739ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
6740#ifdef HAVE_SYS_SOCKET_H
6741#include <sys/socket.h>
6742#endif
6743
6744"
6745if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6746 cat >>confdefs.h <<_ACEOF
6747#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6748_ACEOF
6749
6750fi
6751
6752done
6753
6754
Guido van Rossum627b2d71993-12-24 10:39:16 +00006755# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006756was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6758$as_echo_n "checking for clock_t in time.h... " >&6; }
6759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006760/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006761#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006762
6763_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006764if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006765 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006766 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006767else
Martin v. Löwis11437992002-04-12 09:54:03 +00006768
6769
Matthias Kloseb9621712010-04-24 17:59:49 +00006770$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006771
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006772
Guido van Rossum627b2d71993-12-24 10:39:16 +00006773fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006774rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006775
Matthias Kloseb9621712010-04-24 17:59:49 +00006776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6777$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006778
Matthias Kloseb9621712010-04-24 17:59:49 +00006779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6780$as_echo_n "checking for makedev... " >&6; }
6781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006782/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006783
Jesus Cea740f53a2010-04-28 11:35:30 +00006784#if defined(MAJOR_IN_MKDEV)
6785#include <sys/mkdev.h>
6786#elif defined(MAJOR_IN_SYSMACROS)
6787#include <sys/sysmacros.h>
6788#else
6789#include <sys/types.h>
6790#endif
6791
Neal Norwitz11690112002-07-30 01:08:28 +00006792int
6793main ()
6794{
Jesus Cea740f53a2010-04-28 11:35:30 +00006795
6796 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006797 ;
6798 return 0;
6799}
Matthias Kloseb159a552010-04-25 21:00:44 +00006800
Neal Norwitz11690112002-07-30 01:08:28 +00006801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006802if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006803 ac_cv_has_makedev=yes
6804else
Matthias Kloseb9621712010-04-24 17:59:49 +00006805 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006807rm -f core conftest.err conftest.$ac_objext \
6808 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6810$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006811if test "$ac_cv_has_makedev" = "yes"; then
6812
Matthias Kloseb9621712010-04-24 17:59:49 +00006813$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006814
6815fi
6816
Martin v. Löwis399a6892002-10-04 10:22:02 +00006817# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6818# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6819# defined, but the compiler does not support pragma redefine_extname,
6820# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6821# structures (such as rlimit64) without declaring them. As a
6822# work-around, disable LFS on such configurations
6823
6824use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6826$as_echo_n "checking Solaris LFS bug... " >&6; }
6827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006828/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006829
6830#define _LARGEFILE_SOURCE 1
6831#define _FILE_OFFSET_BITS 64
6832#include <sys/resource.h>
6833
Martin v. Löwis399a6892002-10-04 10:22:02 +00006834int
6835main ()
6836{
6837struct rlimit foo;
6838 ;
6839 return 0;
6840}
6841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006842if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006843 sol_lfs_bug=no
6844else
Matthias Kloseb9621712010-04-24 17:59:49 +00006845 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6849$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006850if test "$sol_lfs_bug" = "yes"; then
6851 use_lfs=no
6852fi
6853
6854if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006855# Two defines needed to enable largefile support on various platforms
6856# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006857case $ac_sys_system/$ac_sys_release in
6858AIX*)
6859
6860$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6861
6862 ;;
6863esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006864
Matthias Kloseb9621712010-04-24 17:59:49 +00006865$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006866
6867
Matthias Kloseb9621712010-04-24 17:59:49 +00006868$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006869
Martin v. Löwis399a6892002-10-04 10:22:02 +00006870fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006871
Guido van Rossum84e7b241996-08-19 21:59:00 +00006872# Add some code to confdefs.h so that the test for off_t works on SCO
6873cat >> confdefs.h <<\EOF
6874#if defined(SCO_DS)
6875#undef _OFF_T
6876#endif
6877EOF
6878
Guido van Rossumef2255b2000-03-10 22:30:29 +00006879# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006880ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006881if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006882
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006883else
Martin v. Löwis11437992002-04-12 09:54:03 +00006884
6885cat >>confdefs.h <<_ACEOF
6886#define mode_t int
6887_ACEOF
6888
6889fi
6890
Matthias Kloseb9621712010-04-24 17:59:49 +00006891ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006892if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006893
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006894else
Martin v. Löwis11437992002-04-12 09:54:03 +00006895
6896cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006897#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006898_ACEOF
6899
6900fi
6901
Matthias Kloseb9621712010-04-24 17:59:49 +00006902ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006903if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006904
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006905else
Martin v. Löwis11437992002-04-12 09:54:03 +00006906
6907cat >>confdefs.h <<_ACEOF
6908#define pid_t int
6909_ACEOF
6910
6911fi
6912
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006913
Martin v. Löwis11437992002-04-12 09:54:03 +00006914cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006915#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006916_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006917
Matthias Kloseb9621712010-04-24 17:59:49 +00006918ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006919if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006920
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006921else
Martin v. Löwis11437992002-04-12 09:54:03 +00006922
6923cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006924#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006925_ACEOF
6926
6927fi
6928
Matthias Kloseb9621712010-04-24 17:59:49 +00006929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6930$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006931if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006932 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006933else
Matthias Kloseb9621712010-04-24 17:59:49 +00006934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006935/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006936#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006937
6938_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006939if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006940 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006941 ac_cv_type_uid_t=yes
6942else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006943 ac_cv_type_uid_t=no
6944fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006945rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006946
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006947fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6949$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006950if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006951
Matthias Kloseb9621712010-04-24 17:59:49 +00006952$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006953
6954
Matthias Kloseb9621712010-04-24 17:59:49 +00006955$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006956
6957fi
6958
Matthias Kloseb9621712010-04-24 17:59:49 +00006959ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6960case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006961 no|yes) ;; #(
6962 *)
6963
Matthias Kloseb9621712010-04-24 17:59:49 +00006964$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006965
6966
6967cat >>confdefs.h <<_ACEOF
6968#define uint32_t $ac_cv_c_uint32_t
6969_ACEOF
6970;;
6971 esac
6972
Matthias Kloseb9621712010-04-24 17:59:49 +00006973ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6974case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006975 no|yes) ;; #(
6976 *)
6977
Matthias Kloseb9621712010-04-24 17:59:49 +00006978$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006979
6980
6981cat >>confdefs.h <<_ACEOF
6982#define uint64_t $ac_cv_c_uint64_t
6983_ACEOF
6984;;
6985 esac
6986
Matthias Kloseb9621712010-04-24 17:59:49 +00006987ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6988case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006989 no|yes) ;; #(
6990 *)
6991
6992cat >>confdefs.h <<_ACEOF
6993#define int32_t $ac_cv_c_int32_t
6994_ACEOF
6995;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006996esac
6997
Matthias Kloseb9621712010-04-24 17:59:49 +00006998ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6999case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007000 no|yes) ;; #(
7001 *)
7002
7003cat >>confdefs.h <<_ACEOF
7004#define int64_t $ac_cv_c_int64_t
7005_ACEOF
7006;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007007esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007008
Matthias Kloseb9621712010-04-24 17:59:49 +00007009ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007010if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007011
Matthias Kloseb9621712010-04-24 17:59:49 +00007012$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007013
7014fi
7015
Stefan Krah1919b7e2012-03-21 18:25:23 +01007016ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7017if test "x$ac_cv_type___uint128_t" = xyes; then :
7018
7019$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7020
7021fi
7022
Jack Jansendd19cf82001-12-06 22:36:17 +00007023
Michael W. Hudson54241132001-12-07 15:38:26 +00007024# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007025# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007026# The cast to long int works around a bug in the HP C Compiler
7027# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7028# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7029# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7031$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007032if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007033 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007034else
Matthias Kloseb9621712010-04-24 17:59:49 +00007035 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 +00007036
Martin v. Löwis11437992002-04-12 09:54:03 +00007037else
Matthias Kloseb9621712010-04-24 17:59:49 +00007038 if test "$ac_cv_type_int" = yes; then
7039 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7040$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007041as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007042See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007043 else
7044 ac_cv_sizeof_int=0
7045 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007047
Martin v. Löwis11437992002-04-12 09:54:03 +00007048fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7050$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007051
7052
7053
Martin v. Löwis11437992002-04-12 09:54:03 +00007054cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007055#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007056_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007057
7058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007059# The cast to long int works around a bug in the HP C Compiler
7060# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7061# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7062# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7064$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007065if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007066 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007067else
Matthias Kloseb9621712010-04-24 17:59:49 +00007068 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 +00007069
Martin v. Löwis11437992002-04-12 09:54:03 +00007070else
Matthias Kloseb9621712010-04-24 17:59:49 +00007071 if test "$ac_cv_type_long" = yes; then
7072 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7073$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007074as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007075See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007076 else
7077 ac_cv_sizeof_long=0
7078 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007079fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007080
Martin v. Löwis11437992002-04-12 09:54:03 +00007081fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7083$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007084
7085
7086
Martin v. Löwis11437992002-04-12 09:54:03 +00007087cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007088#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007089_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007090
7091
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007092# The cast to long int works around a bug in the HP C Compiler
7093# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7094# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7095# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7097$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007098if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007099 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007100else
Matthias Kloseb9621712010-04-24 17:59:49 +00007101 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 +00007102
Martin v. Löwis11437992002-04-12 09:54:03 +00007103else
Matthias Kloseb9621712010-04-24 17:59:49 +00007104 if test "$ac_cv_type_void_p" = yes; then
7105 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7106$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007107as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007108See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007109 else
7110 ac_cv_sizeof_void_p=0
7111 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007113
Martin v. Löwis11437992002-04-12 09:54:03 +00007114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7116$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007117
7118
7119
Martin v. Löwis11437992002-04-12 09:54:03 +00007120cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007121#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007122_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007123
7124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007125# The cast to long int works around a bug in the HP C Compiler
7126# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7127# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7128# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7130$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007131if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007132 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007133else
Matthias Kloseb9621712010-04-24 17:59:49 +00007134 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 +00007135
Martin v. Löwis11437992002-04-12 09:54:03 +00007136else
Matthias Kloseb9621712010-04-24 17:59:49 +00007137 if test "$ac_cv_type_short" = yes; then
7138 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7139$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007140as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007141See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007142 else
7143 ac_cv_sizeof_short=0
7144 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007145fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007146
Martin v. Löwis11437992002-04-12 09:54:03 +00007147fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7149$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007150
7151
7152
Martin v. Löwis11437992002-04-12 09:54:03 +00007153cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007154#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007155_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007156
7157
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007158# The cast to long int works around a bug in the HP C Compiler
7159# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7160# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7161# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7163$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007164if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007165 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007166else
Matthias Kloseb9621712010-04-24 17:59:49 +00007167 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 +00007168
Martin v. Löwis11437992002-04-12 09:54:03 +00007169else
Matthias Kloseb9621712010-04-24 17:59:49 +00007170 if test "$ac_cv_type_float" = yes; then
7171 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7172$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007173as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007174See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007175 else
7176 ac_cv_sizeof_float=0
7177 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007178fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007179
Martin v. Löwis11437992002-04-12 09:54:03 +00007180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7182$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007183
7184
7185
Martin v. Löwis11437992002-04-12 09:54:03 +00007186cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007187#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007188_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007189
7190
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007191# The cast to long int works around a bug in the HP C Compiler
7192# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7193# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7194# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7196$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007197if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007198 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007199else
Matthias Kloseb9621712010-04-24 17:59:49 +00007200 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 +00007201
Martin v. Löwis11437992002-04-12 09:54:03 +00007202else
Matthias Kloseb9621712010-04-24 17:59:49 +00007203 if test "$ac_cv_type_double" = yes; then
7204 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7205$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007206as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007207See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007208 else
7209 ac_cv_sizeof_double=0
7210 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007211fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007212
Martin v. Löwis11437992002-04-12 09:54:03 +00007213fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7215$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007216
7217
7218
Martin v. Löwis11437992002-04-12 09:54:03 +00007219cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007220#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007221_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007222
7223
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007224# The cast to long int works around a bug in the HP C Compiler
7225# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7226# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7227# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7229$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007230if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007231 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007232else
Matthias Kloseb9621712010-04-24 17:59:49 +00007233 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 +00007234
Martin v. Löwis11437992002-04-12 09:54:03 +00007235else
Matthias Kloseb9621712010-04-24 17:59:49 +00007236 if test "$ac_cv_type_fpos_t" = yes; then
7237 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7238$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007239as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007240See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007241 else
7242 ac_cv_sizeof_fpos_t=0
7243 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007244fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007245
Martin v. Löwis11437992002-04-12 09:54:03 +00007246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7248$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007249
7250
7251
Martin v. Löwis11437992002-04-12 09:54:03 +00007252cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007253#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007254_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007255
Michael W. Hudson54241132001-12-07 15:38:26 +00007256
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007257# The cast to long int works around a bug in the HP C Compiler
7258# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7259# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7260# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7262$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007263if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007264 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007265else
Matthias Kloseb9621712010-04-24 17:59:49 +00007266 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 +00007267
Martin v. Löwis18e16552006-02-15 17:27:45 +00007268else
Matthias Kloseb9621712010-04-24 17:59:49 +00007269 if test "$ac_cv_type_size_t" = yes; then
7270 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7271$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007272as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007273See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007274 else
7275 ac_cv_sizeof_size_t=0
7276 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007277fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007278
Martin v. Löwis18e16552006-02-15 17:27:45 +00007279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7281$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007282
7283
7284
Martin v. Löwis18e16552006-02-15 17:27:45 +00007285cat >>confdefs.h <<_ACEOF
7286#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7287_ACEOF
7288
7289
Christian Heimes400adb02008-02-01 08:12:03 +00007290# The cast to long int works around a bug in the HP C Compiler
7291# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7292# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7293# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7295$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007296if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007297 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007298else
Matthias Kloseb9621712010-04-24 17:59:49 +00007299 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 +00007300
Christian Heimes400adb02008-02-01 08:12:03 +00007301else
Matthias Kloseb9621712010-04-24 17:59:49 +00007302 if test "$ac_cv_type_pid_t" = yes; then
7303 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7304$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007305as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007306See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007307 else
7308 ac_cv_sizeof_pid_t=0
7309 fi
7310fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007311
Christian Heimes400adb02008-02-01 08:12:03 +00007312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7314$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007315
7316
7317
7318cat >>confdefs.h <<_ACEOF
7319#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7320_ACEOF
7321
7322
Michael W. Hudson54241132001-12-07 15:38:26 +00007323
Matthias Kloseb9621712010-04-24 17:59:49 +00007324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7325$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007326have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007328/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007329
Martin v. Löwis11437992002-04-12 09:54:03 +00007330int
7331main ()
7332{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007333long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007334 ;
7335 return 0;
7336}
7337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007338if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007339
7340
Matthias Kloseb9621712010-04-24 17:59:49 +00007341$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007342
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007343 have_long_long=yes
7344
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7348$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007349if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007350# The cast to long int works around a bug in the HP C Compiler
7351# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7352# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7353# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7355$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007356if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007357 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007358else
Matthias Kloseb9621712010-04-24 17:59:49 +00007359 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 +00007360
Martin v. Löwis11437992002-04-12 09:54:03 +00007361else
Matthias Kloseb9621712010-04-24 17:59:49 +00007362 if test "$ac_cv_type_long_long" = yes; then
7363 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7364$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007365as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007366See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007367 else
7368 ac_cv_sizeof_long_long=0
7369 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007370fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007371
Martin v. Löwis11437992002-04-12 09:54:03 +00007372fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7374$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007375
7376
7377
Martin v. Löwis11437992002-04-12 09:54:03 +00007378cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007379#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007380_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007381
Michael W. Hudson54241132001-12-07 15:38:26 +00007382
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007383fi
7384
Matthias Kloseb9621712010-04-24 17:59:49 +00007385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7386$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007387have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007389/* end confdefs.h. */
7390
7391int
7392main ()
7393{
7394long double x; x = (long double)0;
7395 ;
7396 return 0;
7397}
7398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007399if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007400
7401
Matthias Kloseb9621712010-04-24 17:59:49 +00007402$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007403
7404 have_long_double=yes
7405
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007406fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7409$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007410if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007411# The cast to long int works around a bug in the HP C Compiler
7412# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7413# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7414# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7416$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007417if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007418 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007419else
Matthias Kloseb9621712010-04-24 17:59:49 +00007420 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 +00007421
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007422else
Matthias Kloseb9621712010-04-24 17:59:49 +00007423 if test "$ac_cv_type_long_double" = yes; then
7424 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7425$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007426as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007427See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007428 else
7429 ac_cv_sizeof_long_double=0
7430 fi
7431fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007432
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007433fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7435$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007436
7437
7438
7439cat >>confdefs.h <<_ACEOF
7440#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7441_ACEOF
7442
7443
7444fi
7445
7446
Matthias Kloseb9621712010-04-24 17:59:49 +00007447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7448$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007449have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007451/* end confdefs.h. */
7452
7453int
7454main ()
7455{
7456_Bool x; x = (_Bool)0;
7457 ;
7458 return 0;
7459}
7460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007461if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007462
7463
Matthias Kloseb9621712010-04-24 17:59:49 +00007464$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007465
7466 have_c99_bool=yes
7467
Thomas Woutersb2137042007-02-01 18:02:27 +00007468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7471$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007472if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007473# The cast to long int works around a bug in the HP C Compiler
7474# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7475# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7476# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7478$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007479if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007480 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007481else
Matthias Kloseb9621712010-04-24 17:59:49 +00007482 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 +00007483
Thomas Woutersb2137042007-02-01 18:02:27 +00007484else
Matthias Kloseb9621712010-04-24 17:59:49 +00007485 if test "$ac_cv_type__Bool" = yes; then
7486 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7487$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007488as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02007489See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007490 else
7491 ac_cv_sizeof__Bool=0
7492 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007493fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007494
Thomas Woutersb2137042007-02-01 18:02:27 +00007495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7497$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007498
7499
7500
Thomas Woutersb2137042007-02-01 18:02:27 +00007501cat >>confdefs.h <<_ACEOF
7502#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7503_ACEOF
7504
7505
7506fi
7507
Matthias Kloseb9621712010-04-24 17:59:49 +00007508ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007509 #include <stdint.h>
7510 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007511 #ifdef HAVE_INTTYPES_H
7512 #include <inttypes.h>
7513 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007514"
Victor Stinnere0be4232011-10-25 13:06:09 +02007515if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007516
7517cat >>confdefs.h <<_ACEOF
7518#define HAVE_UINTPTR_T 1
7519_ACEOF
7520
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007521# The cast to long int works around a bug in the HP C Compiler
7522# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7523# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7524# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7526$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007527if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007528 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007529else
Matthias Kloseb9621712010-04-24 17:59:49 +00007530 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 +00007531
Martin v. Löwis11437992002-04-12 09:54:03 +00007532else
Matthias Kloseb9621712010-04-24 17:59:49 +00007533 if test "$ac_cv_type_uintptr_t" = yes; then
7534 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7535$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007536as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007537See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007538 else
7539 ac_cv_sizeof_uintptr_t=0
7540 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007542
Martin v. Löwis11437992002-04-12 09:54:03 +00007543fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7545$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007546
7547
7548
Martin v. Löwis11437992002-04-12 09:54:03 +00007549cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007550#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007551_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007552
Michael W. Hudson54241132001-12-07 15:38:26 +00007553
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007554fi
7555
Thomas Wouters89f507f2006-12-13 04:49:30 +00007556
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007557# The cast to long int works around a bug in the HP C Compiler
7558# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7559# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7560# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7562$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007563if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007564 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007565else
Matthias Kloseb9621712010-04-24 17:59:49 +00007566 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007567#ifdef HAVE_SYS_TYPES_H
7568#include <sys/types.h>
7569#endif
7570
Matthias Kloseb9621712010-04-24 17:59:49 +00007571"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007572
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007573else
Matthias Kloseb9621712010-04-24 17:59:49 +00007574 if test "$ac_cv_type_off_t" = yes; then
7575 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7576$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007577as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007578See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007579 else
7580 ac_cv_sizeof_off_t=0
7581 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007583
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007584fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7586$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007587
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007588
7589
Martin v. Löwis11437992002-04-12 09:54:03 +00007590cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007591#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007592_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007593
Michael W. Hudson54241132001-12-07 15:38:26 +00007594
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007595
Matthias Kloseb9621712010-04-24 17:59:49 +00007596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7597$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007598if test "$have_long_long" = yes
7599then
7600if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007601 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007602
Matthias Kloseb9621712010-04-24 17:59:49 +00007603$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007604
Matthias Kloseb9621712010-04-24 17:59:49 +00007605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7606$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007607else
Matthias Kloseb9621712010-04-24 17:59:49 +00007608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7609$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007610fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007611else
Matthias Kloseb9621712010-04-24 17:59:49 +00007612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7613$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007614fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007615
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007616# The cast to long int works around a bug in the HP C Compiler
7617# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7618# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7619# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7621$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007622if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007623 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007624else
Matthias Kloseb9621712010-04-24 17:59:49 +00007625 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007626#ifdef HAVE_SYS_TYPES_H
7627#include <sys/types.h>
7628#endif
7629#ifdef HAVE_TIME_H
7630#include <time.h>
7631#endif
7632
Matthias Kloseb9621712010-04-24 17:59:49 +00007633"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007634
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007635else
Matthias Kloseb9621712010-04-24 17:59:49 +00007636 if test "$ac_cv_type_time_t" = yes; then
7637 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7638$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007639as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007640See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007641 else
7642 ac_cv_sizeof_time_t=0
7643 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007645
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7648$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007649
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007650
7651
Martin v. Löwis11437992002-04-12 09:54:03 +00007652cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007653#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007654_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007655
Michael W. Hudson54241132001-12-07 15:38:26 +00007656
7657
Trent Mick635f6fb2000-08-23 21:33:05 +00007658# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007659ac_save_cc="$CC"
7660if test "$ac_cv_kpthread" = "yes"
7661then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007662elif test "$ac_cv_kthread" = "yes"
7663then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007664elif test "$ac_cv_pthread" = "yes"
7665then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007666fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007667
Matthias Kloseb9621712010-04-24 17:59:49 +00007668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7669$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007670have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007672/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007673
7674 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007675int
7676main ()
7677{
Guido van Rossum12580492000-09-24 16:47:19 +00007678pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007679 ;
7680 return 0;
7681}
Matthias Kloseb159a552010-04-25 21:00:44 +00007682
Martin v. Löwis11437992002-04-12 09:54:03 +00007683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007684if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007685 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7689$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007690if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007691 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007692# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7693# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7694# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7696$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007697if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007698 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007699else
Matthias Kloseb9621712010-04-24 17:59:49 +00007700 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007701#ifdef HAVE_PTHREAD_H
7702#include <pthread.h>
7703#endif
7704
Matthias Kloseb9621712010-04-24 17:59:49 +00007705"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007706
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007707else
Matthias Kloseb9621712010-04-24 17:59:49 +00007708 if test "$ac_cv_type_pthread_t" = yes; then
7709 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7710$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007711as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007712See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007713 else
7714 ac_cv_sizeof_pthread_t=0
7715 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007717
Trent Mick635f6fb2000-08-23 21:33:05 +00007718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7720$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007721
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007722
7723
Martin v. Löwis11437992002-04-12 09:54:03 +00007724cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007725#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007726_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007727
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007728
Trent Mick635f6fb2000-08-23 21:33:05 +00007729fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007730CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007731
Michael W. Hudson54241132001-12-07 15:38:26 +00007732
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007733case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007734 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007735 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7736 ;;
7737 Darwin/*)
7738 OTHER_LIBTOOL_OPT=""
7739 ;;
7740esac
7741
7742
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007743ARCH_RUN_32BIT=""
7744
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007745case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007746 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007747 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7748 if test "${enable_universalsdk}"; then
7749 :
7750 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007751 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007752 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007753 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007754 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007755 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007756 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007757 if test ${gcc_version} '<' 4.0
7758 then
7759 LIBTOOL_CRUFT="-lcc_dynamic"
7760 else
7761 LIBTOOL_CRUFT=""
7762 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007763 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007764 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007765else
Matthias Kloseb9621712010-04-24 17:59:49 +00007766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007767/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007768
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007769 #include <unistd.h>
7770 int main(int argc, char*argv[])
7771 {
7772 if (sizeof(long) == 4) {
7773 return 0;
7774 } else {
7775 return 1;
7776 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007777 }
7778
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007780if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007781 ac_osx_32bit=yes
7782else
Matthias Kloseb9621712010-04-24 17:59:49 +00007783 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7786 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007787fi
7788
7789
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007790 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007791 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007792 i386)
7793 MACOSX_DEFAULT_ARCH="i386"
7794 ;;
7795 ppc)
7796 MACOSX_DEFAULT_ARCH="ppc"
7797 ;;
7798 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007799 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007800 ;;
7801 esac
7802 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007803 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007804 i386)
7805 MACOSX_DEFAULT_ARCH="x86_64"
7806 ;;
7807 ppc)
7808 MACOSX_DEFAULT_ARCH="ppc64"
7809 ;;
7810 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007811 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007812 ;;
7813 esac
7814
7815 #ARCH_RUN_32BIT="true"
7816 fi
7817
7818 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007819 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007820 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007821esac
7822
Matthias Kloseb9621712010-04-24 17:59:49 +00007823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7824$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007825if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007826then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007827 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007828 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007829 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007830
Matthias Kloseb9621712010-04-24 17:59:49 +00007831$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007832
Matthias Kloseb9621712010-04-24 17:59:49 +00007833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7834$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007835 if test $enable_shared = "yes"
7836 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007837 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 +00007838 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007839else
Matthias Kloseb9621712010-04-24 17:59:49 +00007840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7841$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007842fi
7843
Matthias Kloseb9621712010-04-24 17:59:49 +00007844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7845$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007846case $ac_sys_system/$ac_sys_release in
7847 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007848
Matthias Kloseb9621712010-04-24 17:59:49 +00007849$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007850
Matthias Kloseb9621712010-04-24 17:59:49 +00007851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7852$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007853 ;;
7854 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7856$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007857 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007858esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007859
Guido van Rossum0a516c91994-09-12 10:58:40 +00007860# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007861
Michael W. Hudson54241132001-12-07 15:38:26 +00007862
7863
7864
7865
Benjamin Peterson99f03762010-04-11 22:15:28 +00007866
Thomas Wouters477c8d52006-05-27 19:21:47 +00007867
Georg Brandlb1441c72009-01-03 22:33:39 +00007868
Thomas Wouters477c8d52006-05-27 19:21:47 +00007869cat >>confdefs.h <<_ACEOF
7870#define SHLIB_EXT "$SO"
7871_ACEOF
7872
Guido van Rossum0a516c91994-09-12 10:58:40 +00007873# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007874# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007875# (Shared libraries in this instance are shared modules to be loaded into
7876# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7878$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007879if test -z "$LDSHARED"
7880then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007881 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007882 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007883 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007884 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007885 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007886 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007887 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007888 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007889 if test "$GCC" = "yes" ; then
7890 LDSHARED='$(CC) -shared'
7891 LDCXXSHARED='$(CXX) -shared'
7892 else
7893 LDSHARED='$(CC) -G'
7894 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007895 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007896 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007897 if test "$GCC" = "yes" ; then
7898 LDSHARED='$(CC) -shared'
7899 LDCXXSHARED='$(CXX) -shared'
7900 else
7901 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007902 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007903 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007904 LDSHARED='$(CC) -bundle'
7905 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007906 if test "$enable_framework" ; then
7907 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007908 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7909 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007910 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007911 else
7912 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007913 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007914 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007915 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007916 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007917 LDSHARED='$(CC) -bundle'
7918 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007919 if test "$enable_framework" ; then
7920 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007921 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7922 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007923 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007924 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007925 # No framework, use the Python app as bundle-loader
7926 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007927 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007928 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007929 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007930 Darwin/*)
7931 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7932 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007933
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007934 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007935 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007936 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007937 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007938 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007939 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7940 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007941 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007942 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007943 LDSHARED='$(CC) -bundle'
7944 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007945 if test "$enable_framework" ; then
7946 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007947 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7948 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007949 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007950 else
7951 # No framework, use the Python app as bundle-loader
7952 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7953 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007954 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007955 fi
7956 fi
7957 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007958 Linux*|GNU*|QNX*)
7959 LDSHARED='$(CC) -shared'
7960 LDCXXSHARED='$(CXX) -shared';;
7961 BSD/OS*/4*)
7962 LDSHARED="gcc -shared"
7963 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007964 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007965 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007966 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007967 LDSHARED='$(CC) -shared'
7968 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007969 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007970 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007971 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007972 OpenBSD*)
7973 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7974 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007975 LDSHARED='$(CC) -shared $(CCSHARED)'
7976 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007977 else
7978 case `uname -r` in
7979 [01].* | 2.[0-7] | 2.[0-7].*)
7980 LDSHARED="ld -Bshareable ${LDFLAGS}"
7981 ;;
7982 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007983 LDSHARED='$(CC) -shared $(CCSHARED)'
7984 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007985 ;;
7986 esac
7987 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007988 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007989 LDSHARED='$(CC) -shared'
7990 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007991 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007992 if test "$GCC" = "yes" ; then
7993 LDSHARED='$(CC) -shared'
7994 LDCXXSHARED='$(CXX) -shared'
7995 else
7996 LDSHARED='$(CC) -G'
7997 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007998 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007999 SCO_SV*)
8000 LDSHARED='$(CC) -Wl,-G,-Bexport'
8001 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8002 CYGWIN*)
8003 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8004 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008005 *) LDSHARED="ld";;
8006 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008007fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8009$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008010LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008011BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008012# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008013# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8015$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008016if test -z "$CCSHARED"
8017then
Guido van Rossum07397971997-04-29 21:49:50 +00008018 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008019 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008020 then CCSHARED="-fPIC";
8021 elif test `uname -p` = sparc;
8022 then CCSHARED="-xcode=pic32";
8023 else CCSHARED="-Kpic";
8024 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008025 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008026 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008027 else CCSHARED="+z";
8028 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008029 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008030 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008031 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008032 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008033 if test "$GCC" = "yes"
8034 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008035 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008036 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008037 SCO_SV*)
8038 if test "$GCC" = "yes"
8039 then CCSHARED="-fPIC"
8040 else CCSHARED="-Kpic -belf"
8041 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008042 IRIX*/6*) case $CC in
8043 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008044 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008045 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008046 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8049$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008050# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008051# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8053$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008054if test -z "$LINKFORSHARED"
8055then
Guido van Rossum07397971997-04-29 21:49:50 +00008056 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008057 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008058 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008059 LINKFORSHARED="-Wl,-E -Wl,+s";;
8060# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008061 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008062 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008063 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008064 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008065 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008066 if test "$enable_framework"
8067 then
Jack Jansenda49e192005-01-07 13:08:22 +00008068 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008069 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008070 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008071 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008072 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008073 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008074 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008075 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8076 then
8077 LINKFORSHARED="-Wl,--export-dynamic"
8078 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008079 SunOS/5*) case $CC in
8080 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008081 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008082 then
8083 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008084 fi;;
8085 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008086 CYGWIN*)
8087 if test $enable_shared = "no"
8088 then
8089 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8090 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008091 QNX*)
8092 # -Wl,-E causes the symbols to be added to the dynamic
8093 # symbol table so that they can be found when a module
8094 # is loaded. -N 2048K causes the stack size to be set
8095 # to 2048 kilobytes so that the stack doesn't overflow
8096 # when running test_compile.py.
8097 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008098 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008099fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8101$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008102
Michael W. Hudson54241132001-12-07 15:38:26 +00008103
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008104
Matthias Kloseb9621712010-04-24 17:59:49 +00008105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8106$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008107if test ! "$LIBRARY" = "$LDLIBRARY"
8108then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008109 case $ac_sys_system in
8110 CYGWIN*)
8111 # Cygwin needs CCSHARED when building extension DLLs
8112 # but not when building the interpreter DLL.
8113 CFLAGSFORSHARED='';;
8114 *)
8115 CFLAGSFORSHARED='$(CCSHARED)'
8116 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8119$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008120
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008121# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8122# library (with --enable-shared).
8123# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008124# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8125# if it is not required, since it creates a dependency of the shared library
8126# to LIBS. This, in turn, means that applications linking the shared libpython
8127# don't need to link LIBS explicitly. The default should be only changed
8128# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008129
Matthias Kloseb9621712010-04-24 17:59:49 +00008130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8131$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008132case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008133 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008134 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008135esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8137$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008138
8139
Guido van Rossum627b2d71993-12-24 10:39:16 +00008140# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8142$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008143if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008144 $as_echo_n "(cached) " >&6
8145else
8146 ac_check_lib_save_LIBS=$LIBS
8147LIBS="-lsendfile $LIBS"
8148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8149/* end confdefs.h. */
8150
8151/* Override any GCC internal prototype to avoid an error.
8152 Use char because int might match the return type of a GCC
8153 builtin and then its argument prototype would still apply. */
8154#ifdef __cplusplus
8155extern "C"
8156#endif
8157char sendfile ();
8158int
8159main ()
8160{
8161return sendfile ();
8162 ;
8163 return 0;
8164}
8165_ACEOF
8166if ac_fn_c_try_link "$LINENO"; then :
8167 ac_cv_lib_sendfile_sendfile=yes
8168else
8169 ac_cv_lib_sendfile_sendfile=no
8170fi
8171rm -f core conftest.err conftest.$ac_objext \
8172 conftest$ac_exeext conftest.$ac_ext
8173LIBS=$ac_check_lib_save_LIBS
8174fi
8175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8176$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008177if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008178 cat >>confdefs.h <<_ACEOF
8179#define HAVE_LIBSENDFILE 1
8180_ACEOF
8181
8182 LIBS="-lsendfile $LIBS"
8183
8184fi
8185
Matthias Kloseb9621712010-04-24 17:59:49 +00008186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8187$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008188if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008189 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008190else
Martin v. Löwis11437992002-04-12 09:54:03 +00008191 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008192LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008195
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008196/* Override any GCC internal prototype to avoid an error.
8197 Use char because int might match the return type of a GCC
8198 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008199#ifdef __cplusplus
8200extern "C"
8201#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008202char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008203int
8204main ()
8205{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008206return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008207 ;
8208 return 0;
8209}
8210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008211if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008212 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008213else
Matthias Kloseb9621712010-04-24 17:59:49 +00008214 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008215fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008216rm -f core conftest.err conftest.$ac_objext \
8217 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008218LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008219fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8221$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008222if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008223 cat >>confdefs.h <<_ACEOF
8224#define HAVE_LIBDL 1
8225_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008226
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008227 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008228
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008229fi
8230 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8232$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008233if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008234 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008235else
Martin v. Löwis11437992002-04-12 09:54:03 +00008236 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008237LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008239/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008241/* Override any GCC internal prototype to avoid an error.
8242 Use char because int might match the return type of a GCC
8243 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008244#ifdef __cplusplus
8245extern "C"
8246#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008247char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008248int
8249main ()
8250{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008251return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008252 ;
8253 return 0;
8254}
8255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008256if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008257 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008258else
Matthias Kloseb9621712010-04-24 17:59:49 +00008259 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008261rm -f core conftest.err conftest.$ac_objext \
8262 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008263LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8266$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008267if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008268 cat >>confdefs.h <<_ACEOF
8269#define HAVE_LIBDLD 1
8270_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008271
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008272 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008273
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008274fi
8275 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008276
Georg Brandlb1441c72009-01-03 22:33:39 +00008277# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008278if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8280$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008281if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008282 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008283else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008284 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008286/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008287
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008288/* Override any GCC internal prototype to avoid an error.
8289 Use char because int might match the return type of a GCC
8290 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008291#ifdef __cplusplus
8292extern "C"
8293#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008294char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008295int
8296main ()
8297{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008298return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008299 ;
8300 return 0;
8301}
8302_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008303for ac_lib in '' pthread rt posix4; do
8304 if test -z "$ac_lib"; then
8305 ac_res="none required"
8306 else
8307 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008308 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008309 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008310 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008311 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008313rm -f core conftest.err conftest.$ac_objext \
8314 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008315 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008316 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008318done
Victor Stinnere0be4232011-10-25 13:06:09 +02008319if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008320
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008321else
8322 ac_cv_search_sem_init=no
8323fi
8324rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008325LIBS=$ac_func_search_save_LIBS
8326fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8328$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008329ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008330if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008331 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008332
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008333fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008334 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008335 # posix4 on Solaris 2.6
8336 # pthread (first!) on Linux
8337fi
8338
Martin v. Löwis19d17342003-06-14 21:03:05 +00008339# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8341$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008342if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008343 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008344else
8345 ac_check_lib_save_LIBS=$LIBS
8346LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008348/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008349
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008350/* Override any GCC internal prototype to avoid an error.
8351 Use char because int might match the return type of a GCC
8352 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008353#ifdef __cplusplus
8354extern "C"
8355#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008356char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008357int
8358main ()
8359{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008360return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008361 ;
8362 return 0;
8363}
8364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008365if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008366 ac_cv_lib_intl_textdomain=yes
8367else
Matthias Kloseb9621712010-04-24 17:59:49 +00008368 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008369fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008370rm -f core conftest.err conftest.$ac_objext \
8371 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008372LIBS=$ac_check_lib_save_LIBS
8373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8375$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008376if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008377
Matthias Kloseb9621712010-04-24 17:59:49 +00008378$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008379
Brett Cannonc6d936e2009-06-07 20:09:53 +00008380 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008381fi
8382
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008383
8384# checks for system dependent C++ extensions support
8385case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8387$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008389/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008390
Georg Brandl59e87bd2011-02-15 19:48:59 +00008391 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008392int
8393main ()
8394{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008395loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008396 ;
8397 return 0;
8398}
Matthias Kloseb159a552010-04-25 21:00:44 +00008399
Martin v. Löwis11437992002-04-12 09:54:03 +00008400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008401if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008402
Matthias Kloseb159a552010-04-25 21:00:44 +00008403
Matthias Kloseb9621712010-04-24 17:59:49 +00008404$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008405
Matthias Kloseb159a552010-04-25 21:00:44 +00008406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008407$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008408
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008409else
Matthias Kloseb159a552010-04-25 21:00:44 +00008410
8411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008412$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008413
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008414fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008415rm -f core conftest.err conftest.$ac_objext \
8416 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008417 *) ;;
8418esac
8419
Guido van Rossum70c7f481998-03-26 18:44:10 +00008420# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8422$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008423if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008424 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008425else
Martin v. Löwis11437992002-04-12 09:54:03 +00008426 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008427LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008429/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008430
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008431/* Override any GCC internal prototype to avoid an error.
8432 Use char because int might match the return type of a GCC
8433 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008434#ifdef __cplusplus
8435extern "C"
8436#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008437char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008438int
8439main ()
8440{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008441return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008442 ;
8443 return 0;
8444}
8445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008446if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008447 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008448else
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008450fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008451rm -f core conftest.err conftest.$ac_objext \
8452 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008453LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008454fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8456$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008457if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008458 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008459fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008460 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8462$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008463if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008464 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008465else
Martin v. Löwis11437992002-04-12 09:54:03 +00008466 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008467LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008469/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008470
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008471/* Override any GCC internal prototype to avoid an error.
8472 Use char because int might match the return type of a GCC
8473 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008474#ifdef __cplusplus
8475extern "C"
8476#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008477char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008478int
8479main ()
8480{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008481return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008482 ;
8483 return 0;
8484}
8485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008486if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008487 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008488else
Matthias Kloseb9621712010-04-24 17:59:49 +00008489 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008490fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008491rm -f core conftest.err conftest.$ac_objext \
8492 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008493LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008494fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8496$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008497if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008498 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008499fi
8500 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008501
Matthias Kloseb9621712010-04-24 17:59:49 +00008502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8503$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008504
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008505# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008506if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008507 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8509$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008510LIBS="$withval $LIBS"
8511
8512else
Matthias Kloseb9621712010-04-24 17:59:49 +00008513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8514$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515fi
8516
Guido van Rossum7f43da71994-08-01 12:15:30 +00008517
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008518if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008519 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8520set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8522$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008523if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008524 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008525else
8526 case $PKG_CONFIG in
8527 [\\/]* | ?:[\\/]*)
8528 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8529 ;;
8530 *)
8531 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8532for as_dir in $PATH
8533do
8534 IFS=$as_save_IFS
8535 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008536 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07008537 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008538 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008539 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008540 break 2
8541 fi
8542done
Matthias Kloseb9621712010-04-24 17:59:49 +00008543 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008544IFS=$as_save_IFS
8545
8546 ;;
8547esac
8548fi
8549PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8550if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8552$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008553else
Matthias Kloseb9621712010-04-24 17:59:49 +00008554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8555$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008556fi
8557
8558
8559fi
8560if test -z "$ac_cv_path_PKG_CONFIG"; then
8561 ac_pt_PKG_CONFIG=$PKG_CONFIG
8562 # Extract the first word of "pkg-config", so it can be a program name with args.
8563set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8565$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008566if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008567 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008568else
8569 case $ac_pt_PKG_CONFIG in
8570 [\\/]* | ?:[\\/]*)
8571 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8572 ;;
8573 *)
8574 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8575for as_dir in $PATH
8576do
8577 IFS=$as_save_IFS
8578 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008579 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07008580 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008581 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008582 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008583 break 2
8584 fi
8585done
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008587IFS=$as_save_IFS
8588
8589 ;;
8590esac
8591fi
8592ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8593if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8595$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008596else
Matthias Kloseb9621712010-04-24 17:59:49 +00008597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8598$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008599fi
8600
8601 if test "x$ac_pt_PKG_CONFIG" = x; then
8602 PKG_CONFIG=""
8603 else
8604 case $cross_compiling:$ac_tool_warned in
8605yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008606{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8607$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008608ac_tool_warned=yes ;;
8609esac
8610 PKG_CONFIG=$ac_pt_PKG_CONFIG
8611 fi
8612else
8613 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8614fi
8615
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008616
8617# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8619$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008620
8621# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008622if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008623 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008624else
8625 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008626fi
8627
8628
Matthias Kloseb9621712010-04-24 17:59:49 +00008629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8630$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008631
8632# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8634$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008635
8636# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008637if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008638 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008639else
8640 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008641fi
8642
8643
8644if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008645 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8646else
8647 LIBFFI_INCLUDEDIR=""
8648fi
8649
8650
Matthias Kloseb9621712010-04-24 17:59:49 +00008651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8652$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008653
Stefan Krah60187b52012-03-23 19:06:27 +01008654# Check for use of the system libmpdec library
8655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
8656$as_echo_n "checking for --with-system-libmpdec... " >&6; }
8657
8658# Check whether --with-system_libmpdec was given.
8659if test "${with_system_libmpdec+set}" = set; then :
8660 withval=$with_system_libmpdec;
8661else
8662 with_system_libmpdec="no"
8663fi
8664
8665
8666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
8667$as_echo "$with_system_libmpdec" >&6; }
8668
Benjamin Peterson076ed002010-10-31 17:11:02 +00008669# Check for support for loadable sqlite extensions
8670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8671$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8672# Check whether --enable-loadable-sqlite-extensions was given.
8673if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8674 enableval=$enable_loadable_sqlite_extensions;
8675else
8676 enable_loadable_sqlite_extensions="no"
8677fi
8678
8679
8680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8681$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8682
Matthias Klose55708cc2009-04-30 08:06:49 +00008683# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8685$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008686
8687# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008688if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008689 withval=$with_dbmliborder;
8690if test x$with_dbmliborder = xyes
8691then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008692as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008693else
8694 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8695 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8696 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008697 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008698 fi
8699 done
8700fi
8701fi
8702
Matthias Kloseb9621712010-04-24 17:59:49 +00008703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8704$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008705
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008706# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008707
8708
Matthias Kloseb9621712010-04-24 17:59:49 +00008709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8710$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008711
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008712# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008713if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008714 withval=$with_signal_module;
8715fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008716
8717
8718if test -z "$with_signal_module"
8719then with_signal_module="yes"
8720fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8722$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008723
8724if test "${with_signal_module}" = "yes"; then
8725 USE_SIGNAL_MODULE=""
8726 SIGNAL_OBJS=""
8727else
8728 USE_SIGNAL_MODULE="#"
8729 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8730fi
8731
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008732# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008733
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008734USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008736
Martin v. Löwis11437992002-04-12 09:54:03 +00008737
8738# Templates for things AC_DEFINEd more than once.
8739# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008740
8741
Martin v. Löwis11437992002-04-12 09:54:03 +00008742
Matthias Kloseb9621712010-04-24 17:59:49 +00008743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8744$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008745
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008746# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008747if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008748 withval=$with_threads;
8749fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008750
8751
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008752# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008753
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008754# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008755if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008756 withval=$with_thread; with_threads=$with_thread
8757fi
8758
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008759
8760if test -z "$with_threads"
8761then with_threads="yes"
8762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8764$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008765
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008766
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008767if test "$with_threads" = "no"
8768then
8769 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008770elif test "$ac_cv_pthread_is_default" = yes
8771then
Matthias Kloseb9621712010-04-24 17:59:49 +00008772 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008773
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008774 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008775 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008776
8777 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008778 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008779elif test "$ac_cv_kpthread" = "yes"
8780then
8781 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008782 if test "$ac_cv_cxx_thread" = "yes"; then
8783 CXX="$CXX -Kpthread"
8784 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008785 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008786
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008787 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008788 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008789elif test "$ac_cv_kthread" = "yes"
8790then
8791 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008792 if test "$ac_cv_cxx_thread" = "yes"; then
8793 CXX="$CXX -Kthread"
8794 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008795 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008796
8797 posix_threads=yes
8798 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008799elif test "$ac_cv_pthread" = "yes"
8800then
8801 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008802 if test "$ac_cv_cxx_thread" = "yes"; then
8803 CXX="$CXX -pthread"
8804 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008805 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008806
8807 posix_threads=yes
8808 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008809else
8810 if test ! -z "$with_threads" -a -d "$with_threads"
8811 then LDFLAGS="$LDFLAGS -L$with_threads"
8812 fi
8813 if test ! -z "$withval" -a -d "$withval"
8814 then LDFLAGS="$LDFLAGS -L$withval"
8815 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008816
8817 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008818 # define _POSIX_THREADS in unistd.h. Some apparently don't
8819 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8821$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008823/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008824
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008825#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008826#ifdef _POSIX_THREADS
8827yes
8828#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008829
8830_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008831if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008832 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008833 unistd_defines_pthreads=yes
8834else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008835 unistd_defines_pthreads=no
8836fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008837rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008838
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8840$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008841
Matthias Kloseb9621712010-04-24 17:59:49 +00008842 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008843
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008844 # Just looking for pthread_create in libpthread is not enough:
8845 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8846 # So we really have to include pthread.h, and then link.
8847 _libs=$LIBS
8848 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8850$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008852/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008853#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008854
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008855void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008856int
8857main ()
8858{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008859
8860pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008861 ;
8862 return 0;
8863}
8864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008865if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008866
Matthias Kloseb9621712010-04-24 17:59:49 +00008867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8868$as_echo "yes" >&6; }
8869 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008870
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008871 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008872 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008873else
Martin v. Löwis11437992002-04-12 09:54:03 +00008874
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008875 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008876 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02008877if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008878 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008879
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008880 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008881 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008882else
Guido van Rossumad678af1998-10-02 14:42:15 +00008883
Matthias Kloseb9621712010-04-24 17:59:49 +00008884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8885$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008886if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008887 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008888else
Martin v. Löwis11437992002-04-12 09:54:03 +00008889 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008890LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008892/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008893
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008894/* Override any GCC internal prototype to avoid an error.
8895 Use char because int might match the return type of a GCC
8896 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008897#ifdef __cplusplus
8898extern "C"
8899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008900char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008901int
8902main ()
8903{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008904return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008905 ;
8906 return 0;
8907}
8908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008909if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008910 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008911else
Matthias Kloseb9621712010-04-24 17:59:49 +00008912 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008914rm -f core conftest.err conftest.$ac_objext \
8915 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008916LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8919$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008920if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008921 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008922
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008923 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008924 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008925 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008926else
Greg Steinadf63d62000-07-05 10:38:09 +00008927
Matthias Kloseb9621712010-04-24 17:59:49 +00008928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8929$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008930if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008931 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008932else
Martin v. Löwis11437992002-04-12 09:54:03 +00008933 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008934LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008938/* Override any GCC internal prototype to avoid an error.
8939 Use char because int might match the return type of a GCC
8940 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008941#ifdef __cplusplus
8942extern "C"
8943#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008944char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008945int
8946main ()
8947{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008948return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008949 ;
8950 return 0;
8951}
8952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008953if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008954 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008955else
Matthias Kloseb9621712010-04-24 17:59:49 +00008956 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008957fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008958rm -f core conftest.err conftest.$ac_objext \
8959 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008960LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8963$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008964if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008965 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008966
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008967 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008968 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008969 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008970else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008971
Matthias Kloseb9621712010-04-24 17:59:49 +00008972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8973$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008974if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008976else
Martin v. Löwis11437992002-04-12 09:54:03 +00008977 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008978LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008980/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008981
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008982/* Override any GCC internal prototype to avoid an error.
8983 Use char because int might match the return type of a GCC
8984 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008985#ifdef __cplusplus
8986extern "C"
8987#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008988char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008989int
8990main ()
8991{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008992return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008993 ;
8994 return 0;
8995}
8996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008997if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008998 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008999else
Matthias Kloseb9621712010-04-24 17:59:49 +00009000 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009002rm -f core conftest.err conftest.$ac_objext \
9003 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009004LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9007$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009008if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009009 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009010
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009011 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009012 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009013 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009014else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009015
Matthias Kloseb9621712010-04-24 17:59:49 +00009016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9017$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009018if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009019 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009020else
Martin v. Löwis11437992002-04-12 09:54:03 +00009021 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009022LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009024/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009025
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009026/* Override any GCC internal prototype to avoid an error.
9027 Use char because int might match the return type of a GCC
9028 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009029#ifdef __cplusplus
9030extern "C"
9031#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009032char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009033int
9034main ()
9035{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009036return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009037 ;
9038 return 0;
9039}
9040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009041if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009042 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009043else
Matthias Kloseb9621712010-04-24 17:59:49 +00009044 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009046rm -f core conftest.err conftest.$ac_objext \
9047 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009048LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009049fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9051$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009052if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009054
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009055 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009056 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009057 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009058else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009059
Martin v. Löwis130fb172001-07-19 11:00:41 +00009060 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009061fi
9062
Guido van Rossum627b2d71993-12-24 10:39:16 +00009063
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009064fi
9065
Guido van Rossum0be3e491997-05-22 20:33:33 +00009066fi
9067
Guido van Rossum49545951997-12-02 19:28:29 +00009068fi
9069
Guido van Rossumb93a8621998-05-07 13:27:32 +00009070fi
9071
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009073rm -f core conftest.err conftest.$ac_objext \
9074 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009075
Matthias Kloseb9621712010-04-24 17:59:49 +00009076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9077$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009078if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009079 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009080else
Martin v. Löwis11437992002-04-12 09:54:03 +00009081 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009082LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009084/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009085
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009086/* Override any GCC internal prototype to avoid an error.
9087 Use char because int might match the return type of a GCC
9088 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009089#ifdef __cplusplus
9090extern "C"
9091#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009092char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009093int
9094main ()
9095{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009096return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009097 ;
9098 return 0;
9099}
9100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009101if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009102 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009103else
Matthias Kloseb9621712010-04-24 17:59:49 +00009104 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009105fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009106rm -f core conftest.err conftest.$ac_objext \
9107 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009108LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009109fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9111$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009112if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009113 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009114
Martin v. Löwis130fb172001-07-19 11:00:41 +00009115 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009116 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009117 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009118fi
9119
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009120
Neal Norwitza978ab02002-11-02 16:58:05 +00009121 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9123$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009124if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009125 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009126else
Martin v. Löwis11437992002-04-12 09:54:03 +00009127 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009128LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009131
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009132/* Override any GCC internal prototype to avoid an error.
9133 Use char because int might match the return type of a GCC
9134 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009135#ifdef __cplusplus
9136extern "C"
9137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009138char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009139int
9140main ()
9141{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009142return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009143 ;
9144 return 0;
9145}
9146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009147if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009148 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009149else
Matthias Kloseb9621712010-04-24 17:59:49 +00009150 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009152rm -f core conftest.err conftest.$ac_objext \
9153 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009154LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009155fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9157$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009158if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009159 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009160
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009161 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009162 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009163 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009164fi
9165
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009166 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009167fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009168
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009169if test "$posix_threads" = "yes"; then
9170 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009171
Matthias Kloseb9621712010-04-24 17:59:49 +00009172$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009173
9174 fi
9175
9176 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9177 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009178 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009179$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009180
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009181 ;;
9182 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009183$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009184
9185 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009186 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009187$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009188
9189 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009190 esac
9191
Matthias Kloseb9621712010-04-24 17:59:49 +00009192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9193$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009194 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009195 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009196else
Matthias Kloseb9621712010-04-24 17:59:49 +00009197 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009198 ac_cv_pthread_system_supported=no
9199else
Matthias Kloseb9621712010-04-24 17:59:49 +00009200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009201/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009202#include <pthread.h>
9203 void *foo(void *parm) {
9204 return NULL;
9205 }
9206 main() {
9207 pthread_attr_t attr;
9208 pthread_t id;
9209 if (pthread_attr_init(&attr)) exit(-1);
9210 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9211 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9212 exit(0);
9213 }
9214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009215if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009216 ac_cv_pthread_system_supported=yes
9217else
Matthias Kloseb9621712010-04-24 17:59:49 +00009218 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009219fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9221 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009222fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009223
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009224
Guido van Rossum627b2d71993-12-24 10:39:16 +00009225fi
9226
Matthias Kloseb9621712010-04-24 17:59:49 +00009227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9228$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009229 if test "$ac_cv_pthread_system_supported" = "yes"; then
9230
Matthias Kloseb9621712010-04-24 17:59:49 +00009231$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009232
9233 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009234 for ac_func in pthread_sigmask
9235do :
9236 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009237if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009238 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009239#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009240_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009241 case $ac_sys_system in
9242 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009243
Matthias Kloseb9621712010-04-24 17:59:49 +00009244$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009245
9246 ;;
9247 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009248fi
9249done
9250
9251fi
9252
9253
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009254# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009255
Matthias Kloseb9621712010-04-24 17:59:49 +00009256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9257$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009258# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009259if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009260 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009261 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9263$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009264 ipv6=no
9265 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009266 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9267$as_echo "yes" >&6; }
9268 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009269
9270 ipv6=yes
9271 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009272 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009273else
Martin v. Löwis11437992002-04-12 09:54:03 +00009274
Matthias Kloseb9621712010-04-24 17:59:49 +00009275 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009276
Matthias Kloseb9621712010-04-24 17:59:49 +00009277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9278$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009279 ipv6=no
9280
9281else
Matthias Kloseb9621712010-04-24 17:59:49 +00009282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009283/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009284 /* AF_INET6 available check */
9285#include <sys/types.h>
9286#include <sys/socket.h>
9287main()
9288{
9289 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9290 exit(1);
9291 else
9292 exit(0);
9293}
9294
Martin v. Löwis11437992002-04-12 09:54:03 +00009295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009296if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009297
Matthias Kloseb9621712010-04-24 17:59:49 +00009298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9299$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009300 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009301
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009302else
Matthias Kloseb159a552010-04-25 21:00:44 +00009303
Matthias Kloseb9621712010-04-24 17:59:49 +00009304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9305$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009306 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009307
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009308fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009309rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9310 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009311fi
9312
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009313
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009314if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9316$as_echo_n "checking if RFC2553 API is available... " >&6; }
9317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009318/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009319
9320 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009321#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009322int
9323main ()
9324{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009325struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009326 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009327 ;
9328 return 0;
9329}
Matthias Kloseb159a552010-04-25 21:00:44 +00009330
Martin v. Löwis11437992002-04-12 09:54:03 +00009331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009332if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009333
9334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009335$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009336 ipv6=yes
9337
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009338else
Matthias Kloseb159a552010-04-25 21:00:44 +00009339
9340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009341$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009342 ipv6=no
9343
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009346fi
9347
9348if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009349 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009350
9351fi
9352
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009353fi
9354
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009355
9356ipv6type=unknown
9357ipv6lib=none
9358ipv6trylibc=no
9359
9360if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9362$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009363 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9364 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009365 case $i in
9366 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009368/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009369
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009370#include <netinet/in.h>
9371#ifdef IPV6_INRIA_VERSION
9372yes
9373#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009374_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009375if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009376 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009377 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009378fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009379rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009380
9381 ;;
9382 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009384/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009385
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009386#include <netinet/in.h>
9387#ifdef __KAME__
9388yes
9389#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009390_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009391if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009392 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009393 ipv6type=$i;
9394 ipv6lib=inet6
9395 ipv6libdir=/usr/local/v6/lib
9396 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009397fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009398rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009399
9400 ;;
9401 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009403/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009404
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009405#include <features.h>
9406#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9407yes
9408#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009409_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009410if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009411 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009412 ipv6type=$i;
9413 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009414fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009415rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009416
9417 ;;
9418 linux-inet6)
9419 if test -d /usr/inet6; then
9420 ipv6type=$i
9421 ipv6lib=inet6
9422 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009423 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009424 fi
9425 ;;
9426 solaris)
9427 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009428 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009429 ipv6type=$i
9430 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009431 fi
9432 fi
9433 ;;
9434 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009436/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009437
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009438#include <sys/param.h>
9439#ifdef _TOSHIBA_INET6
9440yes
9441#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009442_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009443if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009444 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009445 ipv6type=$i;
9446 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009447 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009448fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009449rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009450
9451 ;;
9452 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009454/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009455
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009456#include </usr/local/v6/include/sys/v6config.h>
9457#ifdef __V6D__
9458yes
9459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009460_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009461if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009462 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009463 ipv6type=$i;
9464 ipv6lib=v6;
9465 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009466 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009467fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009468rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009469
9470 ;;
9471 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009473/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009474
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009475#include <sys/param.h>
9476#ifdef _ZETA_MINAMI_INET6
9477yes
9478#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009479_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009480if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009481 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009482 ipv6type=$i;
9483 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009484 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009485fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009486rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009487
9488 ;;
9489 esac
9490 if test "$ipv6type" != "unknown"; then
9491 break
9492 fi
9493 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9495$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009496fi
9497
9498if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9499 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9500 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9501 echo "using lib$ipv6lib"
9502 else
9503 if test $ipv6trylibc = "yes"; then
9504 echo "using libc"
9505 else
9506 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9507 echo "You need to fetch lib$ipv6lib.a from appropriate"
9508 echo 'ipv6 kit and compile beforehand.'
9509 exit 1
9510 fi
9511 fi
9512fi
9513
Matthias Kloseb9621712010-04-24 17:59:49 +00009514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9515$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009517/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009518
9519 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009520int
9521main ()
9522{
9523FSIORefNum fRef = 0
9524 ;
9525 return 0;
9526}
Matthias Kloseb159a552010-04-25 21:00:44 +00009527
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009529if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009530
Matthias Kloseb159a552010-04-25 21:00:44 +00009531
Matthias Kloseb9621712010-04-24 17:59:49 +00009532$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009533
Matthias Kloseb9621712010-04-24 17:59:49 +00009534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9535$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009536
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009537else
Matthias Kloseb159a552010-04-25 21:00:44 +00009538
Matthias Kloseb9621712010-04-24 17:59:49 +00009539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9540$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009541
9542fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9544
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009545# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9547$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009548
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009549# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009550if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009551 withval=$with_doc_strings;
9552fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009553
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009554
9555if test -z "$with_doc_strings"
9556then with_doc_strings="yes"
9557fi
9558if test "$with_doc_strings" != "no"
9559then
9560
Matthias Kloseb9621712010-04-24 17:59:49 +00009561$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009562
9563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9565$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009566
Antoine Pitrou042b1282010-08-13 21:15:58 +00009567# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9569$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009570
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009571# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009572if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009573 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009574if test "$withval" != no
9575then
9576
Matthias Kloseb9621712010-04-24 17:59:49 +00009577$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009578
Matthias Kloseb9621712010-04-24 17:59:49 +00009579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9580$as_echo "yes" >&6; }
9581else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9582$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009583fi
9584else
Matthias Kloseb9621712010-04-24 17:59:49 +00009585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9586$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009587fi
9588
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009589
9590# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9592$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009594# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009595if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009596 withval=$with_pymalloc;
9597fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009598
Neil Schemenauera35c6882001-02-27 04:45:05 +00009599
Neil Schemenauer16c22972002-03-22 15:34:49 +00009600if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009601then
9602 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009603 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009604fi
9605if test "$with_pymalloc" != "no"
9606then
Martin v. Löwis11437992002-04-12 09:54:03 +00009607
Matthias Kloseb9621712010-04-24 17:59:49 +00009608$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009609
9610fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9612$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009613
Benjamin Peterson05159c42009-12-03 03:01:27 +00009614# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9616$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009617
9618# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009619if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009620 withval=$with_valgrind;
9621else
9622 with_valgrind=no
9623fi
9624
Matthias Kloseb9621712010-04-24 17:59:49 +00009625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9626$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009627if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009628 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 +02009629if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009630
Matthias Kloseb9621712010-04-24 17:59:49 +00009631$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009632
9633else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009634 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009635
9636fi
9637
9638
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009639 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009640fi
9641
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009642# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009643
Guido van Rossum98935bf2001-09-05 19:13:16 +00009644DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009645
Guido van Rossume97ee181999-12-20 21:27:22 +00009646# the dlopen() function means we might want to use dynload_shlib.o. some
9647# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009648for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009649do :
9650 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +02009651if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009653#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009654_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009655
Guido van Rossume97ee181999-12-20 21:27:22 +00009656fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009657done
Guido van Rossume97ee181999-12-20 21:27:22 +00009658
Michael W. Hudson54241132001-12-07 15:38:26 +00009659
Guido van Rossume97ee181999-12-20 21:27:22 +00009660# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9661# loading of modules.
9662
Matthias Kloseb9621712010-04-24 17:59:49 +00009663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9664$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009665if test -z "$DYNLOADFILE"
9666then
9667 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009668 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9669 if test "$ac_cv_func_dlopen" = yes
9670 then DYNLOADFILE="dynload_shlib.o"
9671 else DYNLOADFILE="dynload_aix.o"
9672 fi
9673 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009674 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009675 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9676 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009677 *)
9678 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9679 # out any dynamic loading
9680 if test "$ac_cv_func_dlopen" = yes
9681 then DYNLOADFILE="dynload_shlib.o"
9682 else DYNLOADFILE="dynload_stub.o"
9683 fi
9684 ;;
9685 esac
9686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9688$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009689if test "$DYNLOADFILE" != "dynload_stub.o"
9690then
Martin v. Löwis11437992002-04-12 09:54:03 +00009691
Matthias Kloseb9621712010-04-24 17:59:49 +00009692$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009693
9694fi
9695
Neil Schemenauer4e425612001-06-19 15:44:15 +00009696# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9697
Michael W. Hudson54241132001-12-07 15:38:26 +00009698
Matthias Kloseb9621712010-04-24 17:59:49 +00009699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9700$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009701if test -z "$MACHDEP_OBJS"
9702then
Jack Jansene578a632001-08-15 01:27:14 +00009703 MACHDEP_OBJS=$extra_machdep_objs
9704else
9705 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9708$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009709
Guido van Rossum627b2d71993-12-24 10:39:16 +00009710# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009711for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -08009712 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009713 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009714 futimens futimes gai_strerror \
9715 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009716 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009717 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +01009718 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
9719 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009720 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009721 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009722 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009723 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009724 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009725 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009726 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
9727 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009728 sigaction sigaltstack siginterrupt sigpending sigrelse \
9729 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009730 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009731 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9732 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009733do :
9734 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9735ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009736if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009737 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009738#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009739_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009740
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009741fi
9742done
9743
Michael W. Hudson54241132001-12-07 15:38:26 +00009744
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009745ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
9746 #include <dirent.h>
9747"
9748if test "x$ac_cv_have_decl_dirfd" = xyes; then :
9749
9750$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
9751
9752fi
9753
9754
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009755# For some functions, having a definition is not sufficient, since
9756# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9758$as_echo_n "checking for chroot... " >&6; }
9759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009760/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009761#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009762int
9763main ()
9764{
9765void *x=chroot
9766 ;
9767 return 0;
9768}
9769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009770if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009771
Matthias Kloseb9621712010-04-24 17:59:49 +00009772$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009773
Matthias Kloseb159a552010-04-25 21:00:44 +00009774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009775$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009776else
Matthias Kloseb9621712010-04-24 17:59:49 +00009777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9778$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009779
9780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9783$as_echo_n "checking for link... " >&6; }
9784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009785/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009786#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009787int
9788main ()
9789{
9790void *x=link
9791 ;
9792 return 0;
9793}
9794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009795if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009796
Matthias Kloseb9621712010-04-24 17:59:49 +00009797$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009798
Matthias Kloseb159a552010-04-25 21:00:44 +00009799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009800$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009801else
Matthias Kloseb9621712010-04-24 17:59:49 +00009802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9803$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009804
9805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9808$as_echo_n "checking for symlink... " >&6; }
9809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009810/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009811#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009812int
9813main ()
9814{
9815void *x=symlink
9816 ;
9817 return 0;
9818}
9819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009820if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009821
Matthias Kloseb9621712010-04-24 17:59:49 +00009822$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009823
Matthias Kloseb159a552010-04-25 21:00:44 +00009824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009825$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009826else
Matthias Kloseb9621712010-04-24 17:59:49 +00009827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9828$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009829
9830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9833$as_echo_n "checking for fchdir... " >&6; }
9834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009835/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009836#include <unistd.h>
9837int
9838main ()
9839{
9840void *x=fchdir
9841 ;
9842 return 0;
9843}
9844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009845if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009846
Matthias Kloseb9621712010-04-24 17:59:49 +00009847$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009848
Matthias Kloseb159a552010-04-25 21:00:44 +00009849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009850$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009851else
Matthias Kloseb9621712010-04-24 17:59:49 +00009852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9853$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009854
9855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9858$as_echo_n "checking for fsync... " >&6; }
9859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009860/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009861#include <unistd.h>
9862int
9863main ()
9864{
9865void *x=fsync
9866 ;
9867 return 0;
9868}
9869_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009870if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009871
Matthias Kloseb9621712010-04-24 17:59:49 +00009872$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009873
Matthias Kloseb159a552010-04-25 21:00:44 +00009874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009875$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009876else
Matthias Kloseb9621712010-04-24 17:59:49 +00009877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9878$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009879
9880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9883$as_echo_n "checking for fdatasync... " >&6; }
9884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009885/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009886#include <unistd.h>
9887int
9888main ()
9889{
9890void *x=fdatasync
9891 ;
9892 return 0;
9893}
9894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009895if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009896
Matthias Kloseb9621712010-04-24 17:59:49 +00009897$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009898
Matthias Kloseb159a552010-04-25 21:00:44 +00009899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009900$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009901else
Matthias Kloseb9621712010-04-24 17:59:49 +00009902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9903$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009904
9905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9908$as_echo_n "checking for epoll... " >&6; }
9909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009910/* end confdefs.h. */
9911#include <sys/epoll.h>
9912int
9913main ()
9914{
9915void *x=epoll_create
9916 ;
9917 return 0;
9918}
9919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009920if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009921
Matthias Kloseb9621712010-04-24 17:59:49 +00009922$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009923
Matthias Kloseb159a552010-04-25 21:00:44 +00009924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009925$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009926else
Matthias Kloseb9621712010-04-24 17:59:49 +00009927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9928$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009929
9930fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -06009932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
9933$as_echo_n "checking for epoll_create1... " >&6; }
9934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9935/* end confdefs.h. */
9936#include <sys/epoll.h>
9937int
9938main ()
9939{
9940void *x=epoll_create1
9941 ;
9942 return 0;
9943}
9944_ACEOF
9945if ac_fn_c_try_compile "$LINENO"; then :
9946
9947$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
9948
9949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9950$as_echo "yes" >&6; }
9951else
9952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9953$as_echo "no" >&6; }
9954
9955fi
9956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9958$as_echo_n "checking for kqueue... " >&6; }
9959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009960/* end confdefs.h. */
9961
9962#include <sys/types.h>
9963#include <sys/event.h>
9964
9965int
9966main ()
9967{
9968int x=kqueue()
9969 ;
9970 return 0;
9971}
9972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009973if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009974
Matthias Kloseb9621712010-04-24 17:59:49 +00009975$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009976
Matthias Kloseb159a552010-04-25 21:00:44 +00009977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009978$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009979else
Matthias Kloseb9621712010-04-24 17:59:49 +00009980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9981$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009982
9983fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009985# On some systems (eg. FreeBSD 5), we would find a definition of the
9986# functions ctermid_r, setgroups in the library, but no prototype
9987# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9988# address to avoid compiler warnings and potential miscompilations
9989# because of the missing prototypes.
9990
Matthias Kloseb9621712010-04-24 17:59:49 +00009991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9992$as_echo_n "checking for ctermid_r... " >&6; }
9993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009994/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009995
Martin v. Löwisd5843682002-11-21 20:41:28 +00009996#include <stdio.h>
9997
Martin v. Löwisd5843682002-11-21 20:41:28 +00009998int
9999main ()
10000{
10001void* p = ctermid_r
10002 ;
10003 return 0;
10004}
10005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010006if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010007
Matthias Kloseb9621712010-04-24 17:59:49 +000010008$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010009
Matthias Kloseb159a552010-04-25 21:00:44 +000010010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010011$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010012else
Matthias Kloseb9621712010-04-24 17:59:49 +000010013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10014$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010015
10016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10018
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10020$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010021if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010022 $as_echo_n "(cached) " >&6
10023else
10024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010025/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010026#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010027int
10028main ()
10029{
10030void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010031
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010032 ;
10033 return 0;
10034}
10035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010036if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010037 ac_cv_flock_decl=yes
10038else
10039 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010040
10041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010043
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010044fi
10045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10046$as_echo "$ac_cv_flock_decl" >&6; }
10047if test "x${ac_cv_flock_decl}" = xyes; then
10048 for ac_func in flock
10049do :
10050 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010051if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010052 cat >>confdefs.h <<_ACEOF
10053#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010054_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010055
Antoine Pitroua3000072010-09-07 14:52:42 +000010056else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010058$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010059if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010060 $as_echo_n "(cached) " >&6
10061else
10062 ac_check_lib_save_LIBS=$LIBS
10063LIBS="-lbsd $LIBS"
10064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10065/* end confdefs.h. */
10066
10067/* Override any GCC internal prototype to avoid an error.
10068 Use char because int might match the return type of a GCC
10069 builtin and then its argument prototype would still apply. */
10070#ifdef __cplusplus
10071extern "C"
10072#endif
10073char flock ();
10074int
10075main ()
10076{
10077return flock ();
10078 ;
10079 return 0;
10080}
10081_ACEOF
10082if ac_fn_c_try_link "$LINENO"; then :
10083 ac_cv_lib_bsd_flock=yes
10084else
10085 ac_cv_lib_bsd_flock=no
10086fi
10087rm -f core conftest.err conftest.$ac_objext \
10088 conftest$ac_exeext conftest.$ac_ext
10089LIBS=$ac_check_lib_save_LIBS
10090fi
10091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10092$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010093if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010094 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010095
10096
10097$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10098
10099
10100fi
10101
10102
10103fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010104done
10105
Antoine Pitroua3000072010-09-07 14:52:42 +000010106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010107
Matthias Kloseb9621712010-04-24 17:59:49 +000010108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10109$as_echo_n "checking for getpagesize... " >&6; }
10110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010111/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010112
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010113#include <unistd.h>
10114
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010115int
10116main ()
10117{
10118void* p = getpagesize
10119 ;
10120 return 0;
10121}
10122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010123if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010124
Matthias Kloseb9621712010-04-24 17:59:49 +000010125$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010126
Matthias Kloseb159a552010-04-25 21:00:44 +000010127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010128$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010129else
Matthias Kloseb9621712010-04-24 17:59:49 +000010130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10131$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010132
10133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010135
Victor Stinner984890f2011-11-24 13:53:38 +010010136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10137$as_echo_n "checking for broken unsetenv... " >&6; }
10138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10139/* end confdefs.h. */
10140
10141#include <stdlib.h>
10142
10143int
10144main ()
10145{
10146int res = unsetenv("DUMMY")
10147 ;
10148 return 0;
10149}
10150_ACEOF
10151if ac_fn_c_try_compile "$LINENO"; then :
10152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10153$as_echo "no" >&6; }
10154else
10155
10156$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10157
10158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10159$as_echo "yes" >&6; }
10160
10161fi
10162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10163
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010164for ac_prog in true
10165do
10166 # Extract the first word of "$ac_prog", so it can be a program name with args.
10167set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10169$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010170if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010171 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010172else
10173 if test -n "$TRUE"; then
10174 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10175else
10176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10177for as_dir in $PATH
10178do
10179 IFS=$as_save_IFS
10180 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010181 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -070010182 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010183 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010184 $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 +000010185 break 2
10186 fi
10187done
Matthias Kloseb9621712010-04-24 17:59:49 +000010188 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010189IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010190
10191fi
10192fi
10193TRUE=$ac_cv_prog_TRUE
10194if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10196$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010197else
Matthias Kloseb9621712010-04-24 17:59:49 +000010198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10199$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010200fi
10201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010202
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010203 test -n "$TRUE" && break
10204done
10205test -n "$TRUE" || TRUE="/bin/true"
10206
10207
Matthias Kloseb9621712010-04-24 17:59:49 +000010208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10209$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010210if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010211 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010212else
10213 ac_check_lib_save_LIBS=$LIBS
10214LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010216/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010218/* Override any GCC internal prototype to avoid an error.
10219 Use char because int might match the return type of a GCC
10220 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010221#ifdef __cplusplus
10222extern "C"
10223#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010224char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010225int
10226main ()
10227{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010228return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010229 ;
10230 return 0;
10231}
10232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010233if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010234 ac_cv_lib_c_inet_aton=yes
10235else
Matthias Kloseb9621712010-04-24 17:59:49 +000010236 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010238rm -f core conftest.err conftest.$ac_objext \
10239 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010240LIBS=$ac_check_lib_save_LIBS
10241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10243$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010244if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010245 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010246else
Matthias Kloseb9621712010-04-24 17:59:49 +000010247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10248$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010249if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010250 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010251else
10252 ac_check_lib_save_LIBS=$LIBS
10253LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010255/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010256
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010257/* Override any GCC internal prototype to avoid an error.
10258 Use char because int might match the return type of a GCC
10259 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010260#ifdef __cplusplus
10261extern "C"
10262#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010263char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010264int
10265main ()
10266{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010267return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010268 ;
10269 return 0;
10270}
10271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010272if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010273 ac_cv_lib_resolv_inet_aton=yes
10274else
Matthias Kloseb9621712010-04-24 17:59:49 +000010275 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010277rm -f core conftest.err conftest.$ac_objext \
10278 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010279LIBS=$ac_check_lib_save_LIBS
10280fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10282$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010283if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010284 cat >>confdefs.h <<_ACEOF
10285#define HAVE_LIBRESOLV 1
10286_ACEOF
10287
10288 LIBS="-lresolv $LIBS"
10289
10290fi
10291
10292
10293fi
10294
10295
Christian Heimesd0764e22007-12-04 15:00:33 +000010296# On Tru64, chflags seems to be present, but calling it will
10297# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10299$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010300if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010301 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010302else
Matthias Kloseb9621712010-04-24 17:59:49 +000010303 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010304 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010305else
Matthias Kloseb9621712010-04-24 17:59:49 +000010306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010307/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010308
Christian Heimesd0764e22007-12-04 15:00:33 +000010309#include <sys/stat.h>
10310#include <unistd.h>
10311int main(int argc, char*argv[])
10312{
10313 if(chflags(argv[0], 0) != 0)
10314 return 1;
10315 return 0;
10316}
Ned Deily3eb67d52011-06-28 00:00:28 -070010317
Christian Heimesd0764e22007-12-04 15:00:33 +000010318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010319if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010320 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010321else
Matthias Kloseb9621712010-04-24 17:59:49 +000010322 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010323fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010324rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10325 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010326fi
10327
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010328
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010329fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10331$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010332if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010333 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010334if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010335 ac_cv_have_chflags="yes"
10336else
10337 ac_cv_have_chflags="no"
10338fi
10339
10340fi
10341if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010342
Matthias Kloseb9621712010-04-24 17:59:49 +000010343$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010344
10345fi
10346
Matthias Kloseb9621712010-04-24 17:59:49 +000010347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10348$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010349if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010350 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010351else
Matthias Kloseb9621712010-04-24 17:59:49 +000010352 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010353 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010354else
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010356/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010357
Christian Heimesd0764e22007-12-04 15:00:33 +000010358#include <sys/stat.h>
10359#include <unistd.h>
10360int main(int argc, char*argv[])
10361{
10362 if(lchflags(argv[0], 0) != 0)
10363 return 1;
10364 return 0;
10365}
Ned Deily3eb67d52011-06-28 00:00:28 -070010366
Christian Heimesd0764e22007-12-04 15:00:33 +000010367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010368if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010369 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010370else
Matthias Kloseb9621712010-04-24 17:59:49 +000010371 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010372fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10374 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010375fi
10376
10377
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10380$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010381if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010382 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010383if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010384 ac_cv_have_lchflags="yes"
10385else
10386 ac_cv_have_lchflags="no"
10387fi
10388
10389fi
10390if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010391
Matthias Kloseb9621712010-04-24 17:59:49 +000010392$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010393
10394fi
10395
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010396case $ac_sys_system/$ac_sys_release in
10397Darwin/*)
10398 _CUR_CFLAGS="${CFLAGS}"
10399 _CUR_LDFLAGS="${LDFLAGS}"
10400 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10401 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10402 ;;
10403esac
10404
Matthias Kloseb9621712010-04-24 17:59:49 +000010405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10406$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010407if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010408 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010409else
10410 ac_check_lib_save_LIBS=$LIBS
10411LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010413/* end confdefs.h. */
10414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010415/* Override any GCC internal prototype to avoid an error.
10416 Use char because int might match the return type of a GCC
10417 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010418#ifdef __cplusplus
10419extern "C"
10420#endif
10421char inflateCopy ();
10422int
10423main ()
10424{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010425return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010426 ;
10427 return 0;
10428}
10429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010430if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010431 ac_cv_lib_z_inflateCopy=yes
10432else
Matthias Kloseb9621712010-04-24 17:59:49 +000010433 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010434fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010435rm -f core conftest.err conftest.$ac_objext \
10436 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010437LIBS=$ac_check_lib_save_LIBS
10438fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10440$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010441if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010442
Matthias Kloseb9621712010-04-24 17:59:49 +000010443$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010444
10445fi
10446
10447
10448case $ac_sys_system/$ac_sys_release in
10449Darwin/*)
10450 CFLAGS="${_CUR_CFLAGS}"
10451 LDFLAGS="${_CUR_LDFLAGS}"
10452 ;;
10453esac
10454
Matthias Kloseb9621712010-04-24 17:59:49 +000010455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10456$as_echo_n "checking for hstrerror... " >&6; }
10457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010458/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010459
Martin v. Löwise9416172003-05-03 10:12:45 +000010460#include <netdb.h>
10461
Martin v. Löwise9416172003-05-03 10:12:45 +000010462int
10463main ()
10464{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010465void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010466 ;
10467 return 0;
10468}
10469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010470if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010471
Matthias Kloseb9621712010-04-24 17:59:49 +000010472$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010473
Matthias Kloseb159a552010-04-25 21:00:44 +000010474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010475$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010476else
Matthias Kloseb9621712010-04-24 17:59:49 +000010477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10478$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010479
10480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010481rm -f core conftest.err conftest.$ac_objext \
10482 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010483
Matthias Kloseb9621712010-04-24 17:59:49 +000010484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10485$as_echo_n "checking for inet_aton... " >&6; }
10486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010487/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010488
Martin v. Löwis86d66262006-02-17 08:40:11 +000010489#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010490#include <sys/socket.h>
10491#include <netinet/in.h>
10492#include <arpa/inet.h>
10493
Martin v. Löwise9416172003-05-03 10:12:45 +000010494int
10495main ()
10496{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010497void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010498 ;
10499 return 0;
10500}
10501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010502if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010503
Matthias Kloseb9621712010-04-24 17:59:49 +000010504$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010505
Matthias Kloseb159a552010-04-25 21:00:44 +000010506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010507$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010508else
Matthias Kloseb9621712010-04-24 17:59:49 +000010509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10510$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010511
10512fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010513rm -f core conftest.err conftest.$ac_objext \
10514 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010515
Matthias Kloseb9621712010-04-24 17:59:49 +000010516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10517$as_echo_n "checking for inet_pton... " >&6; }
10518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010519/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010520
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010521#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010522#include <sys/socket.h>
10523#include <netinet/in.h>
10524#include <arpa/inet.h>
10525
Martin v. Löwise9416172003-05-03 10:12:45 +000010526int
10527main ()
10528{
10529void* p = inet_pton
10530 ;
10531 return 0;
10532}
10533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010534if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010535
Matthias Kloseb9621712010-04-24 17:59:49 +000010536$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010537
Matthias Kloseb159a552010-04-25 21:00:44 +000010538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010539$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010540else
Matthias Kloseb9621712010-04-24 17:59:49 +000010541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10542$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010543
10544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010546
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010547# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10549$as_echo_n "checking for setgroups... " >&6; }
10550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010551/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010552
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010553#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010554#ifdef HAVE_GRP_H
10555#include <grp.h>
10556#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010557
Martin v. Löwisd5843682002-11-21 20:41:28 +000010558int
10559main ()
10560{
10561void* p = setgroups
10562 ;
10563 return 0;
10564}
10565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010566if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010567
Matthias Kloseb9621712010-04-24 17:59:49 +000010568$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010569
Matthias Kloseb159a552010-04-25 21:00:44 +000010570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010571$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010572else
Matthias Kloseb9621712010-04-24 17:59:49 +000010573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10574$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010575
10576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010578
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010579# check for openpty and forkpty
10580
10581for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010582do :
10583 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010584if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010585 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010586#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010587_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010588
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010589else
Matthias Kloseb9621712010-04-24 17:59:49 +000010590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10591$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010592if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010593 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010594else
Martin v. Löwis11437992002-04-12 09:54:03 +000010595 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010596LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010599
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010600/* Override any GCC internal prototype to avoid an error.
10601 Use char because int might match the return type of a GCC
10602 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010603#ifdef __cplusplus
10604extern "C"
10605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010606char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010607int
10608main ()
10609{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010610return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010611 ;
10612 return 0;
10613}
10614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010615if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010616 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010617else
Matthias Kloseb9621712010-04-24 17:59:49 +000010618 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010619fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010620rm -f core conftest.err conftest.$ac_objext \
10621 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010622LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010623fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10625$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010626if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010627 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010628 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010629else
Matthias Kloseb9621712010-04-24 17:59:49 +000010630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10631$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010632if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010633 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010634else
10635 ac_check_lib_save_LIBS=$LIBS
10636LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010638/* end confdefs.h. */
10639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010640/* Override any GCC internal prototype to avoid an error.
10641 Use char because int might match the return type of a GCC
10642 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010643#ifdef __cplusplus
10644extern "C"
10645#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010646char openpty ();
10647int
10648main ()
10649{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010650return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010651 ;
10652 return 0;
10653}
10654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010655if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010656 ac_cv_lib_bsd_openpty=yes
10657else
Matthias Kloseb9621712010-04-24 17:59:49 +000010658 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010660rm -f core conftest.err conftest.$ac_objext \
10661 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010662LIBS=$ac_check_lib_save_LIBS
10663fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10665$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010666if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010667 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010668 LIBS="$LIBS -lbsd"
10669fi
10670
10671
10672fi
10673
Fred Drake8cef4cf2000-06-28 16:40:38 +000010674
10675fi
10676done
10677
10678for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010679do :
10680 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010681if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010682 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010683#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010684_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010685
Fred Drake8cef4cf2000-06-28 16:40:38 +000010686else
Matthias Kloseb9621712010-04-24 17:59:49 +000010687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10688$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010689if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010690 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010691else
Martin v. Löwis11437992002-04-12 09:54:03 +000010692 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010693LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010695/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010696
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010697/* Override any GCC internal prototype to avoid an error.
10698 Use char because int might match the return type of a GCC
10699 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010700#ifdef __cplusplus
10701extern "C"
10702#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010703char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010704int
10705main ()
10706{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010708 ;
10709 return 0;
10710}
10711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010712if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010713 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010714else
Matthias Kloseb9621712010-04-24 17:59:49 +000010715 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010716fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010717rm -f core conftest.err conftest.$ac_objext \
10718 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010719LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010720fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10722$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010723if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010724 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010725 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010726else
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10728$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010729if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010730 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010731else
10732 ac_check_lib_save_LIBS=$LIBS
10733LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010735/* end confdefs.h. */
10736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010737/* Override any GCC internal prototype to avoid an error.
10738 Use char because int might match the return type of a GCC
10739 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010740#ifdef __cplusplus
10741extern "C"
10742#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010743char forkpty ();
10744int
10745main ()
10746{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010747return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010748 ;
10749 return 0;
10750}
10751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010752if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010753 ac_cv_lib_bsd_forkpty=yes
10754else
Matthias Kloseb9621712010-04-24 17:59:49 +000010755 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010757rm -f core conftest.err conftest.$ac_objext \
10758 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010759LIBS=$ac_check_lib_save_LIBS
10760fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10762$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010763if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010764 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010765 LIBS="$LIBS -lbsd"
10766fi
10767
10768
10769fi
10770
Fred Drake8cef4cf2000-06-28 16:40:38 +000010771
10772fi
10773done
10774
Jack Jansendd19cf82001-12-06 22:36:17 +000010775
Christian Heimesb186d002008-03-18 15:15:01 +000010776# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010777for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010778do :
10779 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020010780if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010781 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010782#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010783_ACEOF
10784
10785fi
10786done
10787
10788
Michael W. Hudson54241132001-12-07 15:38:26 +000010789# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010790for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010791do :
10792 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10793ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010794if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010795 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010796#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010797_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010798
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010799fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010800done
10801
Michael W. Hudson54241132001-12-07 15:38:26 +000010802
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010803ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020010804if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010805 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010806
Martin v. Löwis1142de32002-03-29 16:28:31 +000010807else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010808 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010809 *" dup2.$ac_objext "* ) ;;
10810 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010811 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010812esac
10813
Martin v. Löwis1142de32002-03-29 16:28:31 +000010814fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010815
10816ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020010817if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010818 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10819
10820else
10821 case " $LIBOBJS " in
10822 *" getcwd.$ac_objext "* ) ;;
10823 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10824 ;;
10825esac
10826
10827fi
10828
10829ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020010830if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010831 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10832
10833else
10834 case " $LIBOBJS " in
10835 *" strdup.$ac_objext "* ) ;;
10836 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10837 ;;
10838esac
10839
10840fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010841
10842
10843for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010844do :
10845 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020010846if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010847 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010848#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010851/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010852#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010853int
10854main ()
10855{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010856getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010857 ;
10858 return 0;
10859}
10860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010861if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010862
Matthias Kloseb9621712010-04-24 17:59:49 +000010863$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010864
Guido van Rossum627b2d71993-12-24 10:39:16 +000010865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010867
Guido van Rossum627b2d71993-12-24 10:39:16 +000010868fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010869done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010870
Jack Jansen150753c2003-03-29 22:07:47 +000010871for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010872do :
10873 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020010874if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010875 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010876#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010879/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010880#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010881int
10882main ()
10883{
10884setpgrp(0,0);
10885 ;
10886 return 0;
10887}
10888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010889if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010890
Matthias Kloseb9621712010-04-24 17:59:49 +000010891$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010892
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010893fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010895
10896fi
10897done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010898
Thomas Wouters3a584202000-08-05 23:28:51 +000010899for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010900do :
10901 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020010902if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010903 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010904#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010907/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010908#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010909int
10910main ()
10911{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010912gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010913 ;
10914 return 0;
10915}
10916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010917if ac_fn_c_try_compile "$LINENO"; then :
10918
Guido van Rossum627b2d71993-12-24 10:39:16 +000010919else
Skip Montanaro6dead952003-09-25 14:50:04 +000010920
Matthias Kloseb9621712010-04-24 17:59:49 +000010921$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010922
Martin v. Löwis11437992002-04-12 09:54:03 +000010923
Guido van Rossum627b2d71993-12-24 10:39:16 +000010924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010926
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010927fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010928done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010929
Michael W. Hudson54241132001-12-07 15:38:26 +000010930
Victor Stinnere0be4232011-10-25 13:06:09 +020010931for ac_func in clock_gettime
10932do :
10933 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
10934if test "x$ac_cv_func_clock_gettime" = xyes; then :
10935 cat >>confdefs.h <<_ACEOF
10936#define HAVE_CLOCK_GETTIME 1
10937_ACEOF
10938
10939else
10940
10941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
10942$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
10943if ${ac_cv_lib_rt_clock_gettime+:} false; then :
10944 $as_echo_n "(cached) " >&6
10945else
10946 ac_check_lib_save_LIBS=$LIBS
10947LIBS="-lrt $LIBS"
10948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10949/* end confdefs.h. */
10950
10951/* Override any GCC internal prototype to avoid an error.
10952 Use char because int might match the return type of a GCC
10953 builtin and then its argument prototype would still apply. */
10954#ifdef __cplusplus
10955extern "C"
10956#endif
10957char clock_gettime ();
10958int
10959main ()
10960{
10961return clock_gettime ();
10962 ;
10963 return 0;
10964}
10965_ACEOF
10966if ac_fn_c_try_link "$LINENO"; then :
10967 ac_cv_lib_rt_clock_gettime=yes
10968else
10969 ac_cv_lib_rt_clock_gettime=no
10970fi
10971rm -f core conftest.err conftest.$ac_objext \
10972 conftest$ac_exeext conftest.$ac_ext
10973LIBS=$ac_check_lib_save_LIBS
10974fi
10975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
10976$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
10977if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
10978
10979 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
10980
10981
10982$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
10983
10984
10985fi
10986
10987
10988fi
10989done
10990
10991
10992for ac_func in clock_getres
10993do :
10994 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
10995if test "x$ac_cv_func_clock_getres" = xyes; then :
10996 cat >>confdefs.h <<_ACEOF
10997#define HAVE_CLOCK_GETRES 1
10998_ACEOF
10999
11000else
11001
11002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11003$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11004if ${ac_cv_lib_rt_clock_getres+:} false; then :
11005 $as_echo_n "(cached) " >&6
11006else
11007 ac_check_lib_save_LIBS=$LIBS
11008LIBS="-lrt $LIBS"
11009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11010/* end confdefs.h. */
11011
11012/* Override any GCC internal prototype to avoid an error.
11013 Use char because int might match the return type of a GCC
11014 builtin and then its argument prototype would still apply. */
11015#ifdef __cplusplus
11016extern "C"
11017#endif
11018char clock_getres ();
11019int
11020main ()
11021{
11022return clock_getres ();
11023 ;
11024 return 0;
11025}
11026_ACEOF
11027if ac_fn_c_try_link "$LINENO"; then :
11028 ac_cv_lib_rt_clock_getres=yes
11029else
11030 ac_cv_lib_rt_clock_getres=no
11031fi
11032rm -f core conftest.err conftest.$ac_objext \
11033 conftest$ac_exeext conftest.$ac_ext
11034LIBS=$ac_check_lib_save_LIBS
11035fi
11036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11037$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11038if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11039
11040 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11041
11042
11043fi
11044
11045
11046fi
11047done
11048
11049
Matthias Kloseb9621712010-04-24 17:59:49 +000011050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11051$as_echo_n "checking for major... " >&6; }
11052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011053/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011054
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011055#if defined(MAJOR_IN_MKDEV)
11056#include <sys/mkdev.h>
11057#elif defined(MAJOR_IN_SYSMACROS)
11058#include <sys/sysmacros.h>
11059#else
11060#include <sys/types.h>
11061#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011062
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011063int
11064main ()
11065{
11066
11067 makedev(major(0),minor(0));
11068
11069 ;
11070 return 0;
11071}
11072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011073if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011074
11075
Matthias Kloseb9621712010-04-24 17:59:49 +000011076$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011077
Matthias Kloseb9621712010-04-24 17:59:49 +000011078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11079$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011080
11081else
Skip Montanaro6dead952003-09-25 14:50:04 +000011082
Matthias Kloseb9621712010-04-24 17:59:49 +000011083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11084$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011085
11086fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011087rm -f core conftest.err conftest.$ac_objext \
11088 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011089
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011090# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011091# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11093$as_echo_n "checking for getaddrinfo... " >&6; }
11094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011095/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011096
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011097#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011098#include <sys/socket.h>
11099#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011100#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011101
Martin v. Löwis11437992002-04-12 09:54:03 +000011102int
11103main ()
11104{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011105getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011106 ;
11107 return 0;
11108}
11109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011110if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011111 have_getaddrinfo=yes
11112else
Matthias Kloseb9621712010-04-24 17:59:49 +000011113 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011114fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011115rm -f core conftest.err conftest.$ac_objext \
11116 conftest$ac_exeext conftest.$ac_ext
11117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11118$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011119if test $have_getaddrinfo = yes
11120then
Matthias Kloseb9621712010-04-24 17:59:49 +000011121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11122$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011123 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011124 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011125else
Matthias Kloseb9621712010-04-24 17:59:49 +000011126 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011127
11128if test "${enable_ipv6+set}" = set; then
11129 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11130else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011131 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011132fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011133else
Matthias Kloseb9621712010-04-24 17:59:49 +000011134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011135/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011136
11137#include <sys/types.h>
11138#include <netdb.h>
11139#include <string.h>
11140#include <sys/socket.h>
11141#include <netinet/in.h>
11142
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011143int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011144{
11145 int passive, gaierr, inet4 = 0, inet6 = 0;
11146 struct addrinfo hints, *ai, *aitop;
11147 char straddr[INET6_ADDRSTRLEN], strport[16];
11148
11149 for (passive = 0; passive <= 1; passive++) {
11150 memset(&hints, 0, sizeof(hints));
11151 hints.ai_family = AF_UNSPEC;
11152 hints.ai_flags = passive ? AI_PASSIVE : 0;
11153 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011154 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011155 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11156 (void)gai_strerror(gaierr);
11157 goto bad;
11158 }
11159 for (ai = aitop; ai; ai = ai->ai_next) {
11160 if (ai->ai_addr == NULL ||
11161 ai->ai_addrlen == 0 ||
11162 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11163 straddr, sizeof(straddr), strport, sizeof(strport),
11164 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11165 goto bad;
11166 }
11167 switch (ai->ai_family) {
11168 case AF_INET:
11169 if (strcmp(strport, "54321") != 0) {
11170 goto bad;
11171 }
11172 if (passive) {
11173 if (strcmp(straddr, "0.0.0.0") != 0) {
11174 goto bad;
11175 }
11176 } else {
11177 if (strcmp(straddr, "127.0.0.1") != 0) {
11178 goto bad;
11179 }
11180 }
11181 inet4++;
11182 break;
11183 case AF_INET6:
11184 if (strcmp(strport, "54321") != 0) {
11185 goto bad;
11186 }
11187 if (passive) {
11188 if (strcmp(straddr, "::") != 0) {
11189 goto bad;
11190 }
11191 } else {
11192 if (strcmp(straddr, "::1") != 0) {
11193 goto bad;
11194 }
11195 }
11196 inet6++;
11197 break;
11198 case AF_UNSPEC:
11199 goto bad;
11200 break;
11201 default:
11202 /* another family support? */
11203 break;
11204 }
11205 }
11206 }
11207
11208 if (!(inet4 == 0 || inet4 == 2))
11209 goto bad;
11210 if (!(inet6 == 0 || inet6 == 2))
11211 goto bad;
11212
11213 if (aitop)
11214 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011215 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011216
11217 bad:
11218 if (aitop)
11219 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011220 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011221}
11222
Martin v. Löwis11437992002-04-12 09:54:03 +000011223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011224if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011225 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011226else
Matthias Kloseb9621712010-04-24 17:59:49 +000011227 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011229rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11230 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011232
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011233fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011234
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011236
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11238$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11239
Mark Dickinson2df5d282009-12-31 21:22:50 +000011240if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011241then
11242 if test $ipv6 = yes
11243 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011244 echo 'Fatal: You must get working getaddrinfo() function.'
11245 echo ' or you can specify "--disable-ipv6"'.
11246 exit 1
11247 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011248else
Martin v. Löwis11437992002-04-12 09:54:03 +000011249
Matthias Kloseb9621712010-04-24 17:59:49 +000011250$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011251
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011252fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011253
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011254for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011255do :
11256 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011257if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011258 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011259#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011260_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011261
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011262fi
11263done
11264
Michael W. Hudson54241132001-12-07 15:38:26 +000011265
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011266# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11268$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011269if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011270 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011271else
Matthias Kloseb9621712010-04-24 17:59:49 +000011272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011273/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011274#include <sys/types.h>
11275#include <sys/time.h>
11276#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011277
Martin v. Löwis11437992002-04-12 09:54:03 +000011278int
11279main ()
11280{
11281if ((struct tm *) 0)
11282return 0;
11283 ;
11284 return 0;
11285}
11286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011287if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011288 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011289else
Matthias Kloseb9621712010-04-24 17:59:49 +000011290 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011293fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11295$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011296if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011297
Matthias Kloseb9621712010-04-24 17:59:49 +000011298$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011299
11300fi
11301
Matthias Kloseb9621712010-04-24 17:59:49 +000011302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11303$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011304if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011305 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011306else
Matthias Kloseb9621712010-04-24 17:59:49 +000011307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011308/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011309#include <sys/types.h>
11310#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011311
Martin v. Löwis11437992002-04-12 09:54:03 +000011312int
11313main ()
11314{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011315struct tm tm;
11316 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011317 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011318 ;
11319 return 0;
11320}
11321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011322if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011323 ac_cv_struct_tm=time.h
11324else
Matthias Kloseb9621712010-04-24 17:59:49 +000011325 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11330$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011331if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011332
Matthias Kloseb9621712010-04-24 17:59:49 +000011333$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011334
11335fi
11336
Matthias Kloseb9621712010-04-24 17:59:49 +000011337ac_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 +000011338#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011339
Matthias Kloseb9621712010-04-24 17:59:49 +000011340"
Victor Stinnere0be4232011-10-25 13:06:09 +020011341if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011342
11343cat >>confdefs.h <<_ACEOF
11344#define HAVE_STRUCT_TM_TM_ZONE 1
11345_ACEOF
11346
11347
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011348fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011349
Martin v. Löwis11437992002-04-12 09:54:03 +000011350if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11351
Matthias Kloseb9621712010-04-24 17:59:49 +000011352$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011353
11354else
Matthias Kloseb9621712010-04-24 17:59:49 +000011355 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11356"
Victor Stinnere0be4232011-10-25 13:06:09 +020011357if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011358 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011359else
Matthias Kloseb9621712010-04-24 17:59:49 +000011360 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011361fi
11362
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011363cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011364#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011365_ACEOF
11366
Matthias Kloseb9621712010-04-24 17:59:49 +000011367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11368$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011369if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011370 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011371else
Matthias Kloseb9621712010-04-24 17:59:49 +000011372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011373/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011374#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011375#if !HAVE_DECL_TZNAME
11376extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011377#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011378
Martin v. Löwis11437992002-04-12 09:54:03 +000011379int
11380main ()
11381{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011382return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011383 ;
11384 return 0;
11385}
11386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011387if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011388 ac_cv_var_tzname=yes
11389else
Matthias Kloseb9621712010-04-24 17:59:49 +000011390 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011392rm -f core conftest.err conftest.$ac_objext \
11393 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011394fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11396$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011397 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011398
Matthias Kloseb9621712010-04-24 17:59:49 +000011399$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011400
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011401 fi
11402fi
11403
Matthias Kloseb9621712010-04-24 17:59:49 +000011404ac_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 +020011405if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011406
11407cat >>confdefs.h <<_ACEOF
11408#define HAVE_STRUCT_STAT_ST_RDEV 1
11409_ACEOF
11410
11411
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011412fi
11413
Matthias Kloseb9621712010-04-24 17:59:49 +000011414ac_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 +020011415if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011416
Martin v. Löwis11437992002-04-12 09:54:03 +000011417cat >>confdefs.h <<_ACEOF
11418#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11419_ACEOF
11420
11421
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011422fi
11423
Matthias Kloseb9621712010-04-24 17:59:49 +000011424ac_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 +020011425if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011426
11427cat >>confdefs.h <<_ACEOF
11428#define HAVE_STRUCT_STAT_ST_FLAGS 1
11429_ACEOF
11430
11431
11432fi
11433
Matthias Kloseb9621712010-04-24 17:59:49 +000011434ac_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 +020011435if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011436
11437cat >>confdefs.h <<_ACEOF
11438#define HAVE_STRUCT_STAT_ST_GEN 1
11439_ACEOF
11440
11441
11442fi
11443
Matthias Kloseb9621712010-04-24 17:59:49 +000011444ac_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 +020011445if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011446
11447cat >>confdefs.h <<_ACEOF
11448#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11449_ACEOF
11450
11451
11452fi
11453
Matthias Kloseb9621712010-04-24 17:59:49 +000011454ac_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 +020011455if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011456
Martin v. Löwis11437992002-04-12 09:54:03 +000011457cat >>confdefs.h <<_ACEOF
11458#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11459_ACEOF
11460
11461
Matthias Kloseb9621712010-04-24 17:59:49 +000011462$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011463
11464else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011465 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011466 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011467 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11468 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011469esac
11470
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011471fi
11472
Michael W. Hudson54241132001-12-07 15:38:26 +000011473
Martin v. Löwis11437992002-04-12 09:54:03 +000011474
Matthias Kloseb9621712010-04-24 17:59:49 +000011475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11476$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011477if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011478 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011479else
Matthias Kloseb159a552010-04-25 21:00:44 +000011480
Matthias Kloseb9621712010-04-24 17:59:49 +000011481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011482/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011483#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011484int
11485main ()
11486{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011487return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011488 ;
11489 return 0;
11490}
11491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011492if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011493 ac_cv_header_time_altzone=yes
11494else
Matthias Kloseb9621712010-04-24 17:59:49 +000011495 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011498
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011499fi
11500
Matthias Kloseb9621712010-04-24 17:59:49 +000011501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11502$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011503if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011504
Matthias Kloseb9621712010-04-24 17:59:49 +000011505$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011506
11507fi
11508
Guido van Rossumda88dad1995-01-26 00:46:29 +000011509was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11511$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011513/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011514
11515#include <sys/types.h>
11516#include <sys/select.h>
11517#include <sys/time.h>
11518
Martin v. Löwis11437992002-04-12 09:54:03 +000011519int
11520main ()
11521{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011522;
Martin v. Löwis11437992002-04-12 09:54:03 +000011523 ;
11524 return 0;
11525}
11526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011527if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011528
11529
Matthias Kloseb9621712010-04-24 17:59:49 +000011530$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011531
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011532 was_it_defined=yes
11533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11537$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011538
Matthias Kloseb9621712010-04-24 17:59:49 +000011539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11540$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011541if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011542 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011543else
Matthias Kloseb9621712010-04-24 17:59:49 +000011544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011545/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011546#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011547int
11548main ()
11549{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011550struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011551 ;
11552 return 0;
11553}
11554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011555if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011556 ac_cv_struct_addrinfo=yes
11557else
Matthias Kloseb9621712010-04-24 17:59:49 +000011558 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11561fi
11562
Matthias Kloseb9621712010-04-24 17:59:49 +000011563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11564$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011565if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011566
Matthias Kloseb9621712010-04-24 17:59:49 +000011567$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011568
11569fi
11570
Matthias Kloseb9621712010-04-24 17:59:49 +000011571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11572$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011573if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011574 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011575else
Matthias Kloseb9621712010-04-24 17:59:49 +000011576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011577/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011578
11579# include <sys/types.h>
11580# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011581int
11582main ()
11583{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011584struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011585 ;
11586 return 0;
11587}
11588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011589if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011590 ac_cv_struct_sockaddr_storage=yes
11591else
Matthias Kloseb9621712010-04-24 17:59:49 +000011592 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11595fi
11596
Matthias Kloseb9621712010-04-24 17:59:49 +000011597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11598$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011599if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011600
Matthias Kloseb9621712010-04-24 17:59:49 +000011601$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011602
11603fi
11604
Guido van Rossum627b2d71993-12-24 10:39:16 +000011605# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011606
Matthias Kloseb9621712010-04-24 17:59:49 +000011607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11608$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011609if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011610 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011611else
Matthias Kloseb9621712010-04-24 17:59:49 +000011612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011613/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011614$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011615int
11616main ()
11617{
11618static int test_array [1 - 2 * !(((char) -1) < 0)];
Ned Deilycbfb9a52012-06-23 16:02:19 -070011619test_array [0] = 0;
11620return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011621
11622 ;
11623 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011624}
Martin v. Löwis11437992002-04-12 09:54:03 +000011625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011626if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011627 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011628else
Matthias Kloseb9621712010-04-24 17:59:49 +000011629 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011632fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11634$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011635if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011636 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011637
11638fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011639
Matthias Kloseb9621712010-04-24 17:59:49 +000011640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11641$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011642if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011643 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011644else
Matthias Kloseb9621712010-04-24 17:59:49 +000011645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011646/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011647
Martin v. Löwis11437992002-04-12 09:54:03 +000011648int
11649main ()
11650{
Ned Deilycbfb9a52012-06-23 16:02:19 -070011651
Martin v. Löwis11437992002-04-12 09:54:03 +000011652#ifndef __cplusplus
Ned Deilycbfb9a52012-06-23 16:02:19 -070011653 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011654 typedef int charset[2];
Ned Deilycbfb9a52012-06-23 16:02:19 -070011655 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000011656 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011657 char const *const *pcpcc;
11658 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011659 /* NEC SVR4.0.2 mips cc rejects this. */
11660 struct point {int x, y;};
11661 static struct point const zero = {0,0};
11662 /* AIX XL C 1.02.0.0 rejects this.
11663 It does not let you subtract one const X* pointer from another in
11664 an arm of an if-expression whose if-part is not a constant
11665 expression */
11666 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011667 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011668 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011669 ++pcpcc;
11670 ppc = (char**) pcpcc;
11671 pcpcc = (char const *const *) ppc;
Ned Deilycbfb9a52012-06-23 16:02:19 -070011672 { /* SCO 3.2v4 cc rejects this sort of thing. */
11673 char tx;
11674 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000011675 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011676
Martin v. Löwis11437992002-04-12 09:54:03 +000011677 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011678 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011679 }
11680 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11681 int x[] = {25, 17};
11682 const int *foo = &x[0];
11683 ++foo;
11684 }
11685 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11686 typedef const int *iptr;
11687 iptr p = 0;
11688 ++p;
11689 }
Ned Deilycbfb9a52012-06-23 16:02:19 -070011690 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000011691 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ned Deilycbfb9a52012-06-23 16:02:19 -070011692 struct s { int j; const int *ap[3]; } bx;
11693 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000011694 }
11695 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11696 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011697 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011698 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011699 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011700#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011701
Martin v. Löwis11437992002-04-12 09:54:03 +000011702 ;
11703 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011704}
Martin v. Löwis11437992002-04-12 09:54:03 +000011705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011706if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011707 ac_cv_c_const=yes
11708else
Matthias Kloseb9621712010-04-24 17:59:49 +000011709 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011712fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11714$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011715if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011716
Matthias Kloseb9621712010-04-24 17:59:49 +000011717$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011718
11719fi
11720
Michael W. Hudson54241132001-12-07 15:38:26 +000011721
Guido van Rossumda88dad1995-01-26 00:46:29 +000011722works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11724$as_echo_n "checking for working volatile... " >&6; }
11725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011726/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011727
Martin v. Löwis11437992002-04-12 09:54:03 +000011728int
11729main ()
11730{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011731volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011732 ;
11733 return 0;
11734}
11735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011736if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011737 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011738else
Skip Montanaro6dead952003-09-25 14:50:04 +000011739
Matthias Kloseb9621712010-04-24 17:59:49 +000011740$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011741
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011742
Guido van Rossum627b2d71993-12-24 10:39:16 +000011743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11746$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011747
Guido van Rossumda88dad1995-01-26 00:46:29 +000011748works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11750$as_echo_n "checking for working signed char... " >&6; }
11751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011752/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011753
Martin v. Löwis11437992002-04-12 09:54:03 +000011754int
11755main ()
11756{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011757signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011758 ;
11759 return 0;
11760}
11761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011762if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011763 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011764else
Skip Montanaro6dead952003-09-25 14:50:04 +000011765
Matthias Kloseb9621712010-04-24 17:59:49 +000011766$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011767
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011768
Guido van Rossum7f43da71994-08-01 12:15:30 +000011769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11772$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011773
Guido van Rossumda88dad1995-01-26 00:46:29 +000011774have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11776$as_echo_n "checking for prototypes... " >&6; }
11777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011778/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011779int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011780int
11781main ()
11782{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011783return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011784 ;
11785 return 0;
11786}
11787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011788if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011789
Matthias Kloseb9621712010-04-24 17:59:49 +000011790$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011791
Matthias Kloseb159a552010-04-25 21:00:44 +000011792 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11796$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011797
Guido van Rossumda88dad1995-01-26 00:46:29 +000011798works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11800$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011802/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011803
11804#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011805int foo(int x, ...) {
11806 va_list va;
11807 va_start(va, x);
11808 va_arg(va, int);
11809 va_arg(va, char *);
11810 va_arg(va, double);
11811 return 0;
11812}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011813
Martin v. Löwis11437992002-04-12 09:54:03 +000011814int
11815main ()
11816{
Guido van Rossum90eea071996-08-30 20:58:57 +000011817return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011818 ;
11819 return 0;
11820}
11821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011822if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011823
11824
Matthias Kloseb9621712010-04-24 17:59:49 +000011825$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011826
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011827 works=yes
11828
Guido van Rossum627b2d71993-12-24 10:39:16 +000011829fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11832$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011833
Martin v. Löwisd6320502004-08-12 13:45:08 +000011834# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11836$as_echo_n "checking for socketpair... " >&6; }
11837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011838/* end confdefs.h. */
11839
11840#include <sys/types.h>
11841#include <sys/socket.h>
11842
11843int
11844main ()
11845{
11846void *x=socketpair
11847 ;
11848 return 0;
11849}
11850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011851if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011852
Matthias Kloseb9621712010-04-24 17:59:49 +000011853$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011854
Matthias Kloseb159a552010-04-25 21:00:44 +000011855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011856$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011857else
Matthias Kloseb9621712010-04-24 17:59:49 +000011858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11859$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011860
11861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011863
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011864# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11866$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011868/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011869#include <sys/types.h>
11870#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011871int
11872main ()
11873{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011874struct sockaddr x;
11875x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011876 ;
11877 return 0;
11878}
11879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011880if ac_fn_c_try_compile "$LINENO"; then :
11881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11882$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011883
Matthias Kloseb9621712010-04-24 17:59:49 +000011884$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011885
11886else
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11888$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011889
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011892
Guido van Rossumda88dad1995-01-26 00:46:29 +000011893va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11895$as_echo_n "checking whether va_list is an array... " >&6; }
11896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011897/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011898
11899#ifdef HAVE_STDARG_PROTOTYPES
11900#include <stdarg.h>
11901#else
11902#include <varargs.h>
11903#endif
11904
Martin v. Löwis11437992002-04-12 09:54:03 +000011905int
11906main ()
11907{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011908va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011909 ;
11910 return 0;
11911}
11912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011913if ac_fn_c_try_compile "$LINENO"; then :
11914
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011915else
Skip Montanaro6dead952003-09-25 14:50:04 +000011916
Martin v. Löwis11437992002-04-12 09:54:03 +000011917
Matthias Kloseb9621712010-04-24 17:59:49 +000011918$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011919
Guido van Rossumda88dad1995-01-26 00:46:29 +000011920 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011921
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11925$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011926
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011927# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011928
11929
Matthias Kloseb9621712010-04-24 17:59:49 +000011930ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020011931if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011932
Matthias Kloseb9621712010-04-24 17:59:49 +000011933 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011934
Matthias Kloseb9621712010-04-24 17:59:49 +000011935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11936$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011937 OLD_CFLAGS=$CFLAGS
11938 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011940/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011941
11942# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011943
Martin v. Löwis11437992002-04-12 09:54:03 +000011944int
11945main ()
11946{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011947
11948 char *name;
11949 struct hostent *he, *res;
11950 char buffer[2048];
11951 int buflen = 2048;
11952 int h_errnop;
11953
11954 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011955
11956 ;
11957 return 0;
11958}
11959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011960if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011961
Matthias Kloseb9621712010-04-24 17:59:49 +000011962 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011963
Martin v. Löwis11437992002-04-12 09:54:03 +000011964
Matthias Kloseb9621712010-04-24 17:59:49 +000011965$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011966
Matthias Kloseb9621712010-04-24 17:59:49 +000011967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11968$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011969
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011970else
Skip Montanaro6dead952003-09-25 14:50:04 +000011971
Matthias Kloseb9621712010-04-24 17:59:49 +000011972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11973$as_echo "no" >&6; }
11974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11975$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011977/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011978
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011979# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011980
Martin v. Löwis11437992002-04-12 09:54:03 +000011981int
11982main ()
11983{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011984
11985 char *name;
11986 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011987 char buffer[2048];
11988 int buflen = 2048;
11989 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011990
Matthias Kloseb159a552010-04-25 21:00:44 +000011991 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011992
11993 ;
11994 return 0;
11995}
11996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011997if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011998
Matthias Kloseb9621712010-04-24 17:59:49 +000011999 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012000
Martin v. Löwis11437992002-04-12 09:54:03 +000012001
Matthias Kloseb159a552010-04-25 21:00:44 +000012002$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012003
Matthias Kloseb9621712010-04-24 17:59:49 +000012004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12005$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012006
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012007else
Skip Montanaro6dead952003-09-25 14:50:04 +000012008
Matthias Kloseb9621712010-04-24 17:59:49 +000012009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12010$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12012$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12014/* end confdefs.h. */
12015
12016# include <netdb.h>
12017
12018int
12019main ()
12020{
12021
12022 char *name;
12023 struct hostent *he;
12024 struct hostent_data data;
12025
12026 (void) gethostbyname_r(name, he, &data);
12027
12028 ;
12029 return 0;
12030}
12031_ACEOF
12032if ac_fn_c_try_compile "$LINENO"; then :
12033
12034 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12035
12036
12037$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12038
12039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12040$as_echo "yes" >&6; }
12041
12042else
12043
12044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12045$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012046
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012049
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012052
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012055 CFLAGS=$OLD_CFLAGS
12056
12057else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012058
Matthias Kloseb9621712010-04-24 17:59:49 +000012059 for ac_func in gethostbyname
12060do :
12061 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012062if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012063 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012064#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012065_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012066
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012067fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012068done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012069
Michael W. Hudson54241132001-12-07 15:38:26 +000012070
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012071fi
12072
Michael W. Hudson54241132001-12-07 15:38:26 +000012073
12074
12075
12076
12077
12078
Guido van Rossum627b2d71993-12-24 10:39:16 +000012079# checks for system services
12080# (none yet)
12081
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012082# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012083ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012084if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012085
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012086else
Matthias Kloseb9621712010-04-24 17:59:49 +000012087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12088$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012089if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012090 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012091else
Martin v. Löwis11437992002-04-12 09:54:03 +000012092 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012093LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012095/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012097/* Override any GCC internal prototype to avoid an error.
12098 Use char because int might match the return type of a GCC
12099 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012100#ifdef __cplusplus
12101extern "C"
12102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012103char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012104int
12105main ()
12106{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012107return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012108 ;
12109 return 0;
12110}
12111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012112if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012113 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012114else
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012117rm -f core conftest.err conftest.$ac_objext \
12118 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012119LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12122$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012123if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012124 cat >>confdefs.h <<_ACEOF
12125#define HAVE_LIBIEEE 1
12126_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012127
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012128 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012129
Guido van Rossum627b2d71993-12-24 10:39:16 +000012130fi
12131
Michael W. Hudson54241132001-12-07 15:38:26 +000012132
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012133fi
12134
Michael W. Hudson54241132001-12-07 15:38:26 +000012135
Guido van Rossum7f253911997-05-09 02:42:48 +000012136# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12138$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012140# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012141if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012142 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012143if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012144then
12145
Matthias Kloseb9621712010-04-24 17:59:49 +000012146$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012147
Matthias Kloseb9621712010-04-24 17:59:49 +000012148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12149$as_echo "yes" >&6; }
12150else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12151$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012152fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012153else
Matthias Kloseb9621712010-04-24 17:59:49 +000012154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12155$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012156fi
12157
Guido van Rossum7f253911997-05-09 02:42:48 +000012158
Guido van Rossum7f43da71994-08-01 12:15:30 +000012159# check for --with-libm=...
12160
Guido van Rossum563e7081996-09-10 18:20:48 +000012161case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012162Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012163*) LIBM=-lm
12164esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12166$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012167
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012168# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012169if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012170 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012171if test "$withval" = no
12172then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12174$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012175elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012176then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12178$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012179else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012180fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012181else
Matthias Kloseb9621712010-04-24 17:59:49 +000012182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12183$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012184fi
12185
Guido van Rossum7f43da71994-08-01 12:15:30 +000012186
12187# check for --with-libc=...
12188
Matthias Kloseb9621712010-04-24 17:59:49 +000012189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12190$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012192# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012193if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012194 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012195if test "$withval" = no
12196then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12198$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012199elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012200then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12202$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012203else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012204fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012205else
Matthias Kloseb9621712010-04-24 17:59:49 +000012206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12207$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012208fi
12209
Guido van Rossum7f43da71994-08-01 12:15:30 +000012210
Stefan Krah1919b7e2012-03-21 18:25:23 +010012211# **************************************
12212# * Check for gcc x64 inline assembler *
12213# **************************************
12214
12215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12216$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12218/* end confdefs.h. */
12219
12220int
12221main ()
12222{
12223
12224 __asm__ __volatile__ ("movq %rcx, %rax");
12225
12226 ;
12227 return 0;
12228}
12229_ACEOF
12230if ac_fn_c_try_compile "$LINENO"; then :
12231 have_gcc_asm_for_x64=yes
12232else
12233 have_gcc_asm_for_x64=no
12234fi
12235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12237$as_echo "$have_gcc_asm_for_x64" >&6; }
12238if test "$have_gcc_asm_for_x64" = yes
12239then
12240
12241$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12242
12243fi
12244
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012245# **************************************************
12246# * Check for various properties of floating point *
12247# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012248
Matthias Kloseb9621712010-04-24 17:59:49 +000012249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12250$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012251if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012252 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012253else
12254
Matthias Kloseb9621712010-04-24 17:59:49 +000012255if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012256 ac_cv_little_endian_double=no
12257else
Matthias Kloseb9621712010-04-24 17:59:49 +000012258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012259/* end confdefs.h. */
12260
12261#include <string.h>
12262int main() {
12263 double x = 9006104071832581.0;
12264 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12265 return 0;
12266 else
12267 return 1;
12268}
12269
12270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012271if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012272 ac_cv_little_endian_double=yes
12273else
Matthias Kloseb9621712010-04-24 17:59:49 +000012274 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012275fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012276rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12277 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012278fi
12279
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012280fi
12281
Matthias Kloseb9621712010-04-24 17:59:49 +000012282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12283$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012284if test "$ac_cv_little_endian_double" = yes
12285then
12286
Matthias Kloseb9621712010-04-24 17:59:49 +000012287$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012288
12289fi
12290
Matthias Kloseb9621712010-04-24 17:59:49 +000012291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12292$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012293if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012294 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012295else
12296
Matthias Kloseb9621712010-04-24 17:59:49 +000012297if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012298 ac_cv_big_endian_double=no
12299else
Matthias Kloseb9621712010-04-24 17:59:49 +000012300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012301/* end confdefs.h. */
12302
12303#include <string.h>
12304int main() {
12305 double x = 9006104071832581.0;
12306 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12307 return 0;
12308 else
12309 return 1;
12310}
12311
12312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012313if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012314 ac_cv_big_endian_double=yes
12315else
Matthias Kloseb9621712010-04-24 17:59:49 +000012316 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012317fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012318rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12319 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012320fi
12321
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012322fi
12323
Matthias Kloseb9621712010-04-24 17:59:49 +000012324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12325$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012326if test "$ac_cv_big_endian_double" = yes
12327then
12328
Matthias Kloseb9621712010-04-24 17:59:49 +000012329$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012330
12331fi
12332
12333# Some ARM platforms use a mixed-endian representation for doubles.
12334# While Python doesn't currently have full support for these platforms
12335# (see e.g., issue 1762561), we can at least make sure that float <-> string
12336# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12338$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012339if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012340 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012341else
12342
Matthias Kloseb9621712010-04-24 17:59:49 +000012343if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012344 ac_cv_mixed_endian_double=no
12345else
Matthias Kloseb9621712010-04-24 17:59:49 +000012346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012347/* end confdefs.h. */
12348
12349#include <string.h>
12350int main() {
12351 double x = 9006104071832581.0;
12352 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12353 return 0;
12354 else
12355 return 1;
12356}
12357
12358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012359if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012360 ac_cv_mixed_endian_double=yes
12361else
Matthias Kloseb9621712010-04-24 17:59:49 +000012362 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012363fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012364rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12365 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012366fi
12367
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012368fi
12369
Matthias Kloseb9621712010-04-24 17:59:49 +000012370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12371$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012372if test "$ac_cv_mixed_endian_double" = yes
12373then
12374
Matthias Kloseb9621712010-04-24 17:59:49 +000012375$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012376
12377fi
12378
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012379# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012380# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012381# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012382# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012383# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012384# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012385
12386# This inline assembler syntax may also work for suncc and icc,
12387# so we try it on all platforms.
12388
Matthias Kloseb9621712010-04-24 17:59:49 +000012389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12390$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012392/* end confdefs.h. */
12393
12394int
12395main ()
12396{
12397
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012398 unsigned short cw;
12399 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12400 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012401
12402 ;
12403 return 0;
12404}
12405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012406if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012407 have_gcc_asm_for_x87=yes
12408else
Matthias Kloseb9621712010-04-24 17:59:49 +000012409 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012410fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12413$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012414if test "$have_gcc_asm_for_x87" = yes
12415then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012416
Matthias Kloseb9621712010-04-24 17:59:49 +000012417$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012418
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012419fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012420
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012421# Detect whether system arithmetic is subject to x87-style double
12422# rounding issues. The result of this test has little meaning on non
12423# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12424# mode is round-to-nearest and double rounding issues are present, and
12425# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12427$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012428# $BASECFLAGS may affect the result
12429ac_save_cc="$CC"
12430CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012431if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012432 ac_cv_x87_double_rounding=no
12433else
Matthias Kloseb9621712010-04-24 17:59:49 +000012434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012435/* end confdefs.h. */
12436
12437#include <stdlib.h>
12438#include <math.h>
12439int main() {
12440 volatile double x, y, z;
12441 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12442 x = 0.99999999999999989; /* 1-2**-53 */
12443 y = 1./x;
12444 if (y != 1.)
12445 exit(0);
12446 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12447 x = 1e16;
12448 y = 2.99999;
12449 z = x + y;
12450 if (z != 1e16+4.)
12451 exit(0);
12452 /* both tests show evidence of double rounding */
12453 exit(1);
12454}
12455
12456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012457if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012458 ac_cv_x87_double_rounding=no
12459else
Matthias Kloseb9621712010-04-24 17:59:49 +000012460 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012461fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012462rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12463 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012464fi
12465
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012466CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12468$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012469if test "$ac_cv_x87_double_rounding" = yes
12470then
12471
Matthias Kloseb9621712010-04-24 17:59:49 +000012472$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012473
12474fi
12475
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012476# ************************************
12477# * Check for mathematical functions *
12478# ************************************
12479
12480LIBS_SAVE=$LIBS
12481LIBS="$LIBS $LIBM"
12482
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012483for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12484do :
12485 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12486ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012487if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012488 cat >>confdefs.h <<_ACEOF
12489#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12490_ACEOF
12491
12492fi
12493done
12494
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012495for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012496do :
12497 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12498ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012499if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012500 cat >>confdefs.h <<_ACEOF
12501#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12502_ACEOF
12503
12504fi
12505done
12506
12507ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12508"
Victor Stinnere0be4232011-10-25 13:06:09 +020012509if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012510 ac_have_decl=1
12511else
12512 ac_have_decl=0
12513fi
12514
12515cat >>confdefs.h <<_ACEOF
12516#define HAVE_DECL_ISINF $ac_have_decl
12517_ACEOF
12518ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12519"
Victor Stinnere0be4232011-10-25 13:06:09 +020012520if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012521 ac_have_decl=1
12522else
12523 ac_have_decl=0
12524fi
12525
12526cat >>confdefs.h <<_ACEOF
12527#define HAVE_DECL_ISNAN $ac_have_decl
12528_ACEOF
12529ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12530"
Victor Stinnere0be4232011-10-25 13:06:09 +020012531if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012532 ac_have_decl=1
12533else
12534 ac_have_decl=0
12535fi
12536
12537cat >>confdefs.h <<_ACEOF
12538#define HAVE_DECL_ISFINITE $ac_have_decl
12539_ACEOF
12540
12541
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012542# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12543# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12545$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012546if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012547 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012548else
12549
Matthias Kloseb9621712010-04-24 17:59:49 +000012550if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012551 ac_cv_tanh_preserves_zero_sign=no
12552else
Matthias Kloseb9621712010-04-24 17:59:49 +000012553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012554/* end confdefs.h. */
12555
12556#include <math.h>
12557#include <stdlib.h>
12558int main() {
12559 /* return 0 if either negative zeros don't exist
12560 on this platform or if negative zeros exist
12561 and tanh(-0.) == -0. */
12562 if (atan2(0., -1.) == atan2(-0., -1.) ||
12563 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12564 else exit(1);
12565}
12566
12567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012568if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012569 ac_cv_tanh_preserves_zero_sign=yes
12570else
Matthias Kloseb9621712010-04-24 17:59:49 +000012571 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012572fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012573rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12574 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012575fi
12576
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012577fi
12578
Matthias Kloseb9621712010-04-24 17:59:49 +000012579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12580$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012581if test "$ac_cv_tanh_preserves_zero_sign" = yes
12582then
12583
Matthias Kloseb9621712010-04-24 17:59:49 +000012584$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012585
12586fi
12587
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012588if test "$ac_cv_func_log1p" = yes
12589then
12590 # On some versions of AIX, log1p(-0.) returns 0. instead of
12591 # -0. See issue #9920.
12592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12593$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012594 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012595 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012596else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012597
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012598 if test "$cross_compiling" = yes; then :
12599 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012600else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12602/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012603
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012604 #include <math.h>
12605 #include <stdlib.h>
12606 int main() {
12607 /* Fail if the signs of log1p(-0.) and -0. can be
12608 distinguished. */
12609 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12610 return 0;
12611 else
12612 return 1;
12613 }
12614
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012615_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012616if ac_fn_c_try_run "$LINENO"; then :
12617 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012618else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012619 ac_cv_log1p_drops_zero_sign=yes
12620fi
12621rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12622 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012623fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012624
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012625fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012626
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12628$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12629fi
12630if test "$ac_cv_log1p_drops_zero_sign" = yes
12631then
12632
12633$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12634
12635fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012636
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012637LIBS=$LIBS_SAVE
12638
Mark Dickinsona614f042009-11-28 12:48:43 +000012639# For multiprocessing module, check that sem_open
12640# actually works. For FreeBSD versions <= 7.2,
12641# the kernel module that provides POSIX semaphores
12642# isn't loaded by default, so an attempt to call
12643# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12645$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012646if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012647 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012648else
Matthias Kloseb9621712010-04-24 17:59:49 +000012649 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012650 ac_cv_posix_semaphores_enabled=yes
12651else
Matthias Kloseb9621712010-04-24 17:59:49 +000012652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012653/* end confdefs.h. */
12654
12655#include <unistd.h>
12656#include <fcntl.h>
12657#include <stdio.h>
12658#include <semaphore.h>
12659#include <sys/stat.h>
12660
12661int main(void) {
12662 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12663 if (a == SEM_FAILED) {
12664 perror("sem_open");
12665 return 1;
12666 }
12667 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012668 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012669 return 0;
12670}
12671
12672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012673if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012674 ac_cv_posix_semaphores_enabled=yes
12675else
Matthias Kloseb9621712010-04-24 17:59:49 +000012676 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012677fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012678rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12679 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012680fi
12681
12682
Mark Dickinsona614f042009-11-28 12:48:43 +000012683fi
12684
Matthias Kloseb9621712010-04-24 17:59:49 +000012685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12686$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012687if test $ac_cv_posix_semaphores_enabled = no
12688then
12689
Matthias Kloseb9621712010-04-24 17:59:49 +000012690$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012691
12692fi
12693
Mark Dickinson10683072009-04-18 21:18:19 +000012694# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12696$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012697if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012698 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012699else
Matthias Kloseb9621712010-04-24 17:59:49 +000012700 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012701 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012702else
Matthias Kloseb9621712010-04-24 17:59:49 +000012703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012704/* end confdefs.h. */
12705
12706#include <unistd.h>
12707#include <fcntl.h>
12708#include <stdio.h>
12709#include <semaphore.h>
12710#include <sys/stat.h>
12711
12712int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012713 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012714 int count;
12715 int res;
12716 if(a==SEM_FAILED){
12717 perror("sem_open");
12718 return 1;
12719
12720 }
12721 res = sem_getvalue(a, &count);
12722 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012723 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012724 return res==-1 ? 1 : 0;
12725}
12726
Mark Dickinson10683072009-04-18 21:18:19 +000012727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012728if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012729 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012730else
Matthias Kloseb9621712010-04-24 17:59:49 +000012731 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12734 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012735fi
12736
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012737
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012738fi
12739
Matthias Kloseb9621712010-04-24 17:59:49 +000012740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12741$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012742if test $ac_cv_broken_sem_getvalue = yes
12743then
12744
Matthias Kloseb9621712010-04-24 17:59:49 +000012745$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012746
12747fi
12748
Mark Dickinsonbd792642009-03-18 20:06:12 +000012749# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12751$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012752# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012753if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012754 enableval=$enable_big_digits; case $enable_big_digits in
12755yes)
12756 enable_big_digits=30 ;;
12757no)
12758 enable_big_digits=15 ;;
1275915|30)
12760 ;;
12761*)
Victor Stinnere0be4232011-10-25 13:06:09 +020012762 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 +000012763esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12765$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012766
12767cat >>confdefs.h <<_ACEOF
12768#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12769_ACEOF
12770
12771
12772else
Matthias Kloseb9621712010-04-24 17:59:49 +000012773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12774$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012775fi
12776
12777
Guido van Rossumef2255b2000-03-10 22:30:29 +000012778# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012779ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012780if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012781
12782
Matthias Kloseb9621712010-04-24 17:59:49 +000012783$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012784
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012785 wchar_h="yes"
12786
Guido van Rossumef2255b2000-03-10 22:30:29 +000012787else
Martin v. Löwis11437992002-04-12 09:54:03 +000012788 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012789
12790fi
12791
Michael W. Hudson54241132001-12-07 15:38:26 +000012792
Martin v. Löwis11437992002-04-12 09:54:03 +000012793
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012794# determine wchar_t size
12795if test "$wchar_h" = yes
12796then
Matthias Kloseb9621712010-04-24 17:59:49 +000012797 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012798# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12799# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12800# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12802$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012803if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012804 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012805else
Matthias Kloseb9621712010-04-24 17:59:49 +000012806 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12807"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012808
Martin v. Löwis11437992002-04-12 09:54:03 +000012809else
Matthias Kloseb9621712010-04-24 17:59:49 +000012810 if test "$ac_cv_type_wchar_t" = yes; then
12811 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12812$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012813as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020012814See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012815 else
12816 ac_cv_sizeof_wchar_t=0
12817 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012818fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012819
Martin v. Löwis11437992002-04-12 09:54:03 +000012820fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12822$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012823
12824
12825
Martin v. Löwis11437992002-04-12 09:54:03 +000012826cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012827#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012828_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012829
Michael W. Hudson54241132001-12-07 15:38:26 +000012830
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012831fi
12832
Matthias Kloseb9621712010-04-24 17:59:49 +000012833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12834$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012835have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012837/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012838
12839#include <tcl.h>
12840#if TCL_UTF_MAX != 6
12841# error "NOT UCS4_TCL"
12842#endif
12843int
12844main ()
12845{
12846
12847 ;
12848 return 0;
12849}
12850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012851if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012852
12853
Matthias Kloseb9621712010-04-24 17:59:49 +000012854$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012855
12856 have_ucs4_tcl=yes
12857
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12861$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012862
Skip Montanaro6dead952003-09-25 14:50:04 +000012863# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012864if test "$wchar_h" = yes
12865then
12866 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12868$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012869 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012870 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012871else
12872
Matthias Kloseb9621712010-04-24 17:59:49 +000012873 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012874 ac_cv_wchar_t_signed=yes
12875else
Matthias Kloseb9621712010-04-24 17:59:49 +000012876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012877/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012878
12879 #include <wchar.h>
12880 int main()
12881 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012882 /* Success: exit code 0 */
12883 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012884 }
12885
12886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012887if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012888 ac_cv_wchar_t_signed=yes
12889else
Matthias Kloseb9621712010-04-24 17:59:49 +000012890 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012891fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12893 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012894fi
12895
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012896fi
12897
Matthias Kloseb9621712010-04-24 17:59:49 +000012898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12899$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012900fi
12901
Georg Brandl52d168a2008-01-07 18:10:24 +000012902# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012903if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012904 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012905then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012906 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012907
Matthias Kloseb9621712010-04-24 17:59:49 +000012908$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012909
Georg Brandl52d168a2008-01-07 18:10:24 +000012910else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012911 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012912fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
12914$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012915
12916# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12918$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012919if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012920 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012921else
Matthias Kloseb9621712010-04-24 17:59:49 +000012922 ac_cv_c_bigendian=unknown
12923 # See if we're dealing with a universal compiler.
12924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12925/* end confdefs.h. */
12926#ifndef __APPLE_CC__
12927 not a universal capable compiler
12928 #endif
12929 typedef int dummy;
12930
Skip Montanaro6dead952003-09-25 14:50:04 +000012931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012932if ac_fn_c_try_compile "$LINENO"; then :
12933
12934 # Check for potential -arch flags. It is not universal unless
12935 # there are at least two -arch flags with different values.
12936 ac_arch=
12937 ac_prev=
12938 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12939 if test -n "$ac_prev"; then
12940 case $ac_word in
12941 i?86 | x86_64 | ppc | ppc64)
12942 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12943 ac_arch=$ac_word
12944 else
12945 ac_cv_c_bigendian=universal
12946 break
12947 fi
12948 ;;
12949 esac
12950 ac_prev=
12951 elif test "x$ac_word" = "x-arch"; then
12952 ac_prev=arch
12953 fi
12954 done
12955fi
12956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12957 if test $ac_cv_c_bigendian = unknown; then
12958 # See if sys/param.h defines the BYTE_ORDER macro.
12959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012960/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012961#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012962 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012963
Martin v. Löwis11437992002-04-12 09:54:03 +000012964int
12965main ()
12966{
Matthias Kloseb9621712010-04-24 17:59:49 +000012967#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12968 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12969 && LITTLE_ENDIAN)
12970 bogus endian macros
12971 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012972
12973 ;
12974 return 0;
12975}
12976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012977if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012978 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012980/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012981#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012982 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012983
Martin v. Löwis11437992002-04-12 09:54:03 +000012984int
12985main ()
12986{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012987#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012988 not big endian
12989 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012990
12991 ;
12992 return 0;
12993}
12994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012995if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012996 ac_cv_c_bigendian=yes
12997else
Matthias Kloseb9621712010-04-24 17:59:49 +000012998 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013001fi
13002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13003 fi
13004 if test $ac_cv_c_bigendian = unknown; then
13005 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013007/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013008#include <limits.h>
13009
Martin v. Löwis11437992002-04-12 09:54:03 +000013010int
13011main ()
13012{
Matthias Kloseb9621712010-04-24 17:59:49 +000013013#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13014 bogus endian macros
13015 #endif
13016
Martin v. Löwis11437992002-04-12 09:54:03 +000013017 ;
13018 return 0;
13019}
13020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013021if ac_fn_c_try_compile "$LINENO"; then :
13022 # It does; now see whether it defined to _BIG_ENDIAN or not.
13023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13024/* end confdefs.h. */
13025#include <limits.h>
13026
13027int
13028main ()
13029{
13030#ifndef _BIG_ENDIAN
13031 not big endian
13032 #endif
13033
13034 ;
13035 return 0;
13036}
13037_ACEOF
13038if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013039 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013040else
Matthias Kloseb9621712010-04-24 17:59:49 +000013041 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013042fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13044fi
13045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13046 fi
13047 if test $ac_cv_c_bigendian = unknown; then
13048 # Compile a test program.
13049 if test "$cross_compiling" = yes; then :
13050 # Try to guess by grepping values from an object file.
13051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13052/* end confdefs.h. */
13053short int ascii_mm[] =
13054 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13055 short int ascii_ii[] =
13056 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13057 int use_ascii (int i) {
13058 return ascii_mm[i] + ascii_ii[i];
13059 }
13060 short int ebcdic_ii[] =
13061 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13062 short int ebcdic_mm[] =
13063 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13064 int use_ebcdic (int i) {
13065 return ebcdic_mm[i] + ebcdic_ii[i];
13066 }
13067 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013068
Matthias Kloseb9621712010-04-24 17:59:49 +000013069int
13070main ()
13071{
13072return use_ascii (foo) == use_ebcdic (foo);
13073 ;
13074 return 0;
13075}
13076_ACEOF
13077if ac_fn_c_try_compile "$LINENO"; then :
13078 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13079 ac_cv_c_bigendian=yes
13080 fi
13081 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13082 if test "$ac_cv_c_bigendian" = unknown; then
13083 ac_cv_c_bigendian=no
13084 else
13085 # finding both strings is unlikely to happen, but who knows?
13086 ac_cv_c_bigendian=unknown
13087 fi
13088 fi
13089fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013091else
Matthias Kloseb9621712010-04-24 17:59:49 +000013092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013093/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013094$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013095int
13096main ()
13097{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013098
Matthias Kloseb9621712010-04-24 17:59:49 +000013099 /* Are we little or big endian? From Harbison&Steele. */
13100 union
13101 {
13102 long int l;
13103 char c[sizeof (long int)];
13104 } u;
13105 u.l = 1;
13106 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013107
13108 ;
13109 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013110}
Martin v. Löwis11437992002-04-12 09:54:03 +000013111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013112if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013113 ac_cv_c_bigendian=no
13114else
Matthias Kloseb9621712010-04-24 17:59:49 +000013115 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013117rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13118 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013119fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013120
Matthias Kloseb9621712010-04-24 17:59:49 +000013121 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013122fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13124$as_echo "$ac_cv_c_bigendian" >&6; }
13125 case $ac_cv_c_bigendian in #(
13126 yes)
13127 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13128;; #(
13129 no)
13130 ;; #(
13131 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013132
Matthias Kloseb9621712010-04-24 17:59:49 +000013133$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013134
Matthias Kloseb9621712010-04-24 17:59:49 +000013135 ;; #(
13136 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013137 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013138 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013139 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013140
Michael W. Hudson54241132001-12-07 15:38:26 +000013141
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013142# ABI version string for Python extension modules. This appears between the
13143# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13144# from the following attributes which affect the ABI of this Python build (in
13145# this order):
13146#
13147# * The Python implementation (always 'cpython-' for us)
13148# * The major and minor version numbers
13149# * --with-pydebug (adds a 'd')
13150# * --with-pymalloc (adds a 'm')
13151# * --with-wide-unicode (adds a 'u')
13152#
13153# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013154# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13155# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013156
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13158$as_echo_n "checking ABIFLAGS... " >&6; }
13159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13160$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13162$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013163SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13165$as_echo "$SOABI" >&6; }
13166
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13168$as_echo_n "checking LDVERSION... " >&6; }
13169LDVERSION='$(VERSION)$(ABIFLAGS)'
13170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13171$as_echo "$LDVERSION" >&6; }
13172
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013173# SO is the extension of shared libraries `(including the dot!)
13174# -- usually .so, .sl on HP-UX, .dll on Cygwin
13175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13176$as_echo_n "checking SO... " >&6; }
13177if test -z "$SO"
13178then
13179 case $ac_sys_system in
13180 hp*|HP*)
13181 case `uname -m` in
13182 ia64) SO=.so;;
13183 *) SO=.sl;;
13184 esac
13185 ;;
13186 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013187 Linux*|GNU*)
13188 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013189 *) SO=.so;;
13190 esac
13191else
13192 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013193 echo
13194 echo '====================================================================='
13195 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013196 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013197 echo '+ Do you really mean to change the extension for shared libraries? +'
13198 echo '+ Continuing in 10 seconds to let you to ponder. +'
13199 echo '+ +'
13200 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013201 sleep 10
13202fi
13203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13204$as_echo "$SO" >&6; }
13205
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013206# Check whether right shifting a negative integer extends the sign bit
13207# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13209$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013210if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013211 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013212else
Martin v. Löwis11437992002-04-12 09:54:03 +000013213
Matthias Kloseb9621712010-04-24 17:59:49 +000013214if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013215 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013216else
Matthias Kloseb9621712010-04-24 17:59:49 +000013217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013218/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013219
13220int main()
13221{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013222 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013223}
13224
Martin v. Löwis11437992002-04-12 09:54:03 +000013225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013226if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013227 ac_cv_rshift_extends_sign=yes
13228else
Matthias Kloseb9621712010-04-24 17:59:49 +000013229 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13232 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013233fi
13234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013235fi
13236
Matthias Kloseb9621712010-04-24 17:59:49 +000013237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13238$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013239if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013240then
Martin v. Löwis11437992002-04-12 09:54:03 +000013241
Matthias Kloseb9621712010-04-24 17:59:49 +000013242$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013243
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013244fi
13245
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013246# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13248$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013249if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013250 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013251else
Martin v. Löwis11437992002-04-12 09:54:03 +000013252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013254/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013255#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013256int
13257main ()
13258{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013259
13260 FILE *f = fopen("/dev/null", "r");
13261 flockfile(f);
13262 getc_unlocked(f);
13263 funlockfile(f);
13264
Martin v. Löwis11437992002-04-12 09:54:03 +000013265 ;
13266 return 0;
13267}
13268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013269if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013270 ac_cv_have_getc_unlocked=yes
13271else
Matthias Kloseb9621712010-04-24 17:59:49 +000013272 ac_cv_have_getc_unlocked=no
13273fi
13274rm -f core conftest.err conftest.$ac_objext \
13275 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013277
Matthias Kloseb9621712010-04-24 17:59:49 +000013278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13279$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013280if test "$ac_cv_have_getc_unlocked" = yes
13281then
Martin v. Löwis11437992002-04-12 09:54:03 +000013282
Matthias Kloseb9621712010-04-24 17:59:49 +000013283$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013284
13285fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013286
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013287# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013288# save the value of LIBS so we don't actually link Python with readline
13289LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013290
Gregory P. Smith18820942008-09-07 06:24:49 +000013291# On some systems we need to link readline to a termcap compatible
13292# library. NOTE: Keep the precedence of listed libraries synchronised
13293# with setup.py.
13294py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13296$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013297for py_libtermcap in "" ncursesw ncurses curses termcap; do
13298 if test -z "$py_libtermcap"; then
13299 READLINE_LIBS="-lreadline"
13300 else
13301 READLINE_LIBS="-lreadline -l$py_libtermcap"
13302 fi
13303 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013305/* end confdefs.h. */
13306
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013307/* Override any GCC internal prototype to avoid an error.
13308 Use char because int might match the return type of a GCC
13309 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013310#ifdef __cplusplus
13311extern "C"
13312#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013313char readline ();
13314int
13315main ()
13316{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013317return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013318 ;
13319 return 0;
13320}
13321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013322if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013323 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013324fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013325rm -f core conftest.err conftest.$ac_objext \
13326 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013327 if test $py_cv_lib_readline = yes; then
13328 break
13329 fi
13330done
13331# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13332#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013333if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13335$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013336else
Matthias Kloseb9621712010-04-24 17:59:49 +000013337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13338$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013339
Matthias Kloseb9621712010-04-24 17:59:49 +000013340$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013341
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013342fi
13343
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013344# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13346$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013347if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013348 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013349else
13350 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013351LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013353/* end confdefs.h. */
13354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013355/* Override any GCC internal prototype to avoid an error.
13356 Use char because int might match the return type of a GCC
13357 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013358#ifdef __cplusplus
13359extern "C"
13360#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013361char rl_callback_handler_install ();
13362int
13363main ()
13364{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013365return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013366 ;
13367 return 0;
13368}
13369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013370if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013371 ac_cv_lib_readline_rl_callback_handler_install=yes
13372else
Matthias Kloseb9621712010-04-24 17:59:49 +000013373 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013374fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013375rm -f core conftest.err conftest.$ac_objext \
13376 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013377LIBS=$ac_check_lib_save_LIBS
13378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13380$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013381if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013382
Matthias Kloseb9621712010-04-24 17:59:49 +000013383$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013384
13385fi
13386
13387
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013388# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013390/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013391#include <readline/readline.h>
13392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013393if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013394 have_readline=yes
13395else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013396 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013397
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013398fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013399rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013400if test $have_readline = yes
13401then
Matthias Kloseb9621712010-04-24 17:59:49 +000013402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013403/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013404#include <readline/readline.h>
13405
13406_ACEOF
13407if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013408 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013409
Matthias Kloseb9621712010-04-24 17:59:49 +000013410$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013411
13412fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013413rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013414
Matthias Kloseb9621712010-04-24 17:59:49 +000013415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013416/* end confdefs.h. */
13417#include <readline/readline.h>
13418
13419_ACEOF
13420if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013421 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013422
Matthias Kloseb9621712010-04-24 17:59:49 +000013423$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013424
13425fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013426rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013427
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013428fi
13429
Martin v. Löwis0daad592001-09-30 21:09:59 +000013430# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13432$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013433if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013434 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013435else
Martin v. Löwis11437992002-04-12 09:54:03 +000013436 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013437LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013439/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013440
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013441/* Override any GCC internal prototype to avoid an error.
13442 Use char because int might match the return type of a GCC
13443 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013444#ifdef __cplusplus
13445extern "C"
13446#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013447char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013448int
13449main ()
13450{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013451return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013452 ;
13453 return 0;
13454}
13455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013456if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013457 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013458else
Matthias Kloseb9621712010-04-24 17:59:49 +000013459 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013461rm -f core conftest.err conftest.$ac_objext \
13462 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013463LIBS=$ac_check_lib_save_LIBS
13464fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13466$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013467if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013468
Matthias Kloseb9621712010-04-24 17:59:49 +000013469$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013470
Martin v. Löwis0daad592001-09-30 21:09:59 +000013471fi
13472
Michael W. Hudson54241132001-12-07 15:38:26 +000013473
Thomas Wouters89d996e2007-09-08 17:39:28 +000013474# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13476$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013477if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013478 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013479else
13480 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013481LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013483/* end confdefs.h. */
13484
13485/* Override any GCC internal prototype to avoid an error.
13486 Use char because int might match the return type of a GCC
13487 builtin and then its argument prototype would still apply. */
13488#ifdef __cplusplus
13489extern "C"
13490#endif
13491char rl_completion_display_matches_hook ();
13492int
13493main ()
13494{
13495return rl_completion_display_matches_hook ();
13496 ;
13497 return 0;
13498}
13499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013500if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013501 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13502else
Matthias Kloseb9621712010-04-24 17:59:49 +000013503 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013504fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013505rm -f core conftest.err conftest.$ac_objext \
13506 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013507LIBS=$ac_check_lib_save_LIBS
13508fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13510$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013511if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013512
Matthias Kloseb9621712010-04-24 17:59:49 +000013513$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013514
13515fi
13516
13517
Martin v. Löwis0daad592001-09-30 21:09:59 +000013518# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13520$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013521if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013522 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013523else
Martin v. Löwis11437992002-04-12 09:54:03 +000013524 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013525LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013527/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013528
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013529/* Override any GCC internal prototype to avoid an error.
13530 Use char because int might match the return type of a GCC
13531 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013532#ifdef __cplusplus
13533extern "C"
13534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013535char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013536int
13537main ()
13538{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013539return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013540 ;
13541 return 0;
13542}
13543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013544if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013545 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013546else
Matthias Kloseb9621712010-04-24 17:59:49 +000013547 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013549rm -f core conftest.err conftest.$ac_objext \
13550 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013551LIBS=$ac_check_lib_save_LIBS
13552fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13554$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013555if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013556
Matthias Kloseb9621712010-04-24 17:59:49 +000013557$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013558
Guido van Rossum353ae582001-07-10 16:45:32 +000013559fi
13560
Jack Jansendd19cf82001-12-06 22:36:17 +000013561
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013562# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013564/* end confdefs.h. */
13565#include <readline/readline.h>
13566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013567if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013568 have_readline=yes
13569else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013570 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013571
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013572fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013573rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013574if test $have_readline = yes
13575then
Matthias Kloseb9621712010-04-24 17:59:49 +000013576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013577/* end confdefs.h. */
13578#include <readline/readline.h>
13579
13580_ACEOF
13581if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013583
Matthias Kloseb9621712010-04-24 17:59:49 +000013584$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013585
13586fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013587rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013588
13589fi
13590
Martin v. Löwis82bca632006-02-10 20:49:30 +000013591# End of readline checks: restore LIBS
13592LIBS=$LIBS_no_readline
13593
Matthias Kloseb9621712010-04-24 17:59:49 +000013594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13595$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013596if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013597 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013598else
Martin v. Löwis11437992002-04-12 09:54:03 +000013599
Matthias Kloseb9621712010-04-24 17:59:49 +000013600if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013601 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013602else
Matthias Kloseb9621712010-04-24 17:59:49 +000013603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013604/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013605
13606int main()
13607{
13608 int val1 = nice(1);
13609 if (val1 != -1 && val1 == nice(2))
13610 exit(0);
13611 exit(1);
13612}
13613
Martin v. Löwis11437992002-04-12 09:54:03 +000013614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013615if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013616 ac_cv_broken_nice=yes
13617else
Matthias Kloseb9621712010-04-24 17:59:49 +000013618 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013619fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013620rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13621 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013622fi
13623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013624fi
13625
Matthias Kloseb9621712010-04-24 17:59:49 +000013626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13627$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013628if test "$ac_cv_broken_nice" = yes
13629then
Martin v. Löwis11437992002-04-12 09:54:03 +000013630
Matthias Kloseb9621712010-04-24 17:59:49 +000013631$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013632
13633fi
13634
Matthias Kloseb9621712010-04-24 17:59:49 +000013635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13636$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013637if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013638 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013639else
Matthias Kloseb9621712010-04-24 17:59:49 +000013640 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013641 ac_cv_broken_poll=no
13642else
Matthias Kloseb9621712010-04-24 17:59:49 +000013643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013644/* end confdefs.h. */
13645
13646#include <poll.h>
13647
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013648int main()
13649{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013650 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013651 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013652
13653 close (42);
13654
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013655 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013656 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013657 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013658 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013659 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013660 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013661 return 1;
13662}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013663
13664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013665if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013666 ac_cv_broken_poll=yes
13667else
Matthias Kloseb9621712010-04-24 17:59:49 +000013668 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013670rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13671 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013673
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013674fi
13675
Matthias Kloseb9621712010-04-24 17:59:49 +000013676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13677$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013678if test "$ac_cv_broken_poll" = yes
13679then
13680
Matthias Kloseb9621712010-04-24 17:59:49 +000013681$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013682
13683fi
13684
Brett Cannon43802422005-02-10 20:48:03 +000013685# 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 +000013686# (which is not required by ISO C or UNIX spec) and/or if we support
13687# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013688ac_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 +000013689#include <$ac_cv_struct_tm>
13690
Matthias Kloseb9621712010-04-24 17:59:49 +000013691"
Victor Stinnere0be4232011-10-25 13:06:09 +020013692if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013693
13694cat >>confdefs.h <<_ACEOF
13695#define HAVE_STRUCT_TM_TM_ZONE 1
13696_ACEOF
13697
13698
13699fi
13700
13701if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13702
Matthias Kloseb9621712010-04-24 17:59:49 +000013703$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013704
13705else
Matthias Kloseb9621712010-04-24 17:59:49 +000013706 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13707"
Victor Stinnere0be4232011-10-25 13:06:09 +020013708if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013709 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013710else
Matthias Kloseb9621712010-04-24 17:59:49 +000013711 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013712fi
13713
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013714cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013715#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013716_ACEOF
13717
Matthias Kloseb9621712010-04-24 17:59:49 +000013718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13719$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013720if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013721 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013722else
Matthias Kloseb9621712010-04-24 17:59:49 +000013723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013724/* end confdefs.h. */
13725#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013726#if !HAVE_DECL_TZNAME
13727extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013728#endif
13729
13730int
13731main ()
13732{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013733return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013734 ;
13735 return 0;
13736}
13737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013738if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013739 ac_cv_var_tzname=yes
13740else
Matthias Kloseb9621712010-04-24 17:59:49 +000013741 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013742fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013743rm -f core conftest.err conftest.$ac_objext \
13744 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013745fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13747$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013748 if test $ac_cv_var_tzname = yes; then
13749
Matthias Kloseb9621712010-04-24 17:59:49 +000013750$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013751
13752 fi
13753fi
13754
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013755
Martin v. Löwis1d459062005-03-14 21:23:33 +000013756# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13758$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013759if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013760 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013761else
13762
Matthias Kloseb9621712010-04-24 17:59:49 +000013763if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013764 ac_cv_working_tzset=no
13765else
Matthias Kloseb9621712010-04-24 17:59:49 +000013766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013767/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013768
13769#include <stdlib.h>
13770#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013771#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013772
13773#if HAVE_TZNAME
13774extern char *tzname[];
13775#endif
13776
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013777int main()
13778{
Brett Cannon18367812003-09-19 00:59:16 +000013779 /* Note that we need to ensure that not only does tzset(3)
13780 do 'something' with localtime, but it works as documented
13781 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013782 This includes making sure that tzname is set properly if
13783 tm->tm_zone does not exist since it is the alternative way
13784 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013785
13786 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013787 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013788 */
13789
Martin v. Löwis1d459062005-03-14 21:23:33 +000013790 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013791 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13792
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013793 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013794 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013795 if (localtime(&groundhogday)->tm_hour != 0)
13796 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013797#if HAVE_TZNAME
13798 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13799 if (strcmp(tzname[0], "UTC") ||
13800 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13801 exit(1);
13802#endif
Brett Cannon18367812003-09-19 00:59:16 +000013803
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013804 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013805 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013806 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013807 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013808#if HAVE_TZNAME
13809 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13810 exit(1);
13811#endif
Brett Cannon18367812003-09-19 00:59:16 +000013812
13813 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13814 tzset();
13815 if (localtime(&groundhogday)->tm_hour != 11)
13816 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013817#if HAVE_TZNAME
13818 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13819 exit(1);
13820#endif
13821
13822#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013823 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13824 exit(1);
13825 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13826 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013827#endif
Brett Cannon18367812003-09-19 00:59:16 +000013828
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013829 exit(0);
13830}
13831
13832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013833if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013834 ac_cv_working_tzset=yes
13835else
Matthias Kloseb9621712010-04-24 17:59:49 +000013836 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013837fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13839 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013840fi
13841
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013842fi
13843
Matthias Kloseb9621712010-04-24 17:59:49 +000013844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13845$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013846if test "$ac_cv_working_tzset" = yes
13847then
13848
Matthias Kloseb9621712010-04-24 17:59:49 +000013849$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013850
13851fi
13852
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013853# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13855$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013856if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013857 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013858else
Matthias Kloseb9621712010-04-24 17:59:49 +000013859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013860/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013861#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013862int
13863main ()
13864{
13865
13866struct stat st;
13867st.st_mtim.tv_nsec = 1;
13868
13869 ;
13870 return 0;
13871}
13872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013873if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013874 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013875else
Matthias Kloseb9621712010-04-24 17:59:49 +000013876 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13879fi
13880
Matthias Kloseb9621712010-04-24 17:59:49 +000013881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13882$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013883if test "$ac_cv_stat_tv_nsec" = yes
13884then
13885
Matthias Kloseb9621712010-04-24 17:59:49 +000013886$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013887
13888fi
13889
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013890# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13892$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013893if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013894 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013895else
Matthias Kloseb9621712010-04-24 17:59:49 +000013896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013897/* end confdefs.h. */
13898#include <sys/stat.h>
13899int
13900main ()
13901{
13902
13903struct stat st;
13904st.st_mtimespec.tv_nsec = 1;
13905
13906 ;
13907 return 0;
13908}
13909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013910if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013911 ac_cv_stat_tv_nsec2=yes
13912else
Matthias Kloseb9621712010-04-24 17:59:49 +000013913 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13916fi
13917
Matthias Kloseb9621712010-04-24 17:59:49 +000013918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13919$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013920if test "$ac_cv_stat_tv_nsec2" = yes
13921then
13922
Matthias Kloseb9621712010-04-24 17:59:49 +000013923$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013924
13925fi
13926
Jack Jansen666b1e72001-10-31 12:11:48 +000013927# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13929$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013930if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013931 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013932else
Matthias Kloseb9621712010-04-24 17:59:49 +000013933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013934/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013935#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013936int
13937main ()
13938{
Jack Jansen666b1e72001-10-31 12:11:48 +000013939
13940 int rtn;
13941 rtn = mvwdelch(0,0,0);
13942
Martin v. Löwis11437992002-04-12 09:54:03 +000013943 ;
13944 return 0;
13945}
13946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013947if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013948 ac_cv_mvwdelch_is_expression=yes
13949else
Matthias Kloseb9621712010-04-24 17:59:49 +000013950 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13953fi
13954
Matthias Kloseb9621712010-04-24 17:59:49 +000013955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13956$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013957
13958if test "$ac_cv_mvwdelch_is_expression" = yes
13959then
Martin v. Löwis11437992002-04-12 09:54:03 +000013960
Matthias Kloseb9621712010-04-24 17:59:49 +000013961$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013962
13963fi
13964
Matthias Kloseb9621712010-04-24 17:59:49 +000013965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13966$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013967if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013968 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013969else
Matthias Kloseb9621712010-04-24 17:59:49 +000013970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013971/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013972#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013973int
13974main ()
13975{
Jack Jansen666b1e72001-10-31 12:11:48 +000013976
13977 WINDOW *w;
13978 w->_flags = 0;
13979
Martin v. Löwis11437992002-04-12 09:54:03 +000013980 ;
13981 return 0;
13982}
13983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013984if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013985 ac_cv_window_has_flags=yes
13986else
Matthias Kloseb9621712010-04-24 17:59:49 +000013987 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13990fi
13991
Matthias Kloseb9621712010-04-24 17:59:49 +000013992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13993$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013994
Jack Jansen666b1e72001-10-31 12:11:48 +000013995
13996if test "$ac_cv_window_has_flags" = yes
13997then
Martin v. Löwis11437992002-04-12 09:54:03 +000013998
Matthias Kloseb9621712010-04-24 17:59:49 +000013999$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014000
14001fi
14002
Matthias Kloseb9621712010-04-24 17:59:49 +000014003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14004$as_echo_n "checking for is_term_resized... " >&6; }
14005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014006/* end confdefs.h. */
14007#include <curses.h>
14008int
14009main ()
14010{
14011void *x=is_term_resized
14012 ;
14013 return 0;
14014}
14015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014016if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014017
Matthias Kloseb9621712010-04-24 17:59:49 +000014018$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014019
Matthias Kloseb159a552010-04-25 21:00:44 +000014020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014021$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014022else
Matthias Kloseb9621712010-04-24 17:59:49 +000014023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14024$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014025
14026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14028
Matthias Kloseb9621712010-04-24 17:59:49 +000014029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14030$as_echo_n "checking for resize_term... " >&6; }
14031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014032/* end confdefs.h. */
14033#include <curses.h>
14034int
14035main ()
14036{
14037void *x=resize_term
14038 ;
14039 return 0;
14040}
14041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014042if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014043
Matthias Kloseb9621712010-04-24 17:59:49 +000014044$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014045
Matthias Kloseb159a552010-04-25 21:00:44 +000014046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014047$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014048else
Matthias Kloseb9621712010-04-24 17:59:49 +000014049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14050$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014051
14052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14054
Matthias Kloseb9621712010-04-24 17:59:49 +000014055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14056$as_echo_n "checking for resizeterm... " >&6; }
14057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014058/* end confdefs.h. */
14059#include <curses.h>
14060int
14061main ()
14062{
14063void *x=resizeterm
14064 ;
14065 return 0;
14066}
14067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014068if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014069
Matthias Kloseb9621712010-04-24 17:59:49 +000014070$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014071
Matthias Kloseb159a552010-04-25 21:00:44 +000014072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014073$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014074else
Matthias Kloseb9621712010-04-24 17:59:49 +000014075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14076$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014077
14078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14080
Matthias Kloseb9621712010-04-24 17:59:49 +000014081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14082$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000014083
14084if test -r /dev/ptmx
14085then
Matthias Kloseb9621712010-04-24 17:59:49 +000014086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14087$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014088
Matthias Kloseb9621712010-04-24 17:59:49 +000014089$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014090
Thomas Wouters89f507f2006-12-13 04:49:30 +000014091else
Matthias Kloseb9621712010-04-24 17:59:49 +000014092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14093$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014094fi
14095
Matthias Kloseb9621712010-04-24 17:59:49 +000014096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14097$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000014098
14099if test -r /dev/ptc
14100then
Matthias Kloseb9621712010-04-24 17:59:49 +000014101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14102$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000014103
Matthias Kloseb9621712010-04-24 17:59:49 +000014104$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014105
Thomas Wouters89f507f2006-12-13 04:49:30 +000014106else
Matthias Kloseb9621712010-04-24 17:59:49 +000014107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14108$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000014109fi
14110
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014111if test "$have_long_long" = yes
14112then
Matthias Kloseb9621712010-04-24 17:59:49 +000014113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14114$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014115 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014116 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014117else
Matthias Kloseb9621712010-04-24 17:59:49 +000014118 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014119 ac_cv_have_long_long_format="cross -- assuming no"
14120 if test x$GCC = xyes; then
14121 save_CFLAGS=$CFLAGS
14122 CFLAGS="$CFLAGS -Werror -Wformat"
14123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14124/* end confdefs.h. */
14125
14126 #include <stdio.h>
14127 #include <stddef.h>
14128
14129int
14130main ()
14131{
14132
14133 char *buffer;
14134 sprintf(buffer, "%lld", (long long)123);
14135 sprintf(buffer, "%lld", (long long)-123);
14136 sprintf(buffer, "%llu", (unsigned long long)123);
14137
14138 ;
14139 return 0;
14140}
14141_ACEOF
14142if ac_fn_c_try_compile "$LINENO"; then :
14143 ac_cv_have_long_long_format=yes
14144
14145fi
14146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14147 CFLAGS=$save_CFLAGS
14148 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014149else
Matthias Kloseb9621712010-04-24 17:59:49 +000014150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014151/* end confdefs.h. */
14152
14153 #include <stdio.h>
14154 #include <stddef.h>
14155 #include <string.h>
14156
14157 #ifdef HAVE_SYS_TYPES_H
14158 #include <sys/types.h>
14159 #endif
14160
14161 int main()
14162 {
14163 char buffer[256];
14164
14165 if (sprintf(buffer, "%lld", (long long)123) < 0)
14166 return 1;
14167 if (strcmp(buffer, "123"))
14168 return 1;
14169
14170 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14171 return 1;
14172 if (strcmp(buffer, "-123"))
14173 return 1;
14174
14175 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14176 return 1;
14177 if (strcmp(buffer, "123"))
14178 return 1;
14179
14180 return 0;
14181 }
14182
14183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014184if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014185 ac_cv_have_long_long_format=yes
14186else
Matthias Kloseb9621712010-04-24 17:59:49 +000014187 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14190 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014191fi
14192
14193
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014194fi
14195
Matthias Kloseb9621712010-04-24 17:59:49 +000014196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14197$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014198fi
14199
Mark Dickinson89d7d412009-12-31 20:50:59 +000014200if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014201then
14202
Matthias Kloseb9621712010-04-24 17:59:49 +000014203$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014204
14205fi
14206
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014207if test $ac_sys_system = Darwin
14208then
14209 LIBS="$LIBS -framework CoreFoundation"
14210fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014211
Matthias Kloseb9621712010-04-24 17:59:49 +000014212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14213$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014214if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014215 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014216else
Matthias Kloseb9621712010-04-24 17:59:49 +000014217 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014218 ac_cv_have_size_t_format="cross -- assuming yes"
14219
Thomas Wouters477c8d52006-05-27 19:21:47 +000014220else
Matthias Kloseb9621712010-04-24 17:59:49 +000014221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014222/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014223
Thomas Wouters477c8d52006-05-27 19:21:47 +000014224#include <stdio.h>
14225#include <stddef.h>
14226#include <string.h>
14227
Christian Heimes2c181612007-12-17 20:04:13 +000014228#ifdef HAVE_SYS_TYPES_H
14229#include <sys/types.h>
14230#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014231
14232#ifdef HAVE_SSIZE_T
14233typedef ssize_t Py_ssize_t;
14234#elif SIZEOF_VOID_P == SIZEOF_LONG
14235typedef long Py_ssize_t;
14236#else
14237typedef int Py_ssize_t;
14238#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014239
Christian Heimes2c181612007-12-17 20:04:13 +000014240int main()
14241{
14242 char buffer[256];
14243
Thomas Wouters477c8d52006-05-27 19:21:47 +000014244 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14245 return 1;
14246
Thomas Wouters89f507f2006-12-13 04:49:30 +000014247 if (strcmp(buffer, "123"))
14248 return 1;
14249
14250 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14251 return 1;
14252
14253 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014254 return 1;
14255
14256 return 0;
14257}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014258
Thomas Wouters477c8d52006-05-27 19:21:47 +000014259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014260if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014261 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014262else
Matthias Kloseb9621712010-04-24 17:59:49 +000014263 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014265rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14266 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014267fi
14268
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14271$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014272if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014273
Matthias Kloseb9621712010-04-24 17:59:49 +000014274$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014275
14276fi
14277
Matthias Kloseb9621712010-04-24 17:59:49 +000014278ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014279#ifdef HAVE_SYS_TYPES_H
14280#include <sys/types.h>
14281#endif
14282#ifdef HAVE_SYS_SOCKET_H
14283#include <sys/socket.h>
14284#endif
14285
Matthias Kloseb9621712010-04-24 17:59:49 +000014286"
Victor Stinnere0be4232011-10-25 13:06:09 +020014287if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014288
Martin v. Löwis11437992002-04-12 09:54:03 +000014289else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014290
Matthias Kloseb9621712010-04-24 17:59:49 +000014291$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014292
14293fi
14294
Michael W. Hudson54241132001-12-07 15:38:26 +000014295
Matthias Kloseb9621712010-04-24 17:59:49 +000014296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14297$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014298if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014299 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014300else
Matthias Kloseb9621712010-04-24 17:59:49 +000014301 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014302 ac_cv_broken_mbstowcs=no
14303else
Matthias Kloseb9621712010-04-24 17:59:49 +000014304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014305/* end confdefs.h. */
14306
14307#include<stdlib.h>
14308int main() {
14309 size_t len = -1;
14310 const char *str = "text";
14311 len = mbstowcs(NULL, str, 0);
14312 return (len != 4);
14313}
14314
14315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014316if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014317 ac_cv_broken_mbstowcs=no
14318else
Matthias Kloseb9621712010-04-24 17:59:49 +000014319 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014320fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014321rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14322 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014323fi
14324
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014325fi
14326
Matthias Kloseb9621712010-04-24 17:59:49 +000014327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14328$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014329if test "$ac_cv_broken_mbstowcs" = yes
14330then
14331
Matthias Kloseb9621712010-04-24 17:59:49 +000014332$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014333
14334fi
14335
Antoine Pitroub52ec782009-01-25 16:34:23 +000014336# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14338$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014339
14340# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014341if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014342 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014343if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014344then
14345
Matthias Kloseb9621712010-04-24 17:59:49 +000014346$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014347
Matthias Kloseb9621712010-04-24 17:59:49 +000014348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14349$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014350fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014351if test "$withval" = no
14352then
14353
14354$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14355
Matthias Kloseb9621712010-04-24 17:59:49 +000014356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14357$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014358fi
14359
Antoine Pitrou042b1282010-08-13 21:15:58 +000014360else
14361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14362$as_echo "no value specified" >&6; }
14363fi
14364
Antoine Pitroub52ec782009-01-25 16:34:23 +000014365
Matthias Kloseb17289e2012-03-15 19:51:34 +010014366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14367$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14368if ${ac_cv_computed_gotos+:} false; then :
14369 $as_echo_n "(cached) " >&6
14370else
14371 if test "$cross_compiling" = yes; then :
14372 if test "${with_computed_gotos+set}" = set; then
14373 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14374 else
14375 ac_cv_computed_gotos=no
14376 fi
14377else
14378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14379/* end confdefs.h. */
14380
14381int main(int argc, char **argv)
14382{
14383 static void *targets[1] = { &&LABEL1 };
14384 goto LABEL2;
14385LABEL1:
14386 return 0;
14387LABEL2:
14388 goto *targets[0];
14389 return 1;
14390}
14391
14392_ACEOF
14393if ac_fn_c_try_run "$LINENO"; then :
14394 ac_cv_computed_gotos=yes
14395else
14396 ac_cv_computed_gotos=no
14397fi
14398rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14399 conftest.$ac_objext conftest.beam conftest.$ac_ext
14400fi
14401
14402fi
14403
14404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14405$as_echo "$ac_cv_computed_gotos" >&6; }
14406case "$ac_cv_computed_gotos" in yes*)
14407
14408$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14409
14410esac
14411
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014412case $ac_sys_system in
14413AIX*)
14414
14415$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14416 ;;
14417esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014418
Michael W. Hudson54241132001-12-07 15:38:26 +000014419
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014420
14421
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014422for h in `(cd $srcdir;echo Python/thread_*.h)`
14423do
14424 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14425done
14426
Michael W. Hudson54241132001-12-07 15:38:26 +000014427
Neal Norwitzd24499d2005-12-18 21:36:39 +000014428SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14430$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014431for dir in $SRCDIRS; do
14432 if test ! -d $dir; then
14433 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014434 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014435done
Matthias Kloseb9621712010-04-24 17:59:49 +000014436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14437$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014438
Stefan Krah1919b7e2012-03-21 18:25:23 +010014439# Availability of -O2:
14440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
14441$as_echo_n "checking for -O2... " >&6; }
14442saved_cflags="$CFLAGS"
14443CFLAGS="-O2"
14444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14445/* end confdefs.h. */
14446
14447int
14448main ()
14449{
14450
14451
14452 ;
14453 return 0;
14454}
14455_ACEOF
14456if ac_fn_c_try_compile "$LINENO"; then :
14457 have_O2=yes
14458else
14459 have_O2=no
14460fi
14461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
14463$as_echo "$have_O2" >&6; }
14464CFLAGS="$saved_cflags"
14465
14466# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
14467# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
14468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
14469$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
14470saved_cflags="$CFLAGS"
14471CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
14472if test "$have_O2" = no; then
14473 CFLAGS=""
14474fi
14475if test "$cross_compiling" = yes; then :
14476 have_glibc_memmove_bug=undefined
14477else
14478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14479/* end confdefs.h. */
14480
14481#include <stdio.h>
14482#include <stdlib.h>
14483#include <string.h>
14484void foo(void *p, void *q) { memmove(p, q, 19); }
14485int main() {
14486 char a[32] = "123456789000000000";
14487 foo(&a[9], a);
14488 if (strcmp(a, "123456789123456789000000000") != 0)
14489 return 1;
14490 foo(a, &a[9]);
14491 if (strcmp(a, "123456789000000000") != 0)
14492 return 1;
14493 return 0;
14494}
14495
14496_ACEOF
14497if ac_fn_c_try_run "$LINENO"; then :
14498 have_glibc_memmove_bug=no
14499else
14500 have_glibc_memmove_bug=yes
14501fi
14502rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14503 conftest.$ac_objext conftest.beam conftest.$ac_ext
14504fi
14505
14506CFLAGS="$saved_cflags"
14507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
14508$as_echo "$have_glibc_memmove_bug" >&6; }
14509if test "$have_glibc_memmove_bug" = yes; then
14510
14511$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
14512
14513fi
14514
14515if test "$have_gcc_asm_for_x87" = yes; then
14516 # Some versions of gcc miscompile inline asm:
14517 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
14518 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
14519 case $CC in
14520 *gcc*)
14521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
14522$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
14523 saved_cflags="$CFLAGS"
14524 CFLAGS="-O2"
14525 if test "$cross_compiling" = yes; then :
14526 have_ipa_pure_const_bug=undefined
14527else
14528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14529/* end confdefs.h. */
14530
14531 __attribute__((noinline)) int
14532 foo(int *p) {
14533 int r;
14534 asm ( "movl \$6, (%1)\n\t"
14535 "xorl %0, %0\n\t"
14536 : "=r" (r) : "r" (p) : "memory"
14537 );
14538 return r;
14539 }
14540 int main() {
14541 int p = 8;
14542 if ((foo(&p) ? : p) != 6)
14543 return 1;
14544 return 0;
14545 }
14546
14547_ACEOF
14548if ac_fn_c_try_run "$LINENO"; then :
14549 have_ipa_pure_const_bug=no
14550else
14551 have_ipa_pure_const_bug=yes
14552fi
14553rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14554 conftest.$ac_objext conftest.beam conftest.$ac_ext
14555fi
14556
14557 CFLAGS="$saved_cflags"
14558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
14559$as_echo "$have_ipa_pure_const_bug" >&6; }
14560 if test "$have_ipa_pure_const_bug" = yes; then
14561
14562$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
14563
14564 fi
14565 ;;
14566 esac
14567fi
14568
Guido van Rossum627b2d71993-12-24 10:39:16 +000014569# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000014570ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014571
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014572ac_config_files="$ac_config_files Modules/ld_so_aix"
14573
Martin v. Löwis11437992002-04-12 09:54:03 +000014574cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014575# This file is a shell script that caches the results of configure
14576# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014577# scripts and configure runs, see configure's option --config-cache.
14578# It is not useful on other systems. If it contains results you don't
14579# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014580#
Martin v. Löwis11437992002-04-12 09:54:03 +000014581# config.status only pays attention to the cache file if you give it
14582# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014583#
Skip Montanaro6dead952003-09-25 14:50:04 +000014584# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014585# loading this file, other *unset* `ac_cv_foo' will be assigned the
14586# following values.
14587
14588_ACEOF
14589
Guido van Rossumf78abae1997-01-21 22:02:36 +000014590# The following way of writing the cache mishandles newlines in values,
14591# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014592# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014593# Ultrix sh set writes to stderr and can't be redirected directly,
14594# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014595(
14596 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14597 eval ac_val=\$$ac_var
14598 case $ac_val in #(
14599 *${as_nl}*)
14600 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014601 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14602$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014603 esac
14604 case $ac_var in #(
14605 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014606 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14607 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014608 esac ;;
14609 esac
14610 done
14611
Martin v. Löwis11437992002-04-12 09:54:03 +000014612 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014613 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14614 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014615 # `set' does not quote correctly, so add quotes: double-quote
14616 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014617 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014618 "s/'/'\\\\''/g;
14619 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014620 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014621 *)
14622 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014623 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014624 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014625 esac |
14626 sort
14627) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014628 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014629 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014630 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014631 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014632 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14633 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014634 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14635 :end' >>confcache
14636if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14637 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020014638 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014639 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14640$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020014641 if test ! -f "$cache_file" || test -h "$cache_file"; then
14642 cat confcache >"$cache_file"
14643 else
14644 case $cache_file in #(
14645 */* | ?:*)
14646 mv -f confcache "$cache_file"$$ &&
14647 mv -f "$cache_file"$$ "$cache_file" ;; #(
14648 *)
14649 mv -f confcache "$cache_file" ;;
14650 esac
14651 fi
14652 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014653 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014654 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14655$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014656 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014657fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014658rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014659
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014660test "x$prefix" = xNONE && prefix=$ac_default_prefix
14661# Let make expand exec_prefix.
14662test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014663
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014664DEFS=-DHAVE_CONFIG_H
14665
Skip Montanaro6dead952003-09-25 14:50:04 +000014666ac_libobjs=
14667ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014668U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014669for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14670 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014671 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014672 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014673 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14674 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014675 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14676 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014677done
14678LIBOBJS=$ac_libobjs
14679
14680LTLIBOBJS=$ac_ltlibobjs
14681
14682
Martin v. Löwis11437992002-04-12 09:54:03 +000014683
Matthias Kloseb9621712010-04-24 17:59:49 +000014684
Victor Stinnere0be4232011-10-25 13:06:09 +020014685: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014686ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014687ac_clean_files_save=$ac_clean_files
14688ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014689{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14690$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14691as_write_fail=0
14692cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014693#! $SHELL
14694# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014695# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014696# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014697# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014698
Martin v. Löwis11437992002-04-12 09:54:03 +000014699debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014700ac_cs_recheck=false
14701ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014702
Matthias Kloseb9621712010-04-24 17:59:49 +000014703SHELL=\${CONFIG_SHELL-$SHELL}
14704export SHELL
14705_ASEOF
14706cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14707## -------------------- ##
14708## M4sh Initialization. ##
14709## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014711# Be more Bourne compatible
14712DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014713if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014714 emulate sh
14715 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014716 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014717 # is contrary to our usage. Disable this feature.
14718 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014719 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014720else
Matthias Kloseb9621712010-04-24 17:59:49 +000014721 case `(set -o) 2>/dev/null` in #(
14722 *posix*) :
14723 set -o posix ;; #(
14724 *) :
14725 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014726esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014727fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014728
14729
Matthias Kloseb9621712010-04-24 17:59:49 +000014730as_nl='
14731'
14732export as_nl
14733# Printing a long string crashes Solaris 7 /usr/bin/printf.
14734as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14735as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14736as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14737# Prefer a ksh shell builtin over an external printf program on Solaris,
14738# but without wasting forks for bash or zsh.
14739if test -z "$BASH_VERSION$ZSH_VERSION" \
14740 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14741 as_echo='print -r --'
14742 as_echo_n='print -rn --'
14743elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14744 as_echo='printf %s\n'
14745 as_echo_n='printf %s'
14746else
14747 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14748 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14749 as_echo_n='/usr/ucb/echo -n'
14750 else
14751 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14752 as_echo_n_body='eval
14753 arg=$1;
14754 case $arg in #(
14755 *"$as_nl"*)
14756 expr "X$arg" : "X\\(.*\\)$as_nl";
14757 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14758 esac;
14759 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14760 '
14761 export as_echo_n_body
14762 as_echo_n='sh -c $as_echo_n_body as_echo'
14763 fi
14764 export as_echo_body
14765 as_echo='sh -c $as_echo_body as_echo'
14766fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014767
14768# The user is always right.
14769if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014770 PATH_SEPARATOR=:
14771 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14772 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14773 PATH_SEPARATOR=';'
14774 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014775fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014777
14778# IFS
14779# We need space, tab and new line, in precisely that order. Quoting is
14780# there to prevent editors from complaining about space-tab.
14781# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14782# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014783IFS=" "" $as_nl"
14784
14785# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020014786as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014787case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014788 *[\\/]* ) as_myself=$0 ;;
14789 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014790for as_dir in $PATH
14791do
14792 IFS=$as_save_IFS
14793 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014794 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14795 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014796IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014797
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014798 ;;
14799esac
14800# We did not find ourselves, most probably we were run as `sh COMMAND'
14801# in which case we are not to be found in the path.
14802if test "x$as_myself" = x; then
14803 as_myself=$0
14804fi
14805if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014806 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14807 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014808fi
14809
Matthias Kloseb9621712010-04-24 17:59:49 +000014810# Unset variables that we do not need and which cause bugs (e.g. in
14811# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14812# suppresses any "Segmentation fault" message there. '((' could
14813# trigger a bug in pdksh 5.2.14.
14814for as_var in BASH_ENV ENV MAIL MAILPATH
14815do eval test x\${$as_var+set} = xset \
14816 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014817done
14818PS1='$ '
14819PS2='> '
14820PS4='+ '
14821
14822# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014823LC_ALL=C
14824export LC_ALL
14825LANGUAGE=C
14826export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014827
Matthias Kloseb9621712010-04-24 17:59:49 +000014828# CDPATH.
14829(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14830
14831
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014832# as_fn_error STATUS ERROR [LINENO LOG_FD]
14833# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014834# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14835# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014836# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014837as_fn_error ()
14838{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014839 as_status=$1; test $as_status -eq 0 && as_status=1
14840 if test "$4"; then
14841 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14842 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014843 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014844 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014845 as_fn_exit $as_status
14846} # as_fn_error
14847
14848
14849# as_fn_set_status STATUS
14850# -----------------------
14851# Set $? to STATUS, without forking.
14852as_fn_set_status ()
14853{
14854 return $1
14855} # as_fn_set_status
14856
14857# as_fn_exit STATUS
14858# -----------------
14859# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14860as_fn_exit ()
14861{
14862 set +e
14863 as_fn_set_status $1
14864 exit $1
14865} # as_fn_exit
14866
14867# as_fn_unset VAR
14868# ---------------
14869# Portably unset VAR.
14870as_fn_unset ()
14871{
14872 { eval $1=; unset $1;}
14873}
14874as_unset=as_fn_unset
14875# as_fn_append VAR VALUE
14876# ----------------------
14877# Append the text in VALUE to the end of the definition contained in VAR. Take
14878# advantage of any shell optimizations that allow amortized linear growth over
14879# repeated appends, instead of the typical quadratic growth present in naive
14880# implementations.
14881if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14882 eval 'as_fn_append ()
14883 {
14884 eval $1+=\$2
14885 }'
14886else
14887 as_fn_append ()
14888 {
14889 eval $1=\$$1\$2
14890 }
14891fi # as_fn_append
14892
14893# as_fn_arith ARG...
14894# ------------------
14895# Perform arithmetic evaluation on the ARGs, and store the result in the
14896# global $as_val. Take advantage of shells that can avoid forks. The arguments
14897# must be portable across $(()) and expr.
14898if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14899 eval 'as_fn_arith ()
14900 {
14901 as_val=$(( $* ))
14902 }'
14903else
14904 as_fn_arith ()
14905 {
14906 as_val=`expr "$@" || test $? -eq 1`
14907 }
14908fi # as_fn_arith
14909
14910
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014911if expr a : '\(a\)' >/dev/null 2>&1 &&
14912 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14913 as_expr=expr
14914else
14915 as_expr=false
14916fi
14917
14918if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14919 as_basename=basename
14920else
14921 as_basename=false
14922fi
14923
Matthias Kloseb9621712010-04-24 17:59:49 +000014924if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14925 as_dirname=dirname
14926else
14927 as_dirname=false
14928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930as_me=`$as_basename -- "$0" ||
14931$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14932 X"$0" : 'X\(//\)$' \| \
14933 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014934$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014935 sed '/^.*\/\([^/][^/]*\)\/*$/{
14936 s//\1/
14937 q
14938 }
14939 /^X\/\(\/\/\)$/{
14940 s//\1/
14941 q
14942 }
14943 /^X\/\(\/\).*/{
14944 s//\1/
14945 q
14946 }
14947 s/.*/./; q'`
14948
Matthias Kloseb9621712010-04-24 17:59:49 +000014949# Avoid depending upon Character Ranges.
14950as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14951as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14952as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14953as_cr_digits='0123456789'
14954as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014955
14956ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014957case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014958-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014959 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014960 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014961 xy) ECHO_C='\c';;
14962 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14963 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014964 esac;;
14965*)
14966 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014967esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014968
Martin v. Löwis11437992002-04-12 09:54:03 +000014969rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014970if test -d conf$$.dir; then
14971 rm -f conf$$.dir/conf$$.file
14972else
14973 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014974 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014975fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014976if (echo >conf$$.file) 2>/dev/null; then
14977 if ln -s conf$$.file conf$$ 2>/dev/null; then
14978 as_ln_s='ln -s'
14979 # ... but there are two gotchas:
14980 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14981 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ned Deilycbfb9a52012-06-23 16:02:19 -070014982 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000014983 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ned Deilycbfb9a52012-06-23 16:02:19 -070014984 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000014985 elif ln conf$$.file conf$$ 2>/dev/null; then
14986 as_ln_s=ln
14987 else
Ned Deilycbfb9a52012-06-23 16:02:19 -070014988 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000014989 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014990else
Ned Deilycbfb9a52012-06-23 16:02:19 -070014991 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000014992fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014993rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14994rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014995
Matthias Kloseb9621712010-04-24 17:59:49 +000014996
14997# as_fn_mkdir_p
14998# -------------
14999# Create "$as_dir" as a directory, including parents if necessary.
15000as_fn_mkdir_p ()
15001{
15002
15003 case $as_dir in #(
15004 -*) as_dir=./$as_dir;;
15005 esac
15006 test -d "$as_dir" || eval $as_mkdir_p || {
15007 as_dirs=
15008 while :; do
15009 case $as_dir in #(
15010 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15011 *) as_qdir=$as_dir;;
15012 esac
15013 as_dirs="'$as_qdir' $as_dirs"
15014 as_dir=`$as_dirname -- "$as_dir" ||
15015$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15016 X"$as_dir" : 'X\(//\)[^/]' \| \
15017 X"$as_dir" : 'X\(//\)$' \| \
15018 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15019$as_echo X"$as_dir" |
15020 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15021 s//\1/
15022 q
15023 }
15024 /^X\(\/\/\)[^/].*/{
15025 s//\1/
15026 q
15027 }
15028 /^X\(\/\/\)$/{
15029 s//\1/
15030 q
15031 }
15032 /^X\(\/\).*/{
15033 s//\1/
15034 q
15035 }
15036 s/.*/./; q'`
15037 test -d "$as_dir" && break
15038 done
15039 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015040 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015041
15042
15043} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015044if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015045 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015046else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015047 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015048 as_mkdir_p=false
15049fi
15050
Ned Deilycbfb9a52012-06-23 16:02:19 -070015051
15052# as_fn_executable_p FILE
15053# -----------------------
15054# Test if FILE is an executable regular file.
15055as_fn_executable_p ()
15056{
15057 test -f "$1" && test -x "$1"
15058} # as_fn_executable_p
15059as_test_x='test -x'
15060as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015061
15062# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015063as_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 +000015064
15065# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015066as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015067
15068
Martin v. Löwis11437992002-04-12 09:54:03 +000015069exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015070## ----------------------------------- ##
15071## Main body of $CONFIG_STATUS script. ##
15072## ----------------------------------- ##
15073_ASEOF
15074test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015075
Matthias Kloseb9621712010-04-24 17:59:49 +000015076cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15077# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015078# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015079# values after options handling.
15080ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015081This file was extended by python $as_me 3.3, which was
Ned Deilycbfb9a52012-06-23 16:02:19 -070015082generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015083
15084 CONFIG_FILES = $CONFIG_FILES
15085 CONFIG_HEADERS = $CONFIG_HEADERS
15086 CONFIG_LINKS = $CONFIG_LINKS
15087 CONFIG_COMMANDS = $CONFIG_COMMANDS
15088 $ $0 $@
15089
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015090on `(hostname || uname -n) 2>/dev/null | sed 1q`
15091"
15092
Martin v. Löwis11437992002-04-12 09:54:03 +000015093_ACEOF
15094
Matthias Kloseb9621712010-04-24 17:59:49 +000015095case $ac_config_files in *"
15096"*) set x $ac_config_files; shift; ac_config_files=$*;;
15097esac
15098
15099case $ac_config_headers in *"
15100"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15101esac
15102
15103
15104cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015105# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015106config_files="$ac_config_files"
15107config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015108
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015109_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015110
Matthias Kloseb9621712010-04-24 17:59:49 +000015111cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015112ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015113\`$as_me' instantiates files and other configuration actions
15114from templates according to the current configuration. Unless the files
15115and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015116
Matthias Kloseb9621712010-04-24 17:59:49 +000015117Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015118
15119 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015120 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015121 --config print configuration, then exit
15122 -q, --quiet, --silent
15123 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015124 -d, --debug don't remove temporary files
15125 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015126 --file=FILE[:TEMPLATE]
15127 instantiate the configuration file FILE
15128 --header=FILE[:TEMPLATE]
15129 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015130
15131Configuration files:
15132$config_files
15133
15134Configuration headers:
15135$config_headers
15136
Matthias Kloseb9621712010-04-24 17:59:49 +000015137Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015138
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015140cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15141ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015142ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015143python config.status 3.3
Ned Deilycbfb9a52012-06-23 16:02:19 -070015144configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015145 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015146
Ned Deilycbfb9a52012-06-23 16:02:19 -070015147Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015148This config.status script is free software; the Free Software Foundation
15149gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015150
15151ac_pwd='$ac_pwd'
15152srcdir='$srcdir'
15153INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015154MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015155test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015156_ACEOF
15157
Matthias Kloseb9621712010-04-24 17:59:49 +000015158cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15159# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015160ac_need_defaults=:
15161while test $# != 0
15162do
15163 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015164 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015165 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15166 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015167 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015168 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015169 --*=)
15170 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15171 ac_optarg=
15172 ac_shift=:
15173 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015174 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015175 ac_option=$1
15176 ac_optarg=$2
15177 ac_shift=shift
15178 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015179 esac
15180
Skip Montanaro6dead952003-09-25 14:50:04 +000015181 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015182 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015183 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15184 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015185 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015186 $as_echo "$ac_cs_version"; exit ;;
15187 --config | --confi | --conf | --con | --co | --c )
15188 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015189 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015190 debug=: ;;
15191 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015192 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015193 case $ac_optarg in
15194 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015195 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015196 esac
15197 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015198 ac_need_defaults=false;;
15199 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015200 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015201 case $ac_optarg in
15202 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15203 esac
15204 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015205 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015206 --he | --h)
15207 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015208 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015209Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015210 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015211 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015212 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15213 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15214 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015215
15216 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015217 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015218Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015219
Matthias Kloseb9621712010-04-24 17:59:49 +000015220 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015221 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015222
15223 esac
15224 shift
15225done
15226
Skip Montanaro6dead952003-09-25 14:50:04 +000015227ac_configure_extra_args=
15228
15229if $ac_cs_silent; then
15230 exec 6>/dev/null
15231 ac_configure_extra_args="$ac_configure_extra_args --silent"
15232fi
15233
15234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015235cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015236if \$ac_cs_recheck; then
Ned Deilycbfb9a52012-06-23 16:02:19 -070015237 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015238 shift
15239 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15240 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015241 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015242 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015243fi
15244
Martin v. Löwis11437992002-04-12 09:54:03 +000015245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015246cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015247exec 5>>config.log
15248{
15249 echo
15250 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15251## Running $as_me. ##
15252_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015253 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015254} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015255
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015257cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015258_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015259
Matthias Kloseb9621712010-04-24 17:59:49 +000015260cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015261
15262# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015263for ac_config_target in $ac_config_targets
15264do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015265 case $ac_config_target in
15266 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15267 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15268 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015269 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15270 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015271 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15272 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015273 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015274 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015275
Victor Stinnere0be4232011-10-25 13:06:09 +020015276 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015277 esac
15278done
15279
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015280
Martin v. Löwis11437992002-04-12 09:54:03 +000015281# If the user did not use the arguments to specify the items to instantiate,
15282# then the envvar interface is used. Set only those that are not.
15283# We use the long form for the default assignment because of an extremely
15284# bizarre bug on SunOS 4.1.3.
15285if $ac_need_defaults; then
15286 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15287 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15288fi
15289
Skip Montanaro6dead952003-09-25 14:50:04 +000015290# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015291# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015292# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015293# Hook for its removal unless debugging.
15294# Note that there is a small window in which the directory will not be cleaned:
15295# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015296$debug ||
15297{
Victor Stinnere0be4232011-10-25 13:06:09 +020015298 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015299 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015300 : "${ac_tmp:=$tmp}"
15301 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015302' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015303 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015304}
Martin v. Löwis11437992002-04-12 09:54:03 +000015305# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015306
Martin v. Löwis11437992002-04-12 09:54:03 +000015307{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015308 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015309 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015310} ||
15311{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015312 tmp=./conf$$-$RANDOM
15313 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015314} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015315ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015316
Matthias Kloseb9621712010-04-24 17:59:49 +000015317# Set up the scripts for CONFIG_FILES section.
15318# No need to generate them if there are no CONFIG_FILES.
15319# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015320if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015321
Matthias Kloseb9621712010-04-24 17:59:49 +000015322
15323ac_cr=`echo X | tr X '\015'`
15324# On cygwin, bash can eat \r inside `` if the user requested igncr.
15325# But we know of no other shell where ac_cr would be empty at this
15326# point, so we can use a bashism as a fallback.
15327if test "x$ac_cr" = x; then
15328 eval ac_cr=\$\'\\r\'
15329fi
15330ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15331if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015332 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015333else
15334 ac_cs_awk_cr=$ac_cr
15335fi
15336
Victor Stinnere0be4232011-10-25 13:06:09 +020015337echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015338_ACEOF
15339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015340
Matthias Kloseb9621712010-04-24 17:59:49 +000015341{
15342 echo "cat >conf$$subs.awk <<_ACEOF" &&
15343 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15344 echo "_ACEOF"
15345} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015346 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15347ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015348ac_delim='%!_!# '
15349for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015350 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015351 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015352
Matthias Kloseb9621712010-04-24 17:59:49 +000015353 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15354 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015355 break
15356 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015357 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015358 else
15359 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015360 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015361done
Matthias Kloseb9621712010-04-24 17:59:49 +000015362rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015363
Matthias Kloseb9621712010-04-24 17:59:49 +000015364cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015365cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015367sed -n '
15368h
15369s/^/S["/; s/!.*/"]=/
15370p
15371g
15372s/^[^!]*!//
15373:repl
15374t repl
15375s/'"$ac_delim"'$//
15376t delim
15377:nl
15378h
15379s/\(.\{148\}\)..*/\1/
15380t more1
15381s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15382p
15383n
15384b repl
15385:more1
15386s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15387p
15388g
15389s/.\{148\}//
15390t nl
15391:delim
15392h
15393s/\(.\{148\}\)..*/\1/
15394t more2
15395s/["\\]/\\&/g; s/^/"/; s/$/"/
15396p
15397b
15398:more2
15399s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15400p
15401g
15402s/.\{148\}//
15403t delim
15404' <conf$$subs.awk | sed '
15405/^[^""]/{
15406 N
15407 s/\n//
15408}
15409' >>$CONFIG_STATUS || ac_write_fail=1
15410rm -f conf$$subs.awk
15411cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15412_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015413cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015414 for (key in S) S_is_set[key] = 1
15415 FS = ""
15416
15417}
15418{
15419 line = $ 0
15420 nfields = split(line, field, "@")
15421 substed = 0
15422 len = length(field[1])
15423 for (i = 2; i < nfields; i++) {
15424 key = field[i]
15425 keylen = length(key)
15426 if (S_is_set[key]) {
15427 value = S[key]
15428 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15429 len += length(value) + length(field[++i])
15430 substed = 1
15431 } else
15432 len += 1 + keylen
15433 }
15434
15435 print line
15436}
15437
15438_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015440cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15441if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15442 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15443else
15444 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020015445fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015446 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015447_ACEOF
15448
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015449# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15450# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015451# trailing colons and then remove the whole line if VPATH becomes empty
15452# (actually we leave an empty line to preserve line numbers).
15453if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015454 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15455h
15456s///
15457s/^/:/
15458s/[ ]*$/:/
15459s/:\$(srcdir):/:/g
15460s/:\${srcdir}:/:/g
15461s/:@srcdir@:/:/g
15462s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015463s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015464x
15465s/\(=[ ]*\).*/\1/
15466G
15467s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015468s/^[^=]*=[ ]*$//
15469}'
15470fi
15471
Matthias Kloseb9621712010-04-24 17:59:49 +000015472cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015473fi # test -n "$CONFIG_FILES"
15474
Matthias Kloseb9621712010-04-24 17:59:49 +000015475# Set up the scripts for CONFIG_HEADERS section.
15476# No need to generate them if there are no CONFIG_HEADERS.
15477# This happens for instance with `./config.status Makefile'.
15478if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015479cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015480BEGIN {
15481_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015482
Matthias Kloseb9621712010-04-24 17:59:49 +000015483# Transform confdefs.h into an awk script `defines.awk', embedded as
15484# here-document in config.status, that substitutes the proper values into
15485# config.h.in to produce config.h.
15486
15487# Create a delimiter string that does not exist in confdefs.h, to ease
15488# handling of long lines.
15489ac_delim='%!_!# '
15490for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020015491 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15492 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015493 break
15494 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015495 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015496 else
15497 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15498 fi
15499done
15500
15501# For the awk script, D is an array of macro values keyed by name,
15502# likewise P contains macro parameters if any. Preserve backslash
15503# newline sequences.
15504
15505ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15506sed -n '
15507s/.\{148\}/&'"$ac_delim"'/g
15508t rset
15509:rset
15510s/^[ ]*#[ ]*define[ ][ ]*/ /
15511t def
15512d
15513:def
15514s/\\$//
15515t bsnl
15516s/["\\]/\\&/g
15517s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15518D["\1"]=" \3"/p
15519s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15520d
15521:bsnl
15522s/["\\]/\\&/g
15523s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15524D["\1"]=" \3\\\\\\n"\\/p
15525t cont
15526s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15527t cont
15528d
15529:cont
15530n
15531s/.\{148\}/&'"$ac_delim"'/g
15532t clear
15533:clear
15534s/\\$//
15535t bsnlc
15536s/["\\]/\\&/g; s/^/"/; s/$/"/p
15537d
15538:bsnlc
15539s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15540b cont
15541' <confdefs.h | sed '
15542s/'"$ac_delim"'/"\\\
15543"/g' >>$CONFIG_STATUS || ac_write_fail=1
15544
15545cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15546 for (key in D) D_is_set[key] = 1
15547 FS = ""
15548}
15549/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15550 line = \$ 0
15551 split(line, arg, " ")
15552 if (arg[1] == "#") {
15553 defundef = arg[2]
15554 mac1 = arg[3]
15555 } else {
15556 defundef = substr(arg[1], 2)
15557 mac1 = arg[2]
15558 }
15559 split(mac1, mac2, "(") #)
15560 macro = mac2[1]
15561 prefix = substr(line, 1, index(line, defundef) - 1)
15562 if (D_is_set[macro]) {
15563 # Preserve the white space surrounding the "#".
15564 print prefix "define", macro P[macro] D[macro]
15565 next
15566 } else {
15567 # Replace #undef with comments. This is necessary, for example,
15568 # in the case of _POSIX_SOURCE, which is predefined and required
15569 # on some systems where configure will not decide to define it.
15570 if (defundef == "undef") {
15571 print "/*", prefix defundef, macro, "*/"
15572 next
15573 }
15574 }
15575}
15576{ print }
15577_ACAWK
15578_ACEOF
15579cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015580 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015581fi # test -n "$CONFIG_HEADERS"
15582
15583
15584eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15585shift
15586for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015587do
15588 case $ac_tag in
15589 :[FHLC]) ac_mode=$ac_tag; continue;;
15590 esac
15591 case $ac_mode$ac_tag in
15592 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020015593 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015594 :[FH]-) ac_tag=-:-;;
15595 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15596 esac
15597 ac_save_IFS=$IFS
15598 IFS=:
15599 set x $ac_tag
15600 IFS=$ac_save_IFS
15601 shift
15602 ac_file=$1
15603 shift
15604
15605 case $ac_mode in
15606 :L) ac_source=$1;;
15607 :[FH])
15608 ac_file_inputs=
15609 for ac_f
15610 do
15611 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020015612 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015613 *) # Look for the file first in the build tree, then in the source tree
15614 # (if the path is not absolute). The absolute path cannot be DOS-style,
15615 # because $ac_f cannot contain `:'.
15616 test -f "$ac_f" ||
15617 case $ac_f in
15618 [\\/$]*) false;;
15619 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15620 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020015621 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015622 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015623 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15624 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015625 done
15626
15627 # Let's still pretend it is `configure' which instantiates (i.e., don't
15628 # use $as_me), people would be surprised to read:
15629 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015630 configure_input='Generated from '`
15631 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15632 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015633 if test x"$ac_file" != x-; then
15634 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015635 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15636$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015637 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015638 # Neutralize special characters interpreted by sed in replacement strings.
15639 case $configure_input in #(
15640 *\&* | *\|* | *\\* )
15641 ac_sed_conf_input=`$as_echo "$configure_input" |
15642 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15643 *) ac_sed_conf_input=$configure_input;;
15644 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015645
15646 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020015647 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15648 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015649 esac
15650 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015651 esac
15652
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015653 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015654$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015655 X"$ac_file" : 'X\(//\)[^/]' \| \
15656 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015657 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015658$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015659 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15660 s//\1/
15661 q
15662 }
15663 /^X\(\/\/\)[^/].*/{
15664 s//\1/
15665 q
15666 }
15667 /^X\(\/\/\)$/{
15668 s//\1/
15669 q
15670 }
15671 /^X\(\/\).*/{
15672 s//\1/
15673 q
15674 }
15675 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015676 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015677 ac_builddir=.
15678
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015679case "$ac_dir" in
15680.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15681*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015682 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015683 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015684 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015685 case $ac_top_builddir_sub in
15686 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15687 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15688 esac ;;
15689esac
15690ac_abs_top_builddir=$ac_pwd
15691ac_abs_builddir=$ac_pwd$ac_dir_suffix
15692# for backward compatibility:
15693ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015694
15695case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015696 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015697 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015698 ac_top_srcdir=$ac_top_builddir_sub
15699 ac_abs_top_srcdir=$ac_pwd ;;
15700 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015701 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015702 ac_top_srcdir=$srcdir
15703 ac_abs_top_srcdir=$srcdir ;;
15704 *) # Relative name.
15705 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15706 ac_top_srcdir=$ac_top_build_prefix$srcdir
15707 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015708esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015709ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015710
Martin v. Löwis11437992002-04-12 09:54:03 +000015711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015712 case $ac_mode in
15713 :F)
15714 #
15715 # CONFIG_FILE
15716 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015717
15718 case $INSTALL in
15719 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015720 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015721 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010015722 ac_MKDIR_P=$MKDIR_P
15723 case $MKDIR_P in
15724 [\\/$]* | ?:[\\/]* ) ;;
15725 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15726 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015727_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015728
Matthias Kloseb9621712010-04-24 17:59:49 +000015729cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015730# If the template does not know about datarootdir, expand it.
15731# FIXME: This hack should be removed a few years after 2.60.
15732ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015733ac_sed_dataroot='
15734/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015735 p
15736 q
15737}
15738/@datadir@/p
15739/@docdir@/p
15740/@infodir@/p
15741/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015742/@mandir@/p'
15743case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015744*datarootdir*) ac_datarootdir_seen=yes;;
15745*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015746 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15747$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015749cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015750 ac_datarootdir_hack='
15751 s&@datadir@&$datadir&g
15752 s&@docdir@&$docdir&g
15753 s&@infodir@&$infodir&g
15754 s&@localedir@&$localedir&g
15755 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015756 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015757esac
15758_ACEOF
15759
15760# Neutralize VPATH when `$srcdir' = `.'.
15761# Shell code in configure.ac might set extrasub.
15762# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015763cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15764ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015765$extrasub
15766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015767cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015768:t
15769/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015770s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015771s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015772s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015773s&@srcdir@&$ac_srcdir&;t t
15774s&@abs_srcdir@&$ac_abs_srcdir&;t t
15775s&@top_srcdir@&$ac_top_srcdir&;t t
15776s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15777s&@builddir@&$ac_builddir&;t t
15778s&@abs_builddir@&$ac_abs_builddir&;t t
15779s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15780s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010015781s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015782$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015783"
Victor Stinnere0be4232011-10-25 13:06:09 +020015784eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15785 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015786
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015787test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015788 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15789 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15790 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015791 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015792which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015793$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015794which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015795
Victor Stinnere0be4232011-10-25 13:06:09 +020015796 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015797 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020015798 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15799 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015800 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015801 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015802 ;;
15803 :H)
15804 #
15805 # CONFIG_HEADER
15806 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015807 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015808 {
15809 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020015810 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15811 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015812 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015813 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015814 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15815$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015816 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015817 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020015818 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015819 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015820 fi
15821 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015822 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020015823 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015824 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015825 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015826 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015827
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015828
15829 esac
15830
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015831
15832 case $ac_file$ac_mode in
15833 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15834
15835 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015836done # for ac_tag
15837
Guido van Rossum627b2d71993-12-24 10:39:16 +000015838
Matthias Kloseb9621712010-04-24 17:59:49 +000015839as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015840_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015841ac_clean_files=$ac_clean_files_save
15842
Matthias Kloseb9621712010-04-24 17:59:49 +000015843test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015844 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015845
Martin v. Löwis11437992002-04-12 09:54:03 +000015846
15847# configure is writing to config.log, and then calls config.status.
15848# config.status does its own redirection, appending to config.log.
15849# Unfortunately, on DOS this fails, as config.log is still kept open
15850# by configure, so config.status won't be able to write to it; its
15851# output is simply discarded. So we exec the FD to /dev/null,
15852# effectively closing config.log, so it can be properly (re)opened and
15853# appended to by config.status. When coming back to configure, we
15854# need to make the FD available again.
15855if test "$no_create" != yes; then
15856 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015857 ac_config_status_args=
15858 test "$silent" = yes &&
15859 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015860 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015861 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015862 exec 5>>config.log
15863 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15864 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015865 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015866fi
15867if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15868 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15869$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015870fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015871
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015872
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015873echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015874if test ! -f Modules/Setup
15875then
15876 cp $srcdir/Modules/Setup.dist Modules/Setup
15877fi
15878
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015879echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015880if test ! -f Modules/Setup.local
15881then
15882 echo "# Edit this file for local setup changes" >Modules/Setup.local
15883fi
15884
15885echo "creating Makefile"
15886$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15887 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015888 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015889mv config.c Modules