blob: ae9edce2cb024882189f8b022f5b0fb3a578947e [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Georg Brandl1ca2e792011-03-05 20:51:24 +01002# From configure.in Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07004# Generated by GNU Autoconf 2.67 for python 3.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Kloseb9621712010-04-24 17:59:49 +00008#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
11# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000012#
13#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014# This configure script is free software; the Free Software Foundation
15# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000022if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000029else
Matthias Kloseb9621712010-04-24 17:59:49 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000037
38
Matthias Kloseb9621712010-04-24 17:59:49 +000039as_nl='
40'
41export as_nl
42# Printing a long string crashes Solaris 7 /usr/bin/printf.
43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46# Prefer a ksh shell builtin over an external printf program on Solaris,
47# but without wasting forks for bash or zsh.
48if test -z "$BASH_VERSION$ZSH_VERSION" \
49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='print -r --'
51 as_echo_n='print -rn --'
52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='printf %s\n'
54 as_echo_n='printf %s'
55else
56 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58 as_echo_n='/usr/ucb/echo -n'
59 else
60 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61 as_echo_n_body='eval
62 arg=$1;
63 case $arg in #(
64 *"$as_nl"*)
65 expr "X$arg" : "X\\(.*\\)$as_nl";
66 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 esac;
68 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 '
70 export as_echo_n_body
71 as_echo_n='sh -c $as_echo_n_body as_echo'
72 fi
73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
75fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000086
87# IFS
88# We need space, tab and new line, in precisely that order. Quoting is
89# there to prevent editors from complaining about space-tab.
90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
91# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000096 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000098for as_dir in $PATH
99do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000106 ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111 as_myself=$0
112fi
113if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000116fi
117
Matthias Kloseb9621712010-04-24 17:59:49 +0000118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there. '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000135
Matthias Kloseb9621712010-04-24 17:59:49 +0000136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141 emulate sh
142 NULLCMD=:
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
146 setopt NO_GLOB_SUBST
147else
148 case \`(set -o) 2>/dev/null\` in #(
149 *posix*) :
150 set -o posix ;; #(
151 *) :
152 ;;
153esac
154fi
155"
156 as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170 exitcode=1; echo positional parameters were not saved.
171fi
172test x\$exitcode = x0 || exit 1"
173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
179 as_have_required=yes
180else
181 as_have_required=no
182fi
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190 IFS=$as_save_IFS
191 test -z "$as_dir" && as_dir=.
192 as_found=:
193 case $as_dir in #(
194 /*)
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202 break 2
203fi
204fi
205 done;;
206 esac
207 as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216 if test "x$CONFIG_SHELL" != x; then :
217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
220 BASH_ENV=/dev/null
221 ENV=/dev/null
222 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
223 export CONFIG_SHELL
Benjamin Peterson316e02b2011-05-10 15:01:56 -0500224 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000225fi
226
227 if test x$as_have_required = xno; then :
228 $as_echo "$0: This script requires a shell more modern than all"
229 $as_echo "$0: the shells that I found on your system."
230 if test x${ZSH_VERSION+set} = xset ; then
231 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
232 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
233 else
234 $as_echo "$0: Please tell bug-autoconf@gnu.org and
235$0: http://bugs.python.org/ about your system, including
236$0: any error possibly output before this message. Then
237$0: install a modern shell, or manually run the script
238$0: under such a shell if you do have one."
239 fi
240 exit 1
241fi
242fi
243fi
244SHELL=${CONFIG_SHELL-/bin/sh}
245export SHELL
246# Unset more variables known to interfere with behavior of common tools.
247CLICOLOR_FORCE= GREP_OPTIONS=
248unset CLICOLOR_FORCE GREP_OPTIONS
249
250## --------------------- ##
251## M4sh Shell Functions. ##
252## --------------------- ##
253# as_fn_unset VAR
254# ---------------
255# Portably unset VAR.
256as_fn_unset ()
257{
258 { eval $1=; unset $1;}
259}
260as_unset=as_fn_unset
261
262# as_fn_set_status STATUS
263# -----------------------
264# Set $? to STATUS, without forking.
265as_fn_set_status ()
266{
267 return $1
268} # as_fn_set_status
269
270# as_fn_exit STATUS
271# -----------------
272# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
273as_fn_exit ()
274{
275 set +e
276 as_fn_set_status $1
277 exit $1
278} # as_fn_exit
279
280# as_fn_mkdir_p
281# -------------
282# Create "$as_dir" as a directory, including parents if necessary.
283as_fn_mkdir_p ()
284{
285
286 case $as_dir in #(
287 -*) as_dir=./$as_dir;;
288 esac
289 test -d "$as_dir" || eval $as_mkdir_p || {
290 as_dirs=
291 while :; do
292 case $as_dir in #(
293 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
294 *) as_qdir=$as_dir;;
295 esac
296 as_dirs="'$as_qdir' $as_dirs"
297 as_dir=`$as_dirname -- "$as_dir" ||
298$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
299 X"$as_dir" : 'X\(//\)[^/]' \| \
300 X"$as_dir" : 'X\(//\)$' \| \
301 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
302$as_echo X"$as_dir" |
303 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
304 s//\1/
305 q
306 }
307 /^X\(\/\/\)[^/].*/{
308 s//\1/
309 q
310 }
311 /^X\(\/\/\)$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\).*/{
316 s//\1/
317 q
318 }
319 s/.*/./; q'`
320 test -d "$as_dir" && break
321 done
322 test -z "$as_dirs" || eval "mkdir $as_dirs"
Gregory P. Smith5ed2e772011-05-15 00:26:45 -0700323 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000324
325
326} # as_fn_mkdir_p
327# as_fn_append VAR VALUE
328# ----------------------
329# Append the text in VALUE to the end of the definition contained in VAR. Take
330# advantage of any shell optimizations that allow amortized linear growth over
331# repeated appends, instead of the typical quadratic growth present in naive
332# implementations.
333if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
334 eval 'as_fn_append ()
335 {
336 eval $1+=\$2
337 }'
338else
339 as_fn_append ()
340 {
341 eval $1=\$$1\$2
342 }
343fi # as_fn_append
344
345# as_fn_arith ARG...
346# ------------------
347# Perform arithmetic evaluation on the ARGs, and store the result in the
348# global $as_val. Take advantage of shells that can avoid forks. The arguments
349# must be portable across $(()) and expr.
350if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
351 eval 'as_fn_arith ()
352 {
353 as_val=$(( $* ))
354 }'
355else
356 as_fn_arith ()
357 {
358 as_val=`expr "$@" || test $? -eq 1`
359 }
360fi # as_fn_arith
361
362
Gregory P. Smith5ed2e772011-05-15 00:26:45 -0700363# as_fn_error STATUS ERROR [LINENO LOG_FD]
364# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000365# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
366# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Gregory P. Smith5ed2e772011-05-15 00:26:45 -0700367# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000368as_fn_error ()
369{
Gregory P. Smith5ed2e772011-05-15 00:26:45 -0700370 as_status=$1; test $as_status -eq 0 && as_status=1
371 if test "$4"; then
372 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
373 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000374 fi
Gregory P. Smith5ed2e772011-05-15 00:26:45 -0700375 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000376 as_fn_exit $as_status
377} # as_fn_error
378
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000379if expr a : '\(a\)' >/dev/null 2>&1 &&
380 test "X`expr 00001 : '.*\(...\)'`" = X001; then
381 as_expr=expr
382else
383 as_expr=false
384fi
385
386if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
387 as_basename=basename
388else
389 as_basename=false
390fi
391
Matthias Kloseb9621712010-04-24 17:59:49 +0000392if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
393 as_dirname=dirname
394else
395 as_dirname=false
396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000397
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000398as_me=`$as_basename -- "$0" ||
399$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
400 X"$0" : 'X\(//\)$' \| \
401 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000402$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000403 sed '/^.*\/\([^/][^/]*\)\/*$/{
404 s//\1/
405 q
406 }
407 /^X\/\(\/\/\)$/{
408 s//\1/
409 q
410 }
411 /^X\/\(\/\).*/{
412 s//\1/
413 q
414 }
415 s/.*/./; q'`
416
Matthias Kloseb9621712010-04-24 17:59:49 +0000417# Avoid depending upon Character Ranges.
418as_cr_letters='abcdefghijklmnopqrstuvwxyz'
419as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
420as_cr_Letters=$as_cr_letters$as_cr_LETTERS
421as_cr_digits='0123456789'
422as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000423
424
Matthias Kloseb9621712010-04-24 17:59:49 +0000425 as_lineno_1=$LINENO as_lineno_1a=$LINENO
426 as_lineno_2=$LINENO as_lineno_2a=$LINENO
427 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
428 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
429 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000430 sed -n '
431 p
432 /[$]LINENO/=
433 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000434 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000435 s/[$]LINENO.*/&-/
436 t lineno
437 b
438 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000439 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440 :loop
441 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000443 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000444 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000445 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000446 { $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 +0000447
448 # Don't try to exec as it changes $[0], causing all sort of problems
449 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000450 # original and so on. Autoconf is especially sensitive to this).
451 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 # Exit status is that of the last command.
453 exit
454}
455
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000457case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000458-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000459 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000460 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000461 xy) ECHO_C='\c';;
462 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
463 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000464 esac;;
465*)
466 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000467esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000468
Martin v. Löwis11437992002-04-12 09:54:03 +0000469rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000470if test -d conf$$.dir; then
471 rm -f conf$$.dir/conf$$.file
472else
473 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000474 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000475fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000476if (echo >conf$$.file) 2>/dev/null; then
477 if ln -s conf$$.file conf$$ 2>/dev/null; then
478 as_ln_s='ln -s'
479 # ... but there are two gotchas:
480 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
481 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
482 # In both cases, we have to default to `cp -p'.
483 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
484 as_ln_s='cp -p'
485 elif ln conf$$.file conf$$ 2>/dev/null; then
486 as_ln_s=ln
487 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000490else
491 as_ln_s='cp -p'
492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000493rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
494rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000495
Skip Montanaro6dead952003-09-25 14:50:04 +0000496if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000497 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000498else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000499 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000500 as_mkdir_p=false
501fi
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503if test -x / >/dev/null 2>&1; then
504 as_test_x='test -x'
505else
506 if ls -dL / >/dev/null 2>&1; then
507 as_ls_L_option=L
508 else
509 as_ls_L_option=
510 fi
511 as_test_x='
512 eval sh -c '\''
513 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000514 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000515 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000516 case $1 in #(
517 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000518 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000519 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000520 ???[sx]*):;;*)false;;esac;fi
521 '\'' sh
522 '
523fi
524as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000525
526# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000527as_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 +0000528
529# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000530as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000531
532
Matthias Kloseb9621712010-04-24 17:59:49 +0000533test -n "$DJDIR" || exec 7<&0 </dev/null
534exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000535
536# Name of the host.
Gregory P. Smith5ed2e772011-05-15 00:26:45 -0700537# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000538# so uname gets run too.
539ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
540
Martin v. Löwis11437992002-04-12 09:54:03 +0000541#
542# Initializations.
543#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000545ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000546ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000547LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000548cross_compiling=no
549subdirs=
550MFLAGS=
551MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
Martin v. Löwis11437992002-04-12 09:54:03 +0000553# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000554PACKAGE_NAME='python'
555PACKAGE_TARNAME='python'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000556PACKAGE_VERSION='3.3'
557PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000558PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000559PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000560
561ac_unique_file="Include/object.h"
562# Factoring default headers for most tests.
563ac_includes_default="\
564#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000565#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# include <sys/types.h>
567#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000569# include <sys/stat.h>
570#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000571#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000572# include <stdlib.h>
573# include <stddef.h>
574#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <stdlib.h>
577# endif
578#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000579#ifdef HAVE_STRING_H
580# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# include <memory.h>
582# endif
583# include <string.h>
584#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000585#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000586# include <strings.h>
587#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000588#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000590#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000591#ifdef HAVE_STDINT_H
592# include <stdint.h>
593#endif
594#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000595# include <unistd.h>
596#endif"
597
Matthias Kloseb9621712010-04-24 17:59:49 +0000598ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000599SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000600THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000601SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000602LIBC
603LIBM
604HAVE_GETHOSTBYNAME
605HAVE_GETHOSTBYNAME_R
606HAVE_GETHOSTBYNAME_R_3_ARG
607HAVE_GETHOSTBYNAME_R_5_ARG
608HAVE_GETHOSTBYNAME_R_6_ARG
609LIBOBJS
610TRUE
611MACHDEP_OBJS
612DYNLOADFILE
613DLINCLDIR
614THREADOBJ
615LDLAST
616USE_THREAD_MODULE
617SIGNAL_OBJS
618USE_SIGNAL_MODULE
619LIBFFI_INCLUDEDIR
620PKG_CONFIG
621SHLIBS
622CFLAGSFORSHARED
623LINKFORSHARED
624CCSHARED
625BLDSHARED
626LDCXXSHARED
627LDSHARED
628SO
629LIBTOOL_CRUFT
630OTHER_LIBTOOL_OPT
631UNIVERSAL_ARCH_FLAGS
632BASECFLAGS
633OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000634ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000635LN
636INSTALL_DATA
637INSTALL_SCRIPT
638INSTALL_PROGRAM
Georg Brandl1ca2e792011-03-05 20:51:24 +0100639HAS_HG
640HGBRANCH
641HGTAG
642HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000643ARFLAGS
644AR
645RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000646USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000647GNULD
648LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000649LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000650RUNSHARED
651INSTSONAME
652LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000653PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000654BLDLIBRARY
655DLLLIBRARY
656LDLIBRARY
657LIBRARY
658BUILDEXEEXT
659EGREP
660GREP
661CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200662NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000663MAINCC
664CXX
665OBJEXT
666EXEEXT
667ac_ct_CC
668CPPFLAGS
669LDFLAGS
670CFLAGS
671CC
672EXPORT_MACOSX_DEPLOYMENT_TARGET
673CONFIGURE_MACOSX_DEPLOYMENT_TARGET
674SGI_ABI
675MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000676FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000677FRAMEWORKUNIXTOOLSPREFIX
678FRAMEWORKALTINSTALLLAST
679FRAMEWORKALTINSTALLFIRST
680FRAMEWORKINSTALLLAST
681FRAMEWORKINSTALLFIRST
682PYTHONFRAMEWORKINSTALLDIR
683PYTHONFRAMEWORKPREFIX
684PYTHONFRAMEWORKDIR
685PYTHONFRAMEWORKIDENTIFIER
686PYTHONFRAMEWORK
687LIPO_32BIT_FLAGS
688ARCH_RUN_32BIT
689UNIVERSALSDK
690CONFIG_ARGS
691SOVERSION
692VERSION
693target_alias
694host_alias
695build_alias
696LIBS
697ECHO_T
698ECHO_N
699ECHO_C
700DEFS
701mandir
702localedir
703libdir
704psdir
705pdfdir
706dvidir
707htmldir
708infodir
709docdir
710oldincludedir
711includedir
712localstatedir
713sharedstatedir
714sysconfdir
715datadir
716datarootdir
717libexecdir
718sbindir
719bindir
720program_transform_name
721prefix
722exec_prefix
723PACKAGE_URL
724PACKAGE_BUGREPORT
725PACKAGE_STRING
726PACKAGE_VERSION
727PACKAGE_TARNAME
728PACKAGE_NAME
729PATH_SEPARATOR
730SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000731ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000732ac_user_opts='
733enable_option_checking
734enable_universalsdk
735with_universal_archs
736with_framework_name
737enable_framework
738with_gcc
739with_cxx_main
740with_suffix
741enable_shared
742enable_profiling
743with_pydebug
744with_libs
745with_system_expat
746with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000747enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000748with_dbmliborder
749with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000750with_threads
751with_thread
752enable_ipv6
753with_doc_strings
754with_tsc
755with_pymalloc
756with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000757with_fpectl
758with_libm
759with_libc
760enable_big_digits
761with_wide_unicode
762with_computed_gotos
763'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000764 ac_precious_vars='build_alias
765host_alias
766target_alias
767CC
768CFLAGS
769LDFLAGS
770LIBS
771CPPFLAGS
Ross Lagerwall7807c352011-03-17 20:20:30 +0200772CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000773
Guido van Rossum627b2d71993-12-24 10:39:16 +0000774
Guido van Rossum7f43da71994-08-01 12:15:30 +0000775# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000776ac_init_help=
777ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000778ac_unrecognized_opts=
779ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000780# The variables have the same names as the options, with
781# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000782cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000783exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000785no_recursion=
786prefix=NONE
787program_prefix=NONE
788program_suffix=NONE
789program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000790silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000791site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000792srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794x_includes=NONE
795x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000796
797# Installation directory options.
798# These are left unexpanded so users can "make install exec_prefix=/foo"
799# and all the variables that are supposed to be based on exec_prefix
800# by default will actually change.
801# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000802# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000803bindir='${exec_prefix}/bin'
804sbindir='${exec_prefix}/sbin'
805libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000806datarootdir='${prefix}/share'
807datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000808sysconfdir='${prefix}/etc'
809sharedstatedir='${prefix}/com'
810localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000811includedir='${prefix}/include'
812oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000813docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
814infodir='${datarootdir}/info'
815htmldir='${docdir}'
816dvidir='${docdir}'
817pdfdir='${docdir}'
818psdir='${docdir}'
819libdir='${exec_prefix}/lib'
820localedir='${datarootdir}/locale'
821mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000822
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000824ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000826do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827 # If the previous option needs an argument, assign it.
828 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000829 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830 ac_prev=
831 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000832 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000834 case $ac_option in
Gregory P. Smith5ed2e772011-05-15 00:26:45 -0700835 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
836 *=) ac_optarg= ;;
837 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840 # Accept the important Cygnus configure options, so we can diagnose typos.
841
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 case $ac_dashdash$ac_option in
843 --)
844 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000846 -bindir | --bindir | --bindi | --bind | --bin | --bi)
847 ac_prev=bindir ;;
848 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000849 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000850
851 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000852 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000853 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000856 -cache-file | --cache-file | --cache-fil | --cache-fi \
857 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
858 ac_prev=cache_file ;;
859 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
860 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 cache_file=$ac_optarg ;;
862
863 --config-cache | -C)
864 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000866 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000867 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000868 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000869 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000870
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000871 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
872 | --dataroo | --dataro | --datar)
873 ac_prev=datarootdir ;;
874 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
875 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
876 datarootdir=$ac_optarg ;;
877
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000879 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000881 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Gregory P. Smith5ed2e772011-05-15 00:26:45 -0700882 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000883 ac_useropt_orig=$ac_useropt
884 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
885 case $ac_user_opts in
886 *"
887"enable_$ac_useropt"
888"*) ;;
889 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
890 ac_unrecognized_sep=', ';;
891 esac
892 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893
894 -docdir | --docdir | --docdi | --doc | --do)
895 ac_prev=docdir ;;
896 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
897 docdir=$ac_optarg ;;
898
899 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
900 ac_prev=dvidir ;;
901 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
902 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903
904 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000905 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000906 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000907 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Gregory P. Smith5ed2e772011-05-15 00:26:45 -0700908 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000909 ac_useropt_orig=$ac_useropt
910 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
911 case $ac_user_opts in
912 *"
913"enable_$ac_useropt"
914"*) ;;
915 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
916 ac_unrecognized_sep=', ';;
917 esac
918 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
921 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
922 | --exec | --exe | --ex)
923 ac_prev=exec_prefix ;;
924 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
925 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
926 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
929 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930 # Obsolete; use --with-gas.
931 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 -help | --help | --hel | --he | -h)
934 ac_init_help=long ;;
935 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
936 ac_init_help=recursive ;;
937 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
938 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
940 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
946 ac_prev=htmldir ;;
947 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
948 | --ht=*)
949 htmldir=$ac_optarg ;;
950
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951 -includedir | --includedir | --includedi | --included | --include \
952 | --includ | --inclu | --incl | --inc)
953 ac_prev=includedir ;;
954 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
955 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
958 -infodir | --infodir | --infodi | --infod | --info | --inf)
959 ac_prev=infodir ;;
960 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962
963 -libdir | --libdir | --libdi | --libd)
964 ac_prev=libdir ;;
965 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967
968 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
969 | --libexe | --libex | --libe)
970 ac_prev=libexecdir ;;
971 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
972 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000974
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000975 -localedir | --localedir | --localedi | --localed | --locale)
976 ac_prev=localedir ;;
977 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
978 localedir=$ac_optarg ;;
979
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000980 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000981 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982 ac_prev=localstatedir ;;
983 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000984 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000986
987 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
988 ac_prev=mandir ;;
989 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993 # Obsolete; use --without-fp.
994 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995
996 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998 no_create=yes ;;
999
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001000 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1001 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1002 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1005 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1006 | --oldin | --oldi | --old | --ol | --o)
1007 ac_prev=oldincludedir ;;
1008 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1009 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1010 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1014 ac_prev=prefix ;;
1015 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1019 | --program-pre | --program-pr | --program-p)
1020 ac_prev=program_prefix ;;
1021 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1022 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
1025 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1026 | --program-suf | --program-su | --program-s)
1027 ac_prev=program_suffix ;;
1028 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1029 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031
1032 -program-transform-name | --program-transform-name \
1033 | --program-transform-nam | --program-transform-na \
1034 | --program-transform-n | --program-transform- \
1035 | --program-transform | --program-transfor \
1036 | --program-transfo | --program-transf \
1037 | --program-trans | --program-tran \
1038 | --progr-tra | --program-tr | --program-t)
1039 ac_prev=program_transform_name ;;
1040 -program-transform-name=* | --program-transform-name=* \
1041 | --program-transform-nam=* | --program-transform-na=* \
1042 | --program-transform-n=* | --program-transform-=* \
1043 | --program-transform=* | --program-transfor=* \
1044 | --program-transfo=* | --program-transf=* \
1045 | --program-trans=* | --program-tran=* \
1046 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001049 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1050 ac_prev=pdfdir ;;
1051 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1052 pdfdir=$ac_optarg ;;
1053
1054 -psdir | --psdir | --psdi | --psd | --ps)
1055 ac_prev=psdir ;;
1056 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1057 psdir=$ac_optarg ;;
1058
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1060 | -silent | --silent | --silen | --sile | --sil)
1061 silent=yes ;;
1062
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1064 ac_prev=sbindir ;;
1065 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1066 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068
1069 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1070 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1071 | --sharedst | --shareds | --shared | --share | --shar \
1072 | --sha | --sh)
1073 ac_prev=sharedstatedir ;;
1074 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1075 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1076 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1077 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 -site | --site | --sit)
1081 ac_prev=site ;;
1082 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1086 ac_prev=srcdir ;;
1087 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1091 | --syscon | --sysco | --sysc | --sys | --sy)
1092 ac_prev=sysconfdir ;;
1093 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1094 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001096
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
1102 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1103 verbose=yes ;;
1104
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 -version | --version | --versio | --versi | --vers | -V)
1106 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
1108 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001109 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001110 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001111 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001112 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001113 ac_useropt_orig=$ac_useropt
1114 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1115 case $ac_user_opts in
1116 *"
1117"with_$ac_useropt"
1118"*) ;;
1119 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1120 ac_unrecognized_sep=', ';;
1121 esac
1122 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123
1124 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001125 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001126 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001127 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001128 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001129 ac_useropt_orig=$ac_useropt
1130 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1131 case $ac_user_opts in
1132 *"
1133"with_$ac_useropt"
1134"*) ;;
1135 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1136 ac_unrecognized_sep=', ';;
1137 esac
1138 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140 --x)
1141 # Obsolete; use --with-x.
1142 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143
1144 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1145 | --x-incl | --x-inc | --x-in | --x-i)
1146 ac_prev=x_includes ;;
1147 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1148 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150
1151 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1152 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1153 ac_prev=x_libraries ;;
1154 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1155 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001158 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1159Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001160 ;;
1161
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 *=*)
1163 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1164 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001165 case $ac_envvar in #(
1166 '' | [0-9]* | *[!_$as_cr_alnum]* )
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001167 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001168 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001169 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 export $ac_envvar ;;
1171
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001172 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001174 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001176 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001177 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178 ;;
1179
1180 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001181done
1182
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001185 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186fi
1187
Matthias Kloseb9621712010-04-24 17:59:49 +00001188if test -n "$ac_unrecognized_opts"; then
1189 case $enable_option_checking in
1190 no) ;;
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001191 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001192 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1193 esac
1194fi
1195
1196# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001197for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1198 datadir sysconfdir sharedstatedir localstatedir includedir \
1199 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1200 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001202 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 # Remove trailing slashes.
1204 case $ac_val in
1205 */ )
1206 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1207 eval $ac_var=\$ac_val;;
1208 esac
1209 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001210 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001211 [\\/$]* | ?:[\\/]* ) continue;;
1212 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001213 esac
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001214 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001215done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001216
Martin v. Löwis11437992002-04-12 09:54:03 +00001217# There might be people who depend on the old broken behavior: `$host'
1218# used to hold the argument of --host etc.
1219# FIXME: To remove some day.
1220build=$build_alias
1221host=$host_alias
1222target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001223
Martin v. Löwis11437992002-04-12 09:54:03 +00001224# FIXME: To remove some day.
1225if test "x$host_alias" != x; then
1226 if test "x$build_alias" = x; then
1227 cross_compiling=maybe
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001228 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1229 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001230 elif test "x$build_alias" != "x$host_alias"; then
1231 cross_compiling=yes
1232 fi
1233fi
1234
1235ac_tool_prefix=
1236test -n "$host_alias" && ac_tool_prefix=$host_alias-
1237
1238test "$silent" = yes && exec 6>/dev/null
1239
Guido van Rossum627b2d71993-12-24 10:39:16 +00001240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001241ac_pwd=`pwd` && test -n "$ac_pwd" &&
1242ac_ls_di=`ls -di .` &&
1243ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001244 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001245test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001246 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001247
1248
Guido van Rossum627b2d71993-12-24 10:39:16 +00001249# Find the source files, if location was not specified.
1250if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001252 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 ac_confdir=`$as_dirname -- "$as_myself" ||
1254$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1255 X"$as_myself" : 'X\(//\)[^/]' \| \
1256 X"$as_myself" : 'X\(//\)$' \| \
1257 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1258$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001259 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1260 s//\1/
1261 q
1262 }
1263 /^X\(\/\/\)[^/].*/{
1264 s//\1/
1265 q
1266 }
1267 /^X\(\/\/\)$/{
1268 s//\1/
1269 q
1270 }
1271 /^X\(\/\).*/{
1272 s//\1/
1273 q
1274 }
1275 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278 srcdir=..
1279 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001280else
1281 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283if test ! -r "$srcdir/$ac_unique_file"; then
1284 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001285 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001286fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001287ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1288ac_abs_confdir=`(
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001289 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290 pwd)`
1291# When building in place, set srcdir=.
1292if test "$ac_abs_confdir" = "$ac_pwd"; then
1293 srcdir=.
1294fi
1295# Remove unnecessary trailing slashes from srcdir.
1296# Double slashes in file names in object file debugging info
1297# mess up M-x gdb in Emacs.
1298case $srcdir in
1299*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1300esac
1301for ac_var in $ac_precious_vars; do
1302 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1303 eval ac_env_${ac_var}_value=\$${ac_var}
1304 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1305 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1306done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001307
Martin v. Löwis11437992002-04-12 09:54:03 +00001308#
1309# Report the --help message.
1310#
1311if test "$ac_init_help" = "long"; then
1312 # Omit some internal or obsolete options to make the list less imposing.
1313 # This message is too long to be a string in the A/UX 3.1 sh.
1314 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001315\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001316
1317Usage: $0 [OPTION]... [VAR=VALUE]...
1318
1319To assign environment variables (e.g., CC, CFLAGS...), specify them as
1320VAR=VALUE. See below for descriptions of some of the useful variables.
1321
1322Defaults for the options are specified in brackets.
1323
1324Configuration:
1325 -h, --help display this help and exit
1326 --help=short display options specific to this package
1327 --help=recursive display the short help of all the included packages
1328 -V, --version display version information and exit
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001329 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001330 --cache-file=FILE cache test results in FILE [disabled]
1331 -C, --config-cache alias for \`--cache-file=config.cache'
1332 -n, --no-create do not create output files
1333 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1334
Martin v. Löwis11437992002-04-12 09:54:03 +00001335Installation directories:
1336 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001337 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001338 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001339 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001340
1341By default, \`make install' will install all the files in
1342\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1343an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1344for instance \`--prefix=\$HOME'.
1345
1346For better control, use the options below.
1347
1348Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001349 --bindir=DIR user executables [EPREFIX/bin]
1350 --sbindir=DIR system admin executables [EPREFIX/sbin]
1351 --libexecdir=DIR program executables [EPREFIX/libexec]
1352 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1353 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1354 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1355 --libdir=DIR object code libraries [EPREFIX/lib]
1356 --includedir=DIR C header files [PREFIX/include]
1357 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1358 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1359 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1360 --infodir=DIR info documentation [DATAROOTDIR/info]
1361 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1362 --mandir=DIR man documentation [DATAROOTDIR/man]
1363 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1364 --htmldir=DIR html documentation [DOCDIR]
1365 --dvidir=DIR dvi documentation [DOCDIR]
1366 --pdfdir=DIR pdf documentation [DOCDIR]
1367 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001368_ACEOF
1369
1370 cat <<\_ACEOF
1371_ACEOF
1372fi
1373
1374if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001375 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001376 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001377 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 cat <<\_ACEOF
1379
1380Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001381 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1383 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001384 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001385 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001386 --enable-framework[=INSTALLDIR]
1387 Build (MacOSX|Darwin) framework
1388 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001389 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001390 --enable-loadable-sqlite-extensions
1391 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001392 --enable-ipv6 Enable ipv6 (with ipv4) support
1393 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001394 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001395 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001396
1397Optional Packages:
1398 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1399 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001400 --with-universal-archs=ARCH
1401 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001402 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001403 --with-framework-name=FRAMEWORK
1404 specify an alternate name of the framework built
1405 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001406 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001407 --with-cxx-main=<compiler>
1408 compile main() and link python executable with C++
1409 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001410 --with-suffix=.exe set executable suffix
1411 --with-pydebug build with Py_DEBUG defined
1412 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001413 --with-system-expat build pyexpat module using an installed expat
1414 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001415 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001416 --with-dbmliborder=db1:db2:...
1417 order to check db backends for dbm. Valid value is a
1418 colon separated string with the backend names
1419 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001420 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001421 --with(out)-threads[=DIRECTORY]
1422 disable/enable thread support
1423 --with(out)-thread[=DIRECTORY]
1424 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001425 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001426 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001427 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001428 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001429 --with-fpectl enable SIGFPE catching
1430 --with-libm=STRING math library
1431 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001432 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001433 --with(out)-computed-gotos
1434 Use computed gotos in evaluation loop (enabled by
1435 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001436
1437Some influential environment variables:
1438 CC C compiler command
1439 CFLAGS C compiler flags
1440 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1441 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001442 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001443 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001444 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001445 CPP C preprocessor
1446
1447Use these variables to override the choices made by `configure' or to help
1448it to find libraries and programs with nonstandard names/locations.
1449
Georg Brandle2e15612009-05-20 18:25:10 +00001450Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001451_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001452ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001453fi
1454
1455if test "$ac_init_help" = "recursive"; then
1456 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001457 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001458 test -d "$ac_dir" ||
1459 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1460 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001461 ac_builddir=.
1462
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001463case "$ac_dir" in
1464.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1465*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001466 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001467 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001468 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001469 case $ac_top_builddir_sub in
1470 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1471 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1472 esac ;;
1473esac
1474ac_abs_top_builddir=$ac_pwd
1475ac_abs_builddir=$ac_pwd$ac_dir_suffix
1476# for backward compatibility:
1477ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001478
1479case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001480 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001481 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001482 ac_top_srcdir=$ac_top_builddir_sub
1483 ac_abs_top_srcdir=$ac_pwd ;;
1484 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001485 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001486 ac_top_srcdir=$srcdir
1487 ac_abs_top_srcdir=$srcdir ;;
1488 *) # Relative name.
1489 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1490 ac_top_srcdir=$ac_top_build_prefix$srcdir
1491 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001492esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001493ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001494
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001495 cd "$ac_dir" || { ac_status=$?; continue; }
1496 # Check for guested configure.
1497 if test -f "$ac_srcdir/configure.gnu"; then
1498 echo &&
1499 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1500 elif test -f "$ac_srcdir/configure"; then
1501 echo &&
1502 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001503 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001504 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001505 fi || ac_status=$?
1506 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001507 done
1508fi
1509
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001510test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001511if $ac_init_version; then
1512 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001513python configure 3.3
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001514generated by GNU Autoconf 2.67
Martin v. Löwis11437992002-04-12 09:54:03 +00001515
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001516Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001517This configure script is free software; the Free Software Foundation
1518gives unlimited permission to copy, distribute and modify it.
1519_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001520 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001522
1523## ------------------------ ##
1524## Autoconf initialization. ##
1525## ------------------------ ##
1526
1527# ac_fn_c_try_compile LINENO
1528# --------------------------
1529# Try to compile conftest.$ac_ext, and return whether this succeeded.
1530ac_fn_c_try_compile ()
1531{
1532 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1533 rm -f conftest.$ac_objext
1534 if { { ac_try="$ac_compile"
1535case "(($ac_try" in
1536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1537 *) ac_try_echo=$ac_try;;
1538esac
1539eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1540$as_echo "$ac_try_echo"; } >&5
1541 (eval "$ac_compile") 2>conftest.err
1542 ac_status=$?
1543 if test -s conftest.err; then
1544 grep -v '^ *+' conftest.err >conftest.er1
1545 cat conftest.er1 >&5
1546 mv -f conftest.er1 conftest.err
1547 fi
1548 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1549 test $ac_status = 0; } && {
1550 test -z "$ac_c_werror_flag" ||
1551 test ! -s conftest.err
1552 } && test -s conftest.$ac_objext; then :
1553 ac_retval=0
1554else
1555 $as_echo "$as_me: failed program was:" >&5
1556sed 's/^/| /' conftest.$ac_ext >&5
1557
1558 ac_retval=1
1559fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001560 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001561 as_fn_set_status $ac_retval
1562
1563} # ac_fn_c_try_compile
1564
Matthias Kloseb9621712010-04-24 17:59:49 +00001565# ac_fn_c_try_link LINENO
1566# -----------------------
1567# Try to link conftest.$ac_ext, and return whether this succeeded.
1568ac_fn_c_try_link ()
1569{
1570 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1571 rm -f conftest.$ac_objext conftest$ac_exeext
1572 if { { ac_try="$ac_link"
1573case "(($ac_try" in
1574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1575 *) ac_try_echo=$ac_try;;
1576esac
1577eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1578$as_echo "$ac_try_echo"; } >&5
1579 (eval "$ac_link") 2>conftest.err
1580 ac_status=$?
1581 if test -s conftest.err; then
1582 grep -v '^ *+' conftest.err >conftest.er1
1583 cat conftest.er1 >&5
1584 mv -f conftest.er1 conftest.err
1585 fi
1586 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1587 test $ac_status = 0; } && {
1588 test -z "$ac_c_werror_flag" ||
1589 test ! -s conftest.err
1590 } && test -s conftest$ac_exeext && {
1591 test "$cross_compiling" = yes ||
1592 $as_test_x conftest$ac_exeext
1593 }; 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
1601 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1602 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1603 # interfere with the next link command; also delete a directory that is
1604 # left behind by Apple's compiler. We do this before executing the actions.
1605 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001606 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001607 as_fn_set_status $ac_retval
1608
1609} # ac_fn_c_try_link
1610
Matthias Kloseb9621712010-04-24 17:59:49 +00001611# ac_fn_c_try_cpp LINENO
1612# ----------------------
1613# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1614ac_fn_c_try_cpp ()
1615{
1616 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1617 if { { ac_try="$ac_cpp conftest.$ac_ext"
1618case "(($ac_try" in
1619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1620 *) ac_try_echo=$ac_try;;
1621esac
1622eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1623$as_echo "$ac_try_echo"; } >&5
1624 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1625 ac_status=$?
1626 if test -s conftest.err; then
1627 grep -v '^ *+' conftest.err >conftest.er1
1628 cat conftest.er1 >&5
1629 mv -f conftest.er1 conftest.err
1630 fi
1631 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001632 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001633 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1634 test ! -s conftest.err
1635 }; then :
1636 ac_retval=0
1637else
1638 $as_echo "$as_me: failed program was:" >&5
1639sed 's/^/| /' conftest.$ac_ext >&5
1640
1641 ac_retval=1
1642fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001643 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001644 as_fn_set_status $ac_retval
1645
1646} # ac_fn_c_try_cpp
1647
1648# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1649# -------------------------------------------------------
1650# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1651# the include files in INCLUDES and setting the cache variable VAR
1652# accordingly.
1653ac_fn_c_check_header_mongrel ()
1654{
1655 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001656 if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1658$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001659if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001660 $as_echo_n "(cached) " >&6
1661fi
1662eval ac_res=\$$3
1663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1664$as_echo "$ac_res" >&6; }
1665else
1666 # Is the header compilable?
1667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1668$as_echo_n "checking $2 usability... " >&6; }
1669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1670/* end confdefs.h. */
1671$4
1672#include <$2>
1673_ACEOF
1674if ac_fn_c_try_compile "$LINENO"; then :
1675 ac_header_compiler=yes
1676else
1677 ac_header_compiler=no
1678fi
1679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1681$as_echo "$ac_header_compiler" >&6; }
1682
1683# Is the header present?
1684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1685$as_echo_n "checking $2 presence... " >&6; }
1686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1687/* end confdefs.h. */
1688#include <$2>
1689_ACEOF
1690if ac_fn_c_try_cpp "$LINENO"; then :
1691 ac_header_preproc=yes
1692else
1693 ac_header_preproc=no
1694fi
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001695rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1697$as_echo "$ac_header_preproc" >&6; }
1698
1699# So? What about this header?
1700case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1701 yes:no: )
1702 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1703$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1704 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1705$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1706 ;;
1707 no:yes:* )
1708 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1709$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1710 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1711$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1712 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1713$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1714 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1715$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1716 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1717$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001718( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001719## Report this to http://bugs.python.org/ ##
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001720## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001721 ) | sed "s/^/$as_me: WARNING: /" >&2
1722 ;;
1723esac
1724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1725$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001726if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001727 $as_echo_n "(cached) " >&6
1728else
1729 eval "$3=\$ac_header_compiler"
1730fi
1731eval ac_res=\$$3
1732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1733$as_echo "$ac_res" >&6; }
1734fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001735 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001736
1737} # ac_fn_c_check_header_mongrel
1738
1739# ac_fn_c_try_run LINENO
1740# ----------------------
1741# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1742# that executables *can* be run.
1743ac_fn_c_try_run ()
1744{
1745 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1746 if { { ac_try="$ac_link"
1747case "(($ac_try" in
1748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1749 *) ac_try_echo=$ac_try;;
1750esac
1751eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1752$as_echo "$ac_try_echo"; } >&5
1753 (eval "$ac_link") 2>&5
1754 ac_status=$?
1755 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1756 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1757 { { case "(($ac_try" in
1758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1759 *) ac_try_echo=$ac_try;;
1760esac
1761eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1762$as_echo "$ac_try_echo"; } >&5
1763 (eval "$ac_try") 2>&5
1764 ac_status=$?
1765 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1766 test $ac_status = 0; }; }; then :
1767 ac_retval=0
1768else
1769 $as_echo "$as_me: program exited with status $ac_status" >&5
1770 $as_echo "$as_me: failed program was:" >&5
1771sed 's/^/| /' conftest.$ac_ext >&5
1772
1773 ac_retval=$ac_status
1774fi
1775 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001776 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001777 as_fn_set_status $ac_retval
1778
1779} # ac_fn_c_try_run
1780
1781# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1782# -------------------------------------------------------
1783# Tests whether HEADER exists and can be compiled using the include files in
1784# INCLUDES, setting the cache variable VAR accordingly.
1785ac_fn_c_check_header_compile ()
1786{
1787 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1789$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001790if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001791 $as_echo_n "(cached) " >&6
1792else
1793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1794/* end confdefs.h. */
1795$4
1796#include <$2>
1797_ACEOF
1798if ac_fn_c_try_compile "$LINENO"; then :
1799 eval "$3=yes"
1800else
1801 eval "$3=no"
1802fi
1803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1804fi
1805eval ac_res=\$$3
1806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1807$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001808 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001809
1810} # ac_fn_c_check_header_compile
1811
Matthias Kloseb9621712010-04-24 17:59:49 +00001812# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1813# -------------------------------------------
1814# Tests whether TYPE exists after having included INCLUDES, setting cache
1815# variable VAR accordingly.
1816ac_fn_c_check_type ()
1817{
1818 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1820$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001821if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001822 $as_echo_n "(cached) " >&6
1823else
1824 eval "$3=no"
1825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1826/* end confdefs.h. */
1827$4
1828int
1829main ()
1830{
1831if (sizeof ($2))
1832 return 0;
1833 ;
1834 return 0;
1835}
1836_ACEOF
1837if ac_fn_c_try_compile "$LINENO"; then :
1838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1839/* end confdefs.h. */
1840$4
1841int
1842main ()
1843{
1844if (sizeof (($2)))
1845 return 0;
1846 ;
1847 return 0;
1848}
1849_ACEOF
1850if ac_fn_c_try_compile "$LINENO"; then :
1851
1852else
1853 eval "$3=yes"
1854fi
1855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1856fi
1857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1858fi
1859eval ac_res=\$$3
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1861$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001862 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001863
1864} # ac_fn_c_check_type
1865
1866# ac_fn_c_find_uintX_t LINENO BITS VAR
1867# ------------------------------------
1868# Finds an unsigned integer type with width BITS, setting cache variable VAR
1869# accordingly.
1870ac_fn_c_find_uintX_t ()
1871{
1872 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1874$as_echo_n "checking for uint$2_t... " >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001875if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001876 $as_echo_n "(cached) " >&6
1877else
1878 eval "$3=no"
1879 # Order is important - never check a type that is potentially smaller
1880 # than half of the expected target width.
1881 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1882 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1884/* end confdefs.h. */
1885$ac_includes_default
1886int
1887main ()
1888{
1889static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1890test_array [0] = 0
1891
1892 ;
1893 return 0;
1894}
1895_ACEOF
1896if ac_fn_c_try_compile "$LINENO"; then :
1897 case $ac_type in #(
1898 uint$2_t) :
1899 eval "$3=yes" ;; #(
1900 *) :
1901 eval "$3=\$ac_type" ;;
1902esac
1903fi
1904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001905 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001906
1907else
1908 break
1909fi
1910 done
1911fi
1912eval ac_res=\$$3
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1914$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001915 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001916
1917} # ac_fn_c_find_uintX_t
1918
1919# ac_fn_c_find_intX_t LINENO BITS VAR
1920# -----------------------------------
1921# Finds a signed integer type with width BITS, setting cache variable VAR
1922# accordingly.
1923ac_fn_c_find_intX_t ()
1924{
1925 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1927$as_echo_n "checking for int$2_t... " >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001928if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001929 $as_echo_n "(cached) " >&6
1930else
1931 eval "$3=no"
1932 # Order is important - never check a type that is potentially smaller
1933 # than half of the expected target width.
1934 for ac_type in int$2_t 'int' 'long int' \
1935 'long long int' 'short int' 'signed char'; do
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001939 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001940int
1941main ()
1942{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001943static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001944test_array [0] = 0
1945
1946 ;
1947 return 0;
1948}
1949_ACEOF
1950if ac_fn_c_try_compile "$LINENO"; then :
1951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1952/* end confdefs.h. */
1953$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001954 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001955int
1956main ()
1957{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001958static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001959 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1960test_array [0] = 0
1961
1962 ;
1963 return 0;
1964}
1965_ACEOF
1966if ac_fn_c_try_compile "$LINENO"; then :
1967
1968else
1969 case $ac_type in #(
1970 int$2_t) :
1971 eval "$3=yes" ;; #(
1972 *) :
1973 eval "$3=\$ac_type" ;;
1974esac
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977fi
1978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001979 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001980
1981else
1982 break
1983fi
1984 done
1985fi
1986eval ac_res=\$$3
1987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1988$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001989 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001990
1991} # ac_fn_c_find_intX_t
1992
1993# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1994# --------------------------------------------
1995# Tries to find the compile-time value of EXPR in a program that includes
1996# INCLUDES, setting VAR accordingly. Returns whether the value could be
1997# computed
1998ac_fn_c_compute_int ()
1999{
2000 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2001 if test "$cross_compiling" = yes; then
2002 # Depending upon the size, compute the lo and hi bounds.
2003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2004/* end confdefs.h. */
2005$4
2006int
2007main ()
2008{
2009static int test_array [1 - 2 * !(($2) >= 0)];
2010test_array [0] = 0
2011
2012 ;
2013 return 0;
2014}
2015_ACEOF
2016if ac_fn_c_try_compile "$LINENO"; then :
2017 ac_lo=0 ac_mid=0
2018 while :; do
2019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2020/* end confdefs.h. */
2021$4
2022int
2023main ()
2024{
2025static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2026test_array [0] = 0
2027
2028 ;
2029 return 0;
2030}
2031_ACEOF
2032if ac_fn_c_try_compile "$LINENO"; then :
2033 ac_hi=$ac_mid; break
2034else
2035 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2036 if test $ac_lo -le $ac_mid; then
2037 ac_lo= ac_hi=
2038 break
2039 fi
2040 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2041fi
2042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2043 done
2044else
2045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2046/* end confdefs.h. */
2047$4
2048int
2049main ()
2050{
2051static int test_array [1 - 2 * !(($2) < 0)];
2052test_array [0] = 0
2053
2054 ;
2055 return 0;
2056}
2057_ACEOF
2058if ac_fn_c_try_compile "$LINENO"; then :
2059 ac_hi=-1 ac_mid=-1
2060 while :; do
2061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2062/* end confdefs.h. */
2063$4
2064int
2065main ()
2066{
2067static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2068test_array [0] = 0
2069
2070 ;
2071 return 0;
2072}
2073_ACEOF
2074if ac_fn_c_try_compile "$LINENO"; then :
2075 ac_lo=$ac_mid; break
2076else
2077 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2078 if test $ac_mid -le $ac_hi; then
2079 ac_lo= ac_hi=
2080 break
2081 fi
2082 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085 done
2086else
2087 ac_lo= ac_hi=
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090fi
2091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2092# Binary search between lo and hi bounds.
2093while test "x$ac_lo" != "x$ac_hi"; do
2094 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2096/* end confdefs.h. */
2097$4
2098int
2099main ()
2100{
2101static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2102test_array [0] = 0
2103
2104 ;
2105 return 0;
2106}
2107_ACEOF
2108if ac_fn_c_try_compile "$LINENO"; then :
2109 ac_hi=$ac_mid
2110else
2111 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2112fi
2113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2114done
2115case $ac_lo in #((
2116?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2117'') ac_retval=1 ;;
2118esac
2119 else
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123static long int longval () { return $2; }
2124static unsigned long int ulongval () { return $2; }
2125#include <stdio.h>
2126#include <stdlib.h>
2127int
2128main ()
2129{
2130
2131 FILE *f = fopen ("conftest.val", "w");
2132 if (! f)
2133 return 1;
2134 if (($2) < 0)
2135 {
2136 long int i = longval ();
2137 if (i != ($2))
2138 return 1;
2139 fprintf (f, "%ld", i);
2140 }
2141 else
2142 {
2143 unsigned long int i = ulongval ();
2144 if (i != ($2))
2145 return 1;
2146 fprintf (f, "%lu", i);
2147 }
2148 /* Do not output a trailing newline, as this causes \r\n confusion
2149 on some platforms. */
2150 return ferror (f) || fclose (f) != 0;
2151
2152 ;
2153 return 0;
2154}
2155_ACEOF
2156if ac_fn_c_try_run "$LINENO"; then :
2157 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2158else
2159 ac_retval=1
2160fi
2161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2162 conftest.$ac_objext conftest.beam conftest.$ac_ext
2163rm -f conftest.val
2164
2165 fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002166 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002167 as_fn_set_status $ac_retval
2168
2169} # ac_fn_c_compute_int
2170
2171# ac_fn_c_check_func LINENO FUNC VAR
2172# ----------------------------------
2173# Tests whether FUNC exists, setting the cache variable VAR accordingly
2174ac_fn_c_check_func ()
2175{
2176 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2178$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002179if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002180 $as_echo_n "(cached) " >&6
2181else
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183/* end confdefs.h. */
2184/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2185 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2186#define $2 innocuous_$2
2187
2188/* System header to define __stub macros and hopefully few prototypes,
2189 which can conflict with char $2 (); below.
2190 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2191 <limits.h> exists even on freestanding compilers. */
2192
2193#ifdef __STDC__
2194# include <limits.h>
2195#else
2196# include <assert.h>
2197#endif
2198
2199#undef $2
2200
2201/* Override any GCC internal prototype to avoid an error.
2202 Use char because int might match the return type of a GCC
2203 builtin and then its argument prototype would still apply. */
2204#ifdef __cplusplus
2205extern "C"
2206#endif
2207char $2 ();
2208/* The GNU C library defines this for functions which it implements
2209 to always fail with ENOSYS. Some functions are actually named
2210 something starting with __ and the normal name is an alias. */
2211#if defined __stub_$2 || defined __stub___$2
2212choke me
2213#endif
2214
2215int
2216main ()
2217{
2218return $2 ();
2219 ;
2220 return 0;
2221}
2222_ACEOF
2223if ac_fn_c_try_link "$LINENO"; then :
2224 eval "$3=yes"
2225else
2226 eval "$3=no"
2227fi
2228rm -f core conftest.err conftest.$ac_objext \
2229 conftest$ac_exeext conftest.$ac_ext
2230fi
2231eval ac_res=\$$3
2232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2233$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002234 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002235
2236} # ac_fn_c_check_func
2237
2238# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2239# ----------------------------------------------------
2240# Tries to find if the field MEMBER exists in type AGGR, after including
2241# INCLUDES, setting cache variable VAR accordingly.
2242ac_fn_c_check_member ()
2243{
2244 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2246$as_echo_n "checking for $2.$3... " >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002247if eval "test \"\${$4+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002248 $as_echo_n "(cached) " >&6
2249else
2250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2251/* end confdefs.h. */
2252$5
2253int
2254main ()
2255{
2256static $2 ac_aggr;
2257if (ac_aggr.$3)
2258return 0;
2259 ;
2260 return 0;
2261}
2262_ACEOF
2263if ac_fn_c_try_compile "$LINENO"; then :
2264 eval "$4=yes"
2265else
2266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2267/* end confdefs.h. */
2268$5
2269int
2270main ()
2271{
2272static $2 ac_aggr;
2273if (sizeof ac_aggr.$3)
2274return 0;
2275 ;
2276 return 0;
2277}
2278_ACEOF
2279if ac_fn_c_try_compile "$LINENO"; then :
2280 eval "$4=yes"
2281else
2282 eval "$4=no"
2283fi
2284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2285fi
2286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2287fi
2288eval ac_res=\$$4
2289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2290$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002291 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002292
2293} # ac_fn_c_check_member
2294
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002295# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2296# ---------------------------------------------
2297# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2298# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002299ac_fn_c_check_decl ()
2300{
2301 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002302 as_decl_name=`echo $2|sed 's/ *(.*//'`
2303 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2305$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2306if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002307 $as_echo_n "(cached) " >&6
2308else
2309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310/* end confdefs.h. */
2311$4
2312int
2313main ()
2314{
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002315#ifndef $as_decl_name
2316#ifdef __cplusplus
2317 (void) $as_decl_use;
2318#else
2319 (void) $as_decl_name;
2320#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002321#endif
2322
2323 ;
2324 return 0;
2325}
2326_ACEOF
2327if ac_fn_c_try_compile "$LINENO"; then :
2328 eval "$3=yes"
2329else
2330 eval "$3=no"
2331fi
2332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333fi
2334eval ac_res=\$$3
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2336$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002337 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002338
2339} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002340cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002341This file contains any messages produced by compilers while
2342running configure, to aid debugging if configure makes a mistake.
2343
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002344It was created by python $as_me 3.3, which was
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002345generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002346
2347 $ $0 $@
2348
2349_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002350exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002351{
2352cat <<_ASUNAME
2353## --------- ##
2354## Platform. ##
2355## --------- ##
2356
2357hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2358uname -m = `(uname -m) 2>/dev/null || echo unknown`
2359uname -r = `(uname -r) 2>/dev/null || echo unknown`
2360uname -s = `(uname -s) 2>/dev/null || echo unknown`
2361uname -v = `(uname -v) 2>/dev/null || echo unknown`
2362
2363/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2364/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2365
2366/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2367/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2368/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002369/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002370/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2371/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2372/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2373
2374_ASUNAME
2375
2376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2377for as_dir in $PATH
2378do
2379 IFS=$as_save_IFS
2380 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002381 $as_echo "PATH: $as_dir"
2382 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002383IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002384
2385} >&5
2386
2387cat >&5 <<_ACEOF
2388
2389
2390## ----------- ##
2391## Core tests. ##
2392## ----------- ##
2393
2394_ACEOF
2395
2396
2397# Keep a trace of the command line.
2398# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002399# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002400# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002401# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002402ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002403ac_configure_args0=
2404ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002405ac_must_keep_next=false
2406for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002407do
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 for ac_arg
2409 do
2410 case $ac_arg in
2411 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2412 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2413 | -silent | --silent | --silen | --sile | --sil)
2414 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002415 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002416 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 esac
2418 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002419 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002421 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002423 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002425 case $ac_arg in
2426 *=* | --config-cache | -C | -disable-* | --disable-* \
2427 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2428 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2429 | -with-* | --with-* | -without-* | --without-* | --x)
2430 case "$ac_configure_args0 " in
2431 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2432 esac
2433 ;;
2434 -* ) ac_must_keep_next=true ;;
2435 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002437 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002438 ;;
2439 esac
2440 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002441done
Matthias Kloseb9621712010-04-24 17:59:49 +00002442{ ac_configure_args0=; unset ac_configure_args0;}
2443{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002444
2445# When interrupted or exit'd, cleanup temporary files, and complete
2446# config.log. We remove comments because anyway the quotes in there
2447# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448# WARNING: Use '\'' to represent an apostrophe within the trap.
2449# 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 +00002450trap 'exit_status=$?
2451 # Save into config.log some information that might help in debugging.
2452 {
2453 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002454
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002455 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002456## Cache variables. ##
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002457## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002458 echo
2459 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002460(
2461 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2462 eval ac_val=\$$ac_var
2463 case $ac_val in #(
2464 *${as_nl}*)
2465 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002466 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2467$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 esac
2469 case $ac_var in #(
2470 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002471 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2472 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 esac ;;
2474 esac
2475 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002476 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2478 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 "s/'\''/'\''\\\\'\'''\''/g;
2481 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2482 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002483 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002485 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 esac |
2487 sort
2488)
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002490
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002491 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002492## Output variables. ##
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002493## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 echo
2495 for ac_var in $ac_subst_vars
2496 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 eval ac_val=\$$ac_var
2498 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002501 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 done | sort
2503 echo
2504
2505 if test -n "$ac_subst_files"; then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002506 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507## File substitutions. ##
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002508## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 echo
2510 for ac_var in $ac_subst_files
2511 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 eval ac_val=\$$ac_var
2513 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 done | sort
2518 echo
2519 fi
2520
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 if test -s confdefs.h; then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002522 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002523## confdefs.h. ##
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002524## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 echo
2528 fi
2529 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 $as_echo "$as_me: caught signal $ac_signal"
2531 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 rm -f core *.core core.conftest.* &&
2534 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002537for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002538 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002539done
2540ac_signal=0
2541
2542# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002544
Matthias Kloseb9621712010-04-24 17:59:49 +00002545$as_echo "/* confdefs.h */" > confdefs.h
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547# Predefined preprocessor variables.
2548
2549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_NAME "$PACKAGE_NAME"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_VERSION "$PACKAGE_VERSION"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_STRING "$PACKAGE_STRING"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2567_ACEOF
2568
Matthias Kloseb9621712010-04-24 17:59:49 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_URL "$PACKAGE_URL"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573
2574# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002575# Prefer an explicitly selected file to automatically selected ones.
2576ac_site_file1=NONE
2577ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578if test -n "$CONFIG_SITE"; then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002579 # We do not want a PATH search for config.site.
2580 case $CONFIG_SITE in #((
2581 -*) ac_site_file1=./$CONFIG_SITE;;
2582 */*) ac_site_file1=$CONFIG_SITE;;
2583 *) ac_site_file1=./$CONFIG_SITE;;
2584 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 ac_site_file1=$prefix/share/config.site
2587 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588else
Matthias Kloseb9621712010-04-24 17:59:49 +00002589 ac_site_file1=$ac_default_prefix/share/config.site
2590 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002592for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593do
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 test "x$ac_site_file" = xNONE && continue
2595 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2597$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 sed 's/^/| /' "$ac_site_file" >&5
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002599 . "$ac_site_file" \
2600 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2602as_fn_error $? "failed to load site script $ac_site_file
2603See \`config.log' for more details" "$LINENO" 5 ; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002604 fi
2605done
2606
2607if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 # Some versions of bash will fail to source /dev/null (special files
2609 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2610 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2611 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2612$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2615 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 esac
2617 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002618else
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2620$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 >$cache_file
2622fi
2623
2624# Check that the precious variables saved in the cache have kept the same
2625# value.
2626ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2629 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002630 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2631 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 case $ac_old_set,$ac_new_set in
2633 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2635$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 +00002636 ac_cache_corrupted=: ;;
2637 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2639$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 ac_cache_corrupted=: ;;
2641 ,);;
2642 *)
2643 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 # differences in whitespace do not lead to failure.
2645 ac_old_val_w=`echo x $ac_old_val`
2646 ac_new_val_w=`echo x $ac_new_val`
2647 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2649$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2650 ac_cache_corrupted=:
2651 else
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2653$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2654 eval $ac_var=\$ac_old_val
2655 fi
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2657$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2659$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 fi;;
2661 esac
2662 # Pass precious variables to config.status.
2663 if test "$ac_new_set" = set; then
2664 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002665 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 *) ac_arg=$ac_var=$ac_new_val ;;
2667 esac
2668 case " $ac_configure_args " in
2669 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002670 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 esac
2672 fi
2673done
2674if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2677 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2678$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002679 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002681## -------------------- ##
2682## Main body of script. ##
2683## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684
Guido van Rossum7f43da71994-08-01 12:15:30 +00002685ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002687ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2688ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2689ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002690
Guido van Rossum627b2d71993-12-24 10:39:16 +00002691
Michael W. Hudson54241132001-12-07 15:38:26 +00002692
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002693ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002694
2695
Martin v. Löwis11437992002-04-12 09:54:03 +00002696
Benjamin Petersond23f8222009-04-05 19:13:16 +00002697if test "$prefix" != "/"; then
2698 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2699fi
2700
2701
Martin v. Löwis11437992002-04-12 09:54:03 +00002702
2703
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002704# We don't use PACKAGE_ variables, and they cause conflicts
2705# with other autoconf-based packages that include Python.h
2706grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2707rm confdefs.h
2708mv confdefs.h.new confdefs.h
2709
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002710
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002711VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002712
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002713# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002714
2715SOVERSION=1.0
2716
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002717# The later defininition of _XOPEN_SOURCE disables certain features
2718# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2719
Matthias Kloseb9621712010-04-24 17:59:49 +00002720$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002721
2722
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002723# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2724# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2725# them.
2726
Matthias Kloseb9621712010-04-24 17:59:49 +00002727$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002728
2729
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002730# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2731# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2732# them.
2733
Matthias Kloseb9621712010-04-24 17:59:49 +00002734$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002735
2736
Martin v. Löwisd6320502004-08-12 13:45:08 +00002737# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2738# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2739
Matthias Kloseb9621712010-04-24 17:59:49 +00002740$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002741
2742
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002743# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2744# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2745# them.
2746
Matthias Kloseb9621712010-04-24 17:59:49 +00002747$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002748
2749
2750
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002751define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002752
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002753# Arguments passed to configure.
2754
2755CONFIG_ARGS="$ac_configure_args"
2756
Matthias Kloseb9621712010-04-24 17:59:49 +00002757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2758$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002759# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002760if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002761 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002762 case $enableval in
2763 yes)
2764 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002765 if test ! -d "${enableval}"
2766 then
2767 enableval=/
2768 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002769 ;;
2770 esac
2771 case $enableval in
2772 no)
2773 UNIVERSALSDK=
2774 enable_universalsdk=
2775 ;;
2776 *)
2777 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002778 if test ! -d "${UNIVERSALSDK}"
2779 then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002780 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002781 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002782 ;;
2783 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002784
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002785
Thomas Wouters477c8d52006-05-27 19:21:47 +00002786else
2787
2788 UNIVERSALSDK=
2789 enable_universalsdk=
2790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002791fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002792
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002793if test -n "${UNIVERSALSDK}"
2794then
Matthias Kloseb9621712010-04-24 17:59:49 +00002795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2796$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002797else
Matthias Kloseb9621712010-04-24 17:59:49 +00002798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2799$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002800fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002802
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002803
2804
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002805UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002806
Matthias Kloseb9621712010-04-24 17:59:49 +00002807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2808$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002809
2810# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002811if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002812 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2814$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002815 UNIVERSAL_ARCHS="$withval"
2816
2817else
2818
Matthias Kloseb9621712010-04-24 17:59:49 +00002819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2820$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002821
2822fi
2823
2824
2825
2826
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002827
2828# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002829if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002830 withval=$with_framework_name;
2831 PYTHONFRAMEWORK=${withval}
2832 PYTHONFRAMEWORKDIR=${withval}.framework
2833 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2834
2835else
2836
2837 PYTHONFRAMEWORK=Python
2838 PYTHONFRAMEWORKDIR=Python.framework
2839 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2840
2841fi
2842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002843# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002844if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002845 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002846 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002847 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002848 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002849 esac
2850 case $enableval in
2851 no)
2852 PYTHONFRAMEWORK=
2853 PYTHONFRAMEWORKDIR=no-framework
2854 PYTHONFRAMEWORKPREFIX=
2855 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002856 FRAMEWORKINSTALLFIRST=
2857 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002858 FRAMEWORKALTINSTALLFIRST=
2859 FRAMEWORKALTINSTALLLAST=
2860 if test "x${prefix}" = "xNONE"; then
2861 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2862 else
2863 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2864 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002865 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002866 ;;
2867 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002868 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002869 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002870 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002871 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002872 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2873 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002874 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002875
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002876 if test "x${prefix}" = "xNONE" ; then
2877 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002878
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002879 else
2880 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2881 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002882
2883 case "${enableval}" in
2884 /System*)
2885 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2886 if test "${prefix}" = "NONE" ; then
2887 # See below
2888 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2889 fi
2890 ;;
2891
2892 /Library*)
2893 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2894 ;;
2895
2896 */Library/Frameworks)
2897 MDIR="`dirname "${enableval}"`"
2898 MDIR="`dirname "${MDIR}"`"
2899 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2900
2901 if test "${prefix}" = "NONE"; then
2902 # User hasn't specified the
2903 # --prefix option, but wants to install
2904 # the framework in a non-default location,
2905 # ensure that the compatibility links get
2906 # installed relative to that prefix as well
2907 # instead of in /usr/local.
2908 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2909 fi
2910 ;;
2911
2912 *)
2913 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2914 ;;
2915 esac
2916
Jack Jansen127e56e2001-09-11 14:41:54 +00002917 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002918
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002919 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002920 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002921 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002922
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002923 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002924
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002925 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2926
2927 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2928
Jack Jansene578a632001-08-15 01:27:14 +00002929 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002930
Guido van Rossum563e7081996-09-10 18:20:48 +00002931else
Martin v. Löwis11437992002-04-12 09:54:03 +00002932
Jack Jansene578a632001-08-15 01:27:14 +00002933 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002934 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002935 PYTHONFRAMEWORKPREFIX=
2936 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002937 FRAMEWORKINSTALLFIRST=
2938 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002939 FRAMEWORKALTINSTALLFIRST=
2940 FRAMEWORKALTINSTALLLAST=
2941 if test "x${prefix}" = "xNONE" ; then
2942 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2943 else
2944 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2945 fi
Jack Jansene578a632001-08-15 01:27:14 +00002946 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002947
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002948
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002949fi
2950
Thomas Wouters477c8d52006-05-27 19:21:47 +00002951
2952
Michael W. Hudson54241132001-12-07 15:38:26 +00002953
2954
2955
2956
Jack Jansene578a632001-08-15 01:27:14 +00002957
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002958
2959
2960
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002961
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002962
Jack Jansene578a632001-08-15 01:27:14 +00002963##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002964## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002965## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002966##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002967# Set name for machine-dependent library files
2968
Matthias Kloseb9621712010-04-24 17:59:49 +00002969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2970$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002971if test -z "$MACHDEP"
2972then
Guido van Rossum563e7081996-09-10 18:20:48 +00002973 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002974 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002975 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002976 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002977 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002978 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002979 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002980 ac_md_system=`echo $ac_sys_system |
2981 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2982 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002983 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002984 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002985
Guido van Rossum07397971997-04-29 21:49:50 +00002986 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002987 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002988 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002989 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002990 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002991 esac
2992fi
Guido van Rossum91922671997-10-09 20:24:13 +00002993
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002994# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2995# disable features if it is defined, without any means to access these
2996# features as extensions. For these systems, we skip the definition of
2997# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2998# some feature, make sure there is no alternative way to access this
2999# feature. Also, when using wildcards, make sure you have verified the
3000# need for not defining _XOPEN_SOURCE on all systems matching the
3001# wildcard, and that the wildcard does not include future systems
3002# (which may remove their limitations).
3003case $ac_sys_system/$ac_sys_release in
3004 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3005 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003006 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003007 # In addition, Stefan Krah confirms that issue #1244610 exists through
3008 # OpenBSD 4.6, but is fixed in 4.7.
3009 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003010 define_xopen_source=no
3011 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3012 # also defined. This can be overridden by defining _BSD_SOURCE
3013 # As this has a different meaning on Linux, only define it on OpenBSD
3014
Matthias Kloseb9621712010-04-24 17:59:49 +00003015$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003016
3017 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003018 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003019 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3020 # also defined. This can be overridden by defining _BSD_SOURCE
3021 # As this has a different meaning on Linux, only define it on OpenBSD
3022
Matthias Kloseb9621712010-04-24 17:59:49 +00003023$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003024
3025 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003026 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3027 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3028 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003029 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 +00003030 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003031 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3032 # request to enable features supported by the standard as a request
3033 # to disable features not supported by the standard. The best way
3034 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3035 # entirely and define __EXTENSIONS__ instead.
3036 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003037 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003038 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3039 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003040 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003041 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003042 define_xopen_source=no;;
3043 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003044 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003045 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003046 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003047 # On FreeBSD 4, the math functions C89 does not cover are never defined
3048 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3049 FreeBSD/4.*)
3050 define_xopen_source=no;;
3051 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3052 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3053 # identifies itself as Darwin/7.*
3054 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3055 # disables platform specific features beyond repair.
3056 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3057 # has no effect, don't bother defining them
3058 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003059 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003060 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003061 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003062 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3063 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3064 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003065 AIX/4)
3066 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003067 AIX/5)
3068 if test `uname -r` -eq 1; then
3069 define_xopen_source=no
3070 fi
3071 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003072 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3073 # defining NI_NUMERICHOST.
3074 QNX/6.3.2)
3075 define_xopen_source=no
3076 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003077
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003078esac
3079
3080if test $define_xopen_source = yes
3081then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003082
Matthias Kloseb9621712010-04-24 17:59:49 +00003083$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003084
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003085
3086 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3087 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3088 # several APIs are not declared. Since this is also needed in some
3089 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003090
Matthias Kloseb9621712010-04-24 17:59:49 +00003091$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003092
3093
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003094
Matthias Kloseb9621712010-04-24 17:59:49 +00003095$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003096
3097
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003098fi
3099
Guido van Rossum91922671997-10-09 20:24:13 +00003100#
3101# SGI compilers allow the specification of the both the ABI and the
3102# ISA on the command line. Depending on the values of these switches,
3103# different and often incompatable code will be generated.
3104#
3105# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3106# thus supply support for various ABI/ISA combinations. The MACHDEP
3107# variable is also adjusted.
3108#
3109
3110if test ! -z "$SGI_ABI"
3111then
3112 CC="cc $SGI_ABI"
3113 LDFLAGS="$SGI_ABI $LDFLAGS"
3114 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3117$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003118
Jack Jansen6b08a402004-06-03 12:41:45 +00003119# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3120# it may influence the way we can build extensions, so distutils
3121# needs to check it
3122
Thomas Wouters477c8d52006-05-27 19:21:47 +00003123
Jack Jansen6b08a402004-06-03 12:41:45 +00003124CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003125EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003126
Matthias Kloseb9621712010-04-24 17:59:49 +00003127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3128$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003129ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3131$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003132
Guido van Rossum627b2d71993-12-24 10:39:16 +00003133# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003134
3135# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3136# for debug/optimization stuff. BASECFLAGS is for flags that are required
3137# just to get things to compile and link. Users are free to override OPT
3138# when running configure or make. The build should not break if they do.
3139# BASECFLAGS should generally not be messed with, however.
3140
3141# XXX shouldn't some/most/all of this code be merged with the stuff later
3142# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3144$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003145
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003146# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003147if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003148 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003149 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003150 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003151 without_gcc=yes;;
3152 yes) CC=gcc
3153 without_gcc=no;;
3154 *) CC=$withval
3155 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003156 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003157else
Martin v. Löwis11437992002-04-12 09:54:03 +00003158
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003159 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003160 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003161 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003162 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003163 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003164fi
3165
Matthias Kloseb9621712010-04-24 17:59:49 +00003166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3167$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003168
Guido van Rossum8b131c51995-03-09 14:10:13 +00003169# If the user switches compilers, we can't believe the cache
3170if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3171then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07003172 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003173(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003174fi
3175
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003176# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3177# when the compiler supports them, but we don't always want -O2, and
3178# we set -g later.
3179if test -z "$CFLAGS"; then
3180 CFLAGS=
3181fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003182ac_ext=c
3183ac_cpp='$CPP $CPPFLAGS'
3184ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3185ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3186ac_compiler_gnu=$ac_cv_c_compiler_gnu
3187if test -n "$ac_tool_prefix"; then
3188 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3189set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3191$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003192if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003193 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003194else
3195 if test -n "$CC"; then
3196 ac_cv_prog_CC="$CC" # Let the user override the test.
3197else
Martin v. Löwis11437992002-04-12 09:54:03 +00003198as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3199for as_dir in $PATH
3200do
3201 IFS=$as_save_IFS
3202 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003203 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003204 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003205 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003206 $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 +00003207 break 2
3208 fi
3209done
Matthias Kloseb9621712010-04-24 17:59:49 +00003210 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003211IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003212
Jack Jansendd19cf82001-12-06 22:36:17 +00003213fi
3214fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003215CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003216if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3218$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003219else
Matthias Kloseb9621712010-04-24 17:59:49 +00003220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3221$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003222fi
3223
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003224
Martin v. Löwis11437992002-04-12 09:54:03 +00003225fi
3226if test -z "$ac_cv_prog_CC"; then
3227 ac_ct_CC=$CC
3228 # Extract the first word of "gcc", so it can be a program name with args.
3229set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3231$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003232if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003233 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003234else
3235 if test -n "$ac_ct_CC"; then
3236 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3237else
3238as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3239for as_dir in $PATH
3240do
3241 IFS=$as_save_IFS
3242 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003243 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003244 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003245 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003246 $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 +00003247 break 2
3248 fi
3249done
Matthias Kloseb9621712010-04-24 17:59:49 +00003250 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003251IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003252
3253fi
3254fi
3255ac_ct_CC=$ac_cv_prog_ac_ct_CC
3256if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3258$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003259else
Matthias Kloseb9621712010-04-24 17:59:49 +00003260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3261$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003262fi
3263
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003264 if test "x$ac_ct_CC" = x; then
3265 CC=""
3266 else
3267 case $cross_compiling:$ac_tool_warned in
3268yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003269{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3270$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003271ac_tool_warned=yes ;;
3272esac
3273 CC=$ac_ct_CC
3274 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003275else
3276 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003277fi
3278
Jack Jansendd19cf82001-12-06 22:36:17 +00003279if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003280 if test -n "$ac_tool_prefix"; then
3281 # 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 +00003282set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3284$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003285if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003286 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003287else
3288 if test -n "$CC"; then
3289 ac_cv_prog_CC="$CC" # Let the user override the test.
3290else
Martin v. Löwis11437992002-04-12 09:54:03 +00003291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3292for as_dir in $PATH
3293do
3294 IFS=$as_save_IFS
3295 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003296 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003297 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003298 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003299 $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 +00003300 break 2
3301 fi
3302done
Matthias Kloseb9621712010-04-24 17:59:49 +00003303 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003304IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003305
3306fi
3307fi
3308CC=$ac_cv_prog_CC
3309if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3311$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003312else
Matthias Kloseb9621712010-04-24 17:59:49 +00003313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3314$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003315fi
3316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003317
Martin v. Löwis11437992002-04-12 09:54:03 +00003318 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003319fi
3320if test -z "$CC"; then
3321 # Extract the first word of "cc", so it can be a program name with args.
3322set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3324$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003325if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003326 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003327else
3328 if test -n "$CC"; then
3329 ac_cv_prog_CC="$CC" # Let the user override the test.
3330else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003331 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3333for as_dir in $PATH
3334do
3335 IFS=$as_save_IFS
3336 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003337 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003338 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003339 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3340 ac_prog_rejected=yes
3341 continue
3342 fi
3343 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003344 $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 +00003345 break 2
3346 fi
3347done
Matthias Kloseb9621712010-04-24 17:59:49 +00003348 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003349IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003350
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003351if test $ac_prog_rejected = yes; then
3352 # We found a bogon in the path, so make sure we never use it.
3353 set dummy $ac_cv_prog_CC
3354 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003355 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003356 # We chose a different compiler from the bogus one.
3357 # However, it has the same basename, so the bogon will be chosen
3358 # first if we set CC to just the basename; use the full file name.
3359 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003360 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003361 fi
3362fi
3363fi
3364fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003365CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003366if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3368$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003369else
Matthias Kloseb9621712010-04-24 17:59:49 +00003370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3371$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003372fi
3373
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003374
Martin v. Löwis11437992002-04-12 09:54:03 +00003375fi
3376if test -z "$CC"; then
3377 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003378 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003379 do
3380 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3381set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3383$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003384if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003385 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003386else
3387 if test -n "$CC"; then
3388 ac_cv_prog_CC="$CC" # Let the user override the test.
3389else
Martin v. Löwis11437992002-04-12 09:54:03 +00003390as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3391for as_dir in $PATH
3392do
3393 IFS=$as_save_IFS
3394 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003395 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003396 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003397 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003398 $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 +00003399 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003400 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003401done
Matthias Kloseb9621712010-04-24 17:59:49 +00003402 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003403IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003404
3405fi
3406fi
3407CC=$ac_cv_prog_CC
3408if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3410$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003411else
Matthias Kloseb9621712010-04-24 17:59:49 +00003412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3413$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003414fi
3415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003416
Martin v. Löwis11437992002-04-12 09:54:03 +00003417 test -n "$CC" && break
3418 done
3419fi
3420if test -z "$CC"; then
3421 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003422 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003423do
3424 # Extract the first word of "$ac_prog", so it can be a program name with args.
3425set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3427$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003428if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003429 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003430else
3431 if test -n "$ac_ct_CC"; then
3432 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3433else
3434as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3435for as_dir in $PATH
3436do
3437 IFS=$as_save_IFS
3438 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003439 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003440 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003441 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003442 $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 +00003443 break 2
3444 fi
3445done
Matthias Kloseb9621712010-04-24 17:59:49 +00003446 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003447IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003448
Martin v. Löwis11437992002-04-12 09:54:03 +00003449fi
3450fi
3451ac_ct_CC=$ac_cv_prog_ac_ct_CC
3452if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3454$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003455else
Matthias Kloseb9621712010-04-24 17:59:49 +00003456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3457$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003458fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003459
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003460
Martin v. Löwis11437992002-04-12 09:54:03 +00003461 test -n "$ac_ct_CC" && break
3462done
Michael W. Hudson54241132001-12-07 15:38:26 +00003463
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003464 if test "x$ac_ct_CC" = x; then
3465 CC=""
3466 else
3467 case $cross_compiling:$ac_tool_warned in
3468yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003469{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3470$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003471ac_tool_warned=yes ;;
3472esac
3473 CC=$ac_ct_CC
3474 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003475fi
3476
3477fi
3478
3479
Matthias Kloseb9621712010-04-24 17:59:49 +00003480test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3481$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07003482as_fn_error $? "no acceptable C compiler found in \$PATH
3483See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003484
3485# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003486$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3487set X $ac_compile
3488ac_compiler=$2
3489for ac_option in --version -v -V -qversion; do
3490 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003491case "(($ac_try" in
3492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3493 *) ac_try_echo=$ac_try;;
3494esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003495eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3496$as_echo "$ac_try_echo"; } >&5
3497 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003498 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003499 if test -s conftest.err; then
3500 sed '10a\
3501... rest of stderr output deleted ...
3502 10q' conftest.err >conftest.er1
3503 cat conftest.er1 >&5
3504 fi
3505 rm -f conftest.er1 conftest.err
3506 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3507 test $ac_status = 0; }
3508done
Martin v. Löwis11437992002-04-12 09:54:03 +00003509
Matthias Kloseb9621712010-04-24 17:59:49 +00003510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003511/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003512
Martin v. Löwis11437992002-04-12 09:54:03 +00003513int
3514main ()
3515{
3516
3517 ;
3518 return 0;
3519}
3520_ACEOF
3521ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003522ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003523# Try to create an executable without -o first, disregard a.out.
3524# It will help us diagnose broken compilers, and finding out an intuition
3525# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3527$as_echo_n "checking whether the C compiler works... " >&6; }
3528ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3529
3530# The possible output files:
3531ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3532
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003533ac_rmfiles=
3534for ac_file in $ac_files
3535do
3536 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003537 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003538 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3539 esac
3540done
3541rm -f $ac_rmfiles
3542
Matthias Kloseb9621712010-04-24 17:59:49 +00003543if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003544case "(($ac_try" in
3545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3546 *) ac_try_echo=$ac_try;;
3547esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003548eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3549$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003550 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003551 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003552 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3553 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003554 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3555# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3556# in a Makefile. We should not override ac_cv_exeext if it was cached,
3557# so that the user can short-circuit this test for compilers unknown to
3558# Autoconf.
3559for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003560do
3561 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003562 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003563 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003564 ;;
3565 [ab].out )
3566 # We found the default executable, but exeext='' is most
3567 # certainly right.
3568 break;;
3569 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003570 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003571 then :; else
3572 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3573 fi
3574 # We set ac_cv_exeext here because the later test for it is not
3575 # safe: cross compilers may not add the suffix if given an `-o'
3576 # argument, so we may need to know it at that point already.
3577 # Even if this section looks crufty: it has the advantage of
3578 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003579 break;;
3580 * )
3581 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003582 esac
3583done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003584test "$ac_cv_exeext" = no && ac_cv_exeext=
3585
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003586else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003587 ac_file=''
3588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003589if test -z "$ac_file"; then :
3590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3591$as_echo "no" >&6; }
3592$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003593sed 's/^/| /' conftest.$ac_ext >&5
3594
Matthias Kloseb9621712010-04-24 17:59:49 +00003595{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3596$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07003597as_fn_error 77 "C compiler cannot create executables
3598See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003599else
3600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3601$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3604$as_echo_n "checking for C compiler default output file name... " >&6; }
3605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3606$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003607ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003608
Matthias Kloseb9621712010-04-24 17:59:49 +00003609rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003610ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3612$as_echo_n "checking for suffix of executables... " >&6; }
3613if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003614case "(($ac_try" in
3615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3616 *) ac_try_echo=$ac_try;;
3617esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003618eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3619$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003620 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003621 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003622 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3623 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003624 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3625# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3626# work properly (i.e., refer to `conftest.exe'), while it won't with
3627# `rm'.
3628for ac_file in conftest.exe conftest conftest.*; do
3629 test -f "$ac_file" || continue
3630 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003632 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3633 break;;
3634 * ) break;;
3635 esac
3636done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003637else
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3639$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07003640as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3641See \`config.log' for more details" "$LINENO" 5 ; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003643rm -f conftest conftest$ac_cv_exeext
3644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3645$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003646
3647rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003648EXEEXT=$ac_cv_exeext
3649ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3651/* end confdefs.h. */
3652#include <stdio.h>
3653int
3654main ()
3655{
3656FILE *f = fopen ("conftest.out", "w");
3657 return ferror (f) || fclose (f) != 0;
3658
3659 ;
3660 return 0;
3661}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003663ac_clean_files="$ac_clean_files conftest.out"
3664# Check that the compiler produces executables we can run. If not, either
3665# the compiler is broken, or we cross compile.
3666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3667$as_echo_n "checking whether we are cross compiling... " >&6; }
3668if test "$cross_compiling" != yes; then
3669 { { ac_try="$ac_link"
3670case "(($ac_try" in
3671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3672 *) ac_try_echo=$ac_try;;
3673esac
3674eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3675$as_echo "$ac_try_echo"; } >&5
3676 (eval "$ac_link") 2>&5
3677 ac_status=$?
3678 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3679 test $ac_status = 0; }
3680 if { ac_try='./conftest$ac_cv_exeext'
3681 { { case "(($ac_try" in
3682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3683 *) ac_try_echo=$ac_try;;
3684esac
3685eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3686$as_echo "$ac_try_echo"; } >&5
3687 (eval "$ac_try") 2>&5
3688 ac_status=$?
3689 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3690 test $ac_status = 0; }; }; then
3691 cross_compiling=no
3692 else
3693 if test "$cross_compiling" = maybe; then
3694 cross_compiling=yes
3695 else
3696 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3697$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07003698as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003699If you meant to cross compile, use \`--host'.
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07003700See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 fi
3702 fi
3703fi
3704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3705$as_echo "$cross_compiling" >&6; }
3706
3707rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3708ac_clean_files=$ac_clean_files_save
3709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3710$as_echo_n "checking for suffix of object files... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003711if test "${ac_cv_objext+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003712 $as_echo_n "(cached) " >&6
3713else
3714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003715/* end confdefs.h. */
3716
3717int
3718main ()
3719{
3720
3721 ;
3722 return 0;
3723}
3724_ACEOF
3725rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003726if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727case "(($ac_try" in
3728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3729 *) ac_try_echo=$ac_try;;
3730esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003731eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3732$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003733 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003734 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3736 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003737 for ac_file in conftest.o conftest.obj conftest.*; do
3738 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003741 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3742 break;;
3743 esac
3744done
3745else
Matthias Kloseb9621712010-04-24 17:59:49 +00003746 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003747sed 's/^/| /' conftest.$ac_ext >&5
3748
Matthias Kloseb9621712010-04-24 17:59:49 +00003749{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3750$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07003751as_fn_error $? "cannot compute suffix of object files: cannot compile
3752See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003753fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003754rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3757$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003758OBJEXT=$ac_cv_objext
3759ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3761$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003762if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003763 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003764else
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003766/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003767
Martin v. Löwis11437992002-04-12 09:54:03 +00003768int
3769main ()
3770{
3771#ifndef __GNUC__
3772 choke me
3773#endif
3774
3775 ;
3776 return 0;
3777}
3778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003779if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003780 ac_compiler_gnu=yes
3781else
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003785ac_cv_c_compiler_gnu=$ac_compiler_gnu
3786
3787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3789$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3790if test $ac_compiler_gnu = yes; then
3791 GCC=yes
3792else
3793 GCC=
3794fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003795ac_test_CFLAGS=${CFLAGS+set}
3796ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3798$as_echo_n "checking whether $CC accepts -g... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003799if test "${ac_cv_prog_cc_g+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003801else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802 ac_save_c_werror_flag=$ac_c_werror_flag
3803 ac_c_werror_flag=yes
3804 ac_cv_prog_cc_g=no
3805 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003808
Martin v. Löwis11437992002-04-12 09:54:03 +00003809int
3810main ()
3811{
3812
3813 ;
3814 return 0;
3815}
3816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003817if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003818 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003819else
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 CFLAGS=""
3821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003822/* end confdefs.h. */
3823
3824int
3825main ()
3826{
3827
3828 ;
3829 return 0;
3830}
3831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003832if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003833
Matthias Kloseb9621712010-04-24 17:59:49 +00003834else
3835 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003836 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003838/* end confdefs.h. */
3839
3840int
3841main ()
3842{
3843
3844 ;
3845 return 0;
3846}
3847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003848if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3856 ac_c_werror_flag=$ac_save_c_werror_flag
3857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3859$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003860if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003861 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003862elif test $ac_cv_prog_cc_g = yes; then
3863 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003864 CFLAGS="-g -O2"
3865 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003866 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003867 fi
3868else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003869 if test "$GCC" = yes; then
3870 CFLAGS="-O2"
3871 else
3872 CFLAGS=
3873 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3876$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003877if test "${ac_cv_prog_cc_c89+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003878 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003879else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003880 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003881ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003883/* end confdefs.h. */
3884#include <stdarg.h>
3885#include <stdio.h>
3886#include <sys/types.h>
3887#include <sys/stat.h>
3888/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3889struct buf { int x; };
3890FILE * (*rcsopen) (struct buf *, struct stat *, int);
3891static char *e (p, i)
3892 char **p;
3893 int i;
3894{
3895 return p[i];
3896}
3897static char *f (char * (*g) (char **, int), char **p, ...)
3898{
3899 char *s;
3900 va_list v;
3901 va_start (v,p);
3902 s = g (p, va_arg (v,int));
3903 va_end (v);
3904 return s;
3905}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003906
3907/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3908 function prototypes and stuff, but not '\xHH' hex character constants.
3909 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003910 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003911 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3912 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003913 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003914int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3915
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003916/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3917 inside strings and character constants. */
3918#define FOO(x) 'x'
3919int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3920
Skip Montanaro6dead952003-09-25 14:50:04 +00003921int test (int i, double x);
3922struct s1 {int (*f) (int a);};
3923struct s2 {int (*f) (double a);};
3924int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3925int argc;
3926char **argv;
3927int
3928main ()
3929{
3930return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3931 ;
3932 return 0;
3933}
3934_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3936 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003937do
3938 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003939 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942rm -f core conftest.err conftest.$ac_objext
3943 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003944done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003946CC=$ac_save_CC
3947
3948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003949# AC_CACHE_VAL
3950case "x$ac_cv_prog_cc_c89" in
3951 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3953$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3956$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003957 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3960$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003961esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003962if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003963
Matthias Kloseb9621712010-04-24 17:59:49 +00003964fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003965
Martin v. Löwis11437992002-04-12 09:54:03 +00003966ac_ext=c
3967ac_cpp='$CPP $CPPFLAGS'
3968ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3969ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3970ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003971
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003972
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003973
3974
Matthias Kloseb9621712010-04-24 17:59:49 +00003975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3976$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003977
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003979if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003980 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003981
3982 case $withval in
3983 no) with_cxx_main=no
3984 MAINCC='$(CC)';;
3985 yes) with_cxx_main=yes
3986 MAINCC='$(CXX)';;
3987 *) with_cxx_main=yes
3988 MAINCC=$withval
3989 if test -z "$CXX"
3990 then
3991 CXX=$withval
3992 fi;;
3993 esac
3994else
3995
3996 with_cxx_main=no
3997 MAINCC='$(CC)'
3998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003999fi
4000
Matthias Kloseb9621712010-04-24 17:59:49 +00004001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4002$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004003
4004preset_cxx="$CXX"
4005if test -z "$CXX"
4006then
4007 case "$CC" in
4008 gcc) # Extract the first word of "g++", so it can be a program name with args.
4009set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4011$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004012if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004013 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004014else
4015 case $CXX in
4016 [\\/]* | ?:[\\/]*)
4017 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4018 ;;
4019 *)
4020 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4021for as_dir in notfound
4022do
4023 IFS=$as_save_IFS
4024 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004025 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004026 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004027 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004028 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004029 break 2
4030 fi
4031done
Matthias Kloseb9621712010-04-24 17:59:49 +00004032 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004033IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004034
4035 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4036 ;;
4037esac
4038fi
4039CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004040if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4042$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004043else
Matthias Kloseb9621712010-04-24 17:59:49 +00004044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4045$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004047
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004048 ;;
4049 cc) # Extract the first word of "c++", so it can be a program name with args.
4050set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4052$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004053if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004054 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004055else
4056 case $CXX in
4057 [\\/]* | ?:[\\/]*)
4058 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4059 ;;
4060 *)
4061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4062for as_dir in notfound
4063do
4064 IFS=$as_save_IFS
4065 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004066 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004067 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004068 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004069 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004070 break 2
4071 fi
4072done
Matthias Kloseb9621712010-04-24 17:59:49 +00004073 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004074IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004075
4076 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4077 ;;
4078esac
4079fi
4080CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004081if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4083$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004084else
Matthias Kloseb9621712010-04-24 17:59:49 +00004085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4086$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004088
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004089 ;;
4090 esac
4091 if test "$CXX" = "notfound"
4092 then
4093 CXX=""
4094 fi
4095fi
4096if test -z "$CXX"
4097then
4098 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4099do
4100 # Extract the first word of "$ac_prog", so it can be a program name with args.
4101set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4103$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004104if test "${ac_cv_prog_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004105 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004106else
4107 if test -n "$CXX"; then
4108 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4109else
4110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4111for as_dir in $PATH
4112do
4113 IFS=$as_save_IFS
4114 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004116 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004117 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004119 break 2
4120 fi
4121done
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004123IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004124
4125fi
4126fi
4127CXX=$ac_cv_prog_CXX
4128if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4130$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004131else
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4133$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004134fi
4135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004136
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004137 test -n "$CXX" && break
4138done
4139test -n "$CXX" || CXX="notfound"
4140
4141 if test "$CXX" = "notfound"
4142 then
4143 CXX=""
4144 fi
4145fi
4146if test "$preset_cxx" != "$CXX"
4147then
Matthias Kloseb9621712010-04-24 17:59:49 +00004148 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004149
4150 By default, distutils will build C++ extension modules with \"$CXX\".
4151 If this is not intended, then set CXX on the configure command line.
4152 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004153$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004154
4155 By default, distutils will build C++ extension modules with \"$CXX\".
4156 If this is not intended, then set CXX on the configure command line.
4157 " >&2;}
4158fi
4159
4160
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4162$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4163save_LDFLAGS="$LDFLAGS"
4164LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004165
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4167/* end confdefs.h. */
4168
4169int
4170main ()
4171{
4172
4173 ;
4174 return 0;
4175}
4176_ACEOF
4177if ac_fn_c_try_link "$LINENO"; then :
4178 NO_AS_NEEDED="-Wl,--no-as-needed"
4179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4180$as_echo "yes" >&6; }
4181else
4182 NO_AS_NEEDED=""
4183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4184$as_echo "no" >&6; }
4185fi
4186rm -f core conftest.err conftest.$ac_objext \
4187 conftest$ac_exeext conftest.$ac_ext
4188LDFLAGS="$save_LDFLAGS"
4189
4190
4191
4192# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004193ac_ext=c
4194ac_cpp='$CPP $CPPFLAGS'
4195ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4196ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4197ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4199$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004200# On Suns, sometimes $CPP names a directory.
4201if test -n "$CPP" && test -d "$CPP"; then
4202 CPP=
4203fi
4204if test -z "$CPP"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004205 if test "${ac_cv_prog_CPP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004206 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004207else
Martin v. Löwis11437992002-04-12 09:54:03 +00004208 # Double quotes because CPP needs to be expanded
4209 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4210 do
4211 ac_preproc_ok=false
4212for ac_c_preproc_warn_flag in '' yes
4213do
4214 # Use a header file that comes with gcc, so configuring glibc
4215 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004216 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4217 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004218 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004219 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004221/* end confdefs.h. */
4222#ifdef __STDC__
4223# include <limits.h>
4224#else
4225# include <assert.h>
4226#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004227 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004229if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004230
Matthias Kloseb9621712010-04-24 17:59:49 +00004231else
Martin v. Löwis11437992002-04-12 09:54:03 +00004232 # Broken: fails on valid input.
4233continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004234fi
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07004235rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004236
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004238 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004240/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004241#include <ac_nonexistent.h>
4242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004243if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004244 # Broken: success on invalid input.
4245continue
4246else
Martin v. Löwis11437992002-04-12 09:54:03 +00004247 # Passes both tests.
4248ac_preproc_ok=:
4249break
4250fi
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07004251rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004252
4253done
4254# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07004255rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004256if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004257 break
4258fi
4259
4260 done
4261 ac_cv_prog_CPP=$CPP
4262
4263fi
4264 CPP=$ac_cv_prog_CPP
4265else
4266 ac_cv_prog_CPP=$CPP
4267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4269$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004270ac_preproc_ok=false
4271for ac_c_preproc_warn_flag in '' yes
4272do
4273 # Use a header file that comes with gcc, so configuring glibc
4274 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004275 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4276 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004277 # On the NeXT, cc -E runs the code through the compiler's parser,
4278 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004280/* end confdefs.h. */
4281#ifdef __STDC__
4282# include <limits.h>
4283#else
4284# include <assert.h>
4285#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004286 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004288if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004289
Matthias Kloseb9621712010-04-24 17:59:49 +00004290else
Martin v. Löwis11437992002-04-12 09:54:03 +00004291 # Broken: fails on valid input.
4292continue
4293fi
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07004294rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004295
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004296 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004297 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004299/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004300#include <ac_nonexistent.h>
4301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004302if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004303 # Broken: success on invalid input.
4304continue
4305else
Martin v. Löwis11437992002-04-12 09:54:03 +00004306 # Passes both tests.
4307ac_preproc_ok=:
4308break
4309fi
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07004310rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004311
4312done
4313# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07004314rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004315if $ac_preproc_ok; then :
4316
Martin v. Löwis11437992002-04-12 09:54:03 +00004317else
Matthias Kloseb9621712010-04-24 17:59:49 +00004318 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4319$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07004320as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4321See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004322fi
4323
4324ac_ext=c
4325ac_cpp='$CPP $CPPFLAGS'
4326ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4327ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4328ac_compiler_gnu=$ac_cv_c_compiler_gnu
4329
4330
Matthias Kloseb9621712010-04-24 17:59:49 +00004331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4332$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004333if test "${ac_cv_path_GREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004334 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004335else
Matthias Kloseb9621712010-04-24 17:59:49 +00004336 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004338 # Loop through the user's path and test for each of PROGNAME-LIST
4339 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4341do
4342 IFS=$as_save_IFS
4343 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004344 for ac_prog in grep ggrep; do
4345 for ac_exec_ext in '' $ac_executable_extensions; do
4346 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4347 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4348# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349 # Check for GNU $ac_path_GREP
4350case `"$ac_path_GREP" --version 2>&1` in
4351*GNU*)
4352 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4353*)
4354 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004355 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356 while :
4357 do
4358 cat "conftest.in" "conftest.in" >"conftest.tmp"
4359 mv "conftest.tmp" "conftest.in"
4360 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4363 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004364 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4366 # Best one so far, save it but keep looking for a better one
4367 ac_cv_path_GREP="$ac_path_GREP"
4368 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004369 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370 # 10*(2^10) chars as input seems more than enough
4371 test $ac_count -gt 10 && break
4372 done
4373 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4374esac
4375
Matthias Kloseb9621712010-04-24 17:59:49 +00004376 $ac_path_GREP_found && break 3
4377 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004380IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004381 if test -z "$ac_cv_path_GREP"; then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07004382 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 +00004383 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004384else
4385 ac_cv_path_GREP=$GREP
4386fi
4387
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004388fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4390$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004391 GREP="$ac_cv_path_GREP"
4392
4393
Matthias Kloseb9621712010-04-24 17:59:49 +00004394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4395$as_echo_n "checking for egrep... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004396if test "${ac_cv_path_EGREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004397 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004398else
4399 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4400 then ac_cv_path_EGREP="$GREP -E"
4401 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004402 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004403 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004404 # Loop through the user's path and test for each of PROGNAME-LIST
4405 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004406for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4407do
4408 IFS=$as_save_IFS
4409 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004410 for ac_prog in egrep; do
4411 for ac_exec_ext in '' $ac_executable_extensions; do
4412 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4413 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4414# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004415 # Check for GNU $ac_path_EGREP
4416case `"$ac_path_EGREP" --version 2>&1` in
4417*GNU*)
4418 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4419*)
4420 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004421 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004422 while :
4423 do
4424 cat "conftest.in" "conftest.in" >"conftest.tmp"
4425 mv "conftest.tmp" "conftest.in"
4426 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004427 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004428 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4429 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004430 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004431 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4432 # Best one so far, save it but keep looking for a better one
4433 ac_cv_path_EGREP="$ac_path_EGREP"
4434 ac_path_EGREP_max=$ac_count
4435 fi
4436 # 10*(2^10) chars as input seems more than enough
4437 test $ac_count -gt 10 && break
4438 done
4439 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4440esac
4441
Matthias Kloseb9621712010-04-24 17:59:49 +00004442 $ac_path_EGREP_found && break 3
4443 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004444 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004445 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004446IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004447 if test -z "$ac_cv_path_EGREP"; then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07004448 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 +00004449 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004450else
4451 ac_cv_path_EGREP=$EGREP
4452fi
4453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004454 fi
4455fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4457$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004458 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004459
4460
Matthias Kloseb9621712010-04-24 17:59:49 +00004461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4462$as_echo_n "checking for ANSI C header files... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004463if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004464 $as_echo_n "(cached) " >&6
4465else
4466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004467/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004468#include <stdlib.h>
4469#include <stdarg.h>
4470#include <string.h>
4471#include <float.h>
4472
4473int
4474main ()
4475{
4476
4477 ;
4478 return 0;
4479}
4480_ACEOF
4481if ac_fn_c_try_compile "$LINENO"; then :
4482 ac_cv_header_stdc=yes
4483else
4484 ac_cv_header_stdc=no
4485fi
4486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4487
4488if test $ac_cv_header_stdc = yes; then
4489 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4491/* end confdefs.h. */
4492#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004493
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004494_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004496 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004497
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004498else
Matthias Kloseb9621712010-04-24 17:59:49 +00004499 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004500fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004501rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004502
Matthias Kloseb9621712010-04-24 17:59:49 +00004503fi
4504
4505if test $ac_cv_header_stdc = yes; then
4506 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4508/* end confdefs.h. */
4509#include <stdlib.h>
4510
4511_ACEOF
4512if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4513 $EGREP "free" >/dev/null 2>&1; then :
4514
4515else
4516 ac_cv_header_stdc=no
4517fi
4518rm -f conftest*
4519
4520fi
4521
4522if test $ac_cv_header_stdc = yes; then
4523 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4524 if test "$cross_compiling" = yes; then :
4525 :
4526else
4527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4528/* end confdefs.h. */
4529#include <ctype.h>
4530#include <stdlib.h>
4531#if ((' ' & 0x0FF) == 0x020)
4532# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4533# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4534#else
4535# define ISLOWER(c) \
4536 (('a' <= (c) && (c) <= 'i') \
4537 || ('j' <= (c) && (c) <= 'r') \
4538 || ('s' <= (c) && (c) <= 'z'))
4539# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4540#endif
4541
4542#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4543int
4544main ()
4545{
4546 int i;
4547 for (i = 0; i < 256; i++)
4548 if (XOR (islower (i), ISLOWER (i))
4549 || toupper (i) != TOUPPER (i))
4550 return 2;
4551 return 0;
4552}
4553_ACEOF
4554if ac_fn_c_try_run "$LINENO"; then :
4555
4556else
4557 ac_cv_header_stdc=no
4558fi
4559rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4560 conftest.$ac_objext conftest.beam conftest.$ac_ext
4561fi
4562
4563fi
4564fi
4565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4566$as_echo "$ac_cv_header_stdc" >&6; }
4567if test $ac_cv_header_stdc = yes; then
4568
4569$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4570
4571fi
4572
4573# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4574for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4575 inttypes.h stdint.h unistd.h
4576do :
4577 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4578ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4579"
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07004580if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004581 cat >>confdefs.h <<_ACEOF
4582#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4583_ACEOF
4584
4585fi
4586
4587done
4588
4589
4590
4591 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004592if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004593 MINIX=yes
4594else
4595 MINIX=
4596fi
4597
4598
4599 if test "$MINIX" = yes; then
4600
4601$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4602
4603
4604$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4605
4606
4607$as_echo "#define _MINIX 1" >>confdefs.h
4608
4609 fi
4610
4611
4612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4613$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004614if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004615 $as_echo_n "(cached) " >&6
4616else
4617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4618/* end confdefs.h. */
4619
4620# define __EXTENSIONS__ 1
4621 $ac_includes_default
4622int
4623main ()
4624{
4625
4626 ;
4627 return 0;
4628}
4629_ACEOF
4630if ac_fn_c_try_compile "$LINENO"; then :
4631 ac_cv_safe_to_define___extensions__=yes
4632else
4633 ac_cv_safe_to_define___extensions__=no
4634fi
4635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4636fi
4637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4638$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4639 test $ac_cv_safe_to_define___extensions__ = yes &&
4640 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4641
4642 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4643
4644 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4645
4646 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4647
4648 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4649
4650
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004651
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004652# Check for unsupported systems
4653case $ac_sys_system/$ac_sys_release in
4654atheos*|Linux*/1*)
4655 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4656 echo See README for details.
4657 exit 1;;
4658esac
4659
4660
Matthias Kloseb9621712010-04-24 17:59:49 +00004661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4662$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004663
4664# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004665if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004666 withval=$with_suffix;
4667 case $withval in
4668 no) EXEEXT=;;
4669 yes) EXEEXT=.exe;;
4670 *) EXEEXT=$withval;;
4671 esac
4672fi
4673
Matthias Kloseb9621712010-04-24 17:59:49 +00004674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4675$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004676
4677# Test whether we're running on a non-case-sensitive system, in which
4678# case we give a warning if no ext is given
4679
Matthias Kloseb9621712010-04-24 17:59:49 +00004680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4681$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004682if test ! -d CaseSensitiveTestDir; then
4683mkdir CaseSensitiveTestDir
4684fi
4685
4686if test -d casesensitivetestdir
4687then
Matthias Kloseb9621712010-04-24 17:59:49 +00004688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4689$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004690 BUILDEXEEXT=.exe
4691else
Matthias Kloseb9621712010-04-24 17:59:49 +00004692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4693$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004694 BUILDEXEEXT=$EXEEXT
4695fi
4696rmdir CaseSensitiveTestDir
4697
4698case $MACHDEP in
4699bsdos*)
4700 case $CC in
4701 gcc) CC="$CC -D_HAVE_BSDI";;
4702 esac;;
4703esac
4704
4705case $ac_sys_system in
4706hp*|HP*)
4707 case $CC in
4708 cc|*/cc) CC="$CC -Ae";;
4709 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004710esac
4711
4712
4713
Matthias Kloseb9621712010-04-24 17:59:49 +00004714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4715$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004716if test -z "$LIBRARY"
4717then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004718 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4721$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004722
4723# LDLIBRARY is the name of the library to link against (as opposed to the
4724# name of the library into which to insert object files). BLDLIBRARY is also
4725# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4726# is blank as the main program is not linked directly against LDLIBRARY.
4727# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4728# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4729# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4730# DLLLIBRARY is the shared (i.e., DLL) library.
4731#
4732# RUNSHARED is used to run shared python without installed libraries
4733#
4734# INSTSONAME is the name of the shared library that will be use to install
4735# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004736#
4737# LDVERSION is the shared library version number, normally the Python version
4738# with the ABI build flags appended.
4739
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004740
4741
4742
4743
4744
4745
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004746
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004747LDLIBRARY="$LIBRARY"
4748BLDLIBRARY='$(LDLIBRARY)'
4749INSTSONAME='$(LDLIBRARY)'
4750DLLLIBRARY=''
4751LDLIBRARYDIR=''
4752RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004753LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004754
4755# LINKCC is the command that links the python executable -- default is $(CC).
4756# If CXX is set, and if it is needed to link a main function that was
4757# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4758# python might then depend on the C++ runtime
4759# This is altered for AIX in order to build the export list before
4760# linking.
4761
Matthias Kloseb9621712010-04-24 17:59:49 +00004762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4763$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004764if test -z "$LINKCC"
4765then
4766 LINKCC='$(PURIFY) $(MAINCC)'
4767 case $ac_sys_system in
4768 AIX*)
4769 exp_extra="\"\""
4770 if test $ac_sys_release -ge 5 -o \
4771 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4772 exp_extra="."
4773 fi
4774 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004775 QNX*)
4776 # qcc must be used because the other compilers do not
4777 # support -N.
4778 LINKCC=qcc;;
4779 esac
4780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4782$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004783
4784# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4785# make sure we default having it set to "no": this is used by
4786# distutils.unixccompiler to know if it should add --enable-new-dtags
4787# to linker command lines, and failing to detect GNU ld simply results
4788# in the same bahaviour as before.
4789
Matthias Kloseb9621712010-04-24 17:59:49 +00004790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4791$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004792ac_prog=ld
4793if test "$GCC" = yes; then
4794 ac_prog=`$CC -print-prog-name=ld`
4795fi
4796case `"$ac_prog" -V 2>&1 < /dev/null` in
4797 *GNU*)
4798 GNULD=yes;;
4799 *)
4800 GNULD=no;;
4801esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4803$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004804
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4806$as_echo_n "checking for inline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004807if test "${ac_cv_c_inline+set}" = set; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004808 $as_echo_n "(cached) " >&6
4809else
4810 ac_cv_c_inline=no
4811for ac_kw in inline __inline__ __inline; do
4812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4813/* end confdefs.h. */
4814#ifndef __cplusplus
4815typedef int foo_t;
4816static $ac_kw foo_t static_foo () {return 0; }
4817$ac_kw foo_t foo () {return 0; }
4818#endif
4819
4820_ACEOF
4821if ac_fn_c_try_compile "$LINENO"; then :
4822 ac_cv_c_inline=$ac_kw
4823fi
4824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4825 test "$ac_cv_c_inline" != no && break
4826done
4827
4828fi
4829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4830$as_echo "$ac_cv_c_inline" >&6; }
4831
4832case $ac_cv_c_inline in
4833 inline | yes) ;;
4834 *)
4835 case $ac_cv_c_inline in
4836 no) ac_val=;;
4837 *) ac_val=$ac_cv_c_inline;;
4838 esac
4839 cat >>confdefs.h <<_ACEOF
4840#ifndef __cplusplus
4841#define inline $ac_val
4842#endif
4843_ACEOF
4844 ;;
4845esac
4846
4847if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004848
4849$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004850
4851
4852fi
4853
4854
Matthias Kloseb9621712010-04-24 17:59:49 +00004855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4856$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004857# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004858if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004859 enableval=$enable_shared;
4860fi
4861
4862
4863if test -z "$enable_shared"
4864then
4865 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004866 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004867 enable_shared="yes";;
4868 *)
4869 enable_shared="no";;
4870 esac
4871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4873$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004874
Matthias Kloseb9621712010-04-24 17:59:49 +00004875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4876$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004877# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004878if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004879 enableval=$enable_profiling; ac_save_cc="$CC"
4880 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004881 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004882 ac_enable_profiling="no"
4883else
Matthias Kloseb9621712010-04-24 17:59:49 +00004884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004885/* end confdefs.h. */
4886int main() { return 0; }
4887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004888if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004889 ac_enable_profiling="yes"
4890else
Matthias Kloseb9621712010-04-24 17:59:49 +00004891 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004892fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004893rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4894 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004895fi
4896
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004897 CC="$ac_save_cc"
4898fi
4899
Matthias Kloseb9621712010-04-24 17:59:49 +00004900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4901$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004902
4903case "$ac_enable_profiling" in
4904 "yes")
4905 BASECFLAGS="-pg $BASECFLAGS"
4906 LDFLAGS="-pg $LDFLAGS"
4907 ;;
4908esac
4909
Matthias Kloseb9621712010-04-24 17:59:49 +00004910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4911$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004912
4913# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4914# library that we build, but we do not want to link against it (we
4915# will find it with a -framework option). For this reason there is an
4916# extra variable BLDLIBRARY against which Python and the extension
4917# modules are linked, BLDLIBRARY. This is normally the same as
4918# LDLIBRARY, but empty for MacOSX framework builds.
4919if test "$enable_framework"
4920then
4921 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4922 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4923 BLDLIBRARY=''
4924else
4925 BLDLIBRARY='$(LDLIBRARY)'
4926fi
4927
4928# Other platforms follow
4929if test $enable_shared = "yes"; then
4930
Matthias Kloseb9621712010-04-24 17:59:49 +00004931$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004932
4933 case $ac_sys_system in
4934 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004935 LDLIBRARY='libpython$(LDVERSION).dll.a'
4936 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004937 ;;
4938 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004939 LDLIBRARY='libpython$(LDVERSION).so'
4940 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004941 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4942 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004943 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004944 then
4945 PY3LIBRARY=libpython3.so
4946 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947 ;;
4948 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004949 LDLIBRARY='libpython$(LDVERSION).so'
4950 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004951 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4952 case $ac_sys_system in
4953 FreeBSD*)
4954 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4955 ;;
4956 esac
4957 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004958 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004959 then
4960 PY3LIBRARY=libpython3.so
4961 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004962 ;;
4963 hp*|HP*)
4964 case `uname -m` in
4965 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004966 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004967 ;;
4968 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004969 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004970 ;;
4971 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004972 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004973 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4974 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004975 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004976 LDLIBRARY='libpython$(LDVERSION).dylib'
4977 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4979 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004980 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004981 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004982 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4983 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004984
4985 esac
4986else # shared is disabled
4987 case $ac_sys_system in
4988 CYGWIN*)
4989 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004990 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004991 ;;
4992 esac
4993fi
4994
Matthias Kloseb9621712010-04-24 17:59:49 +00004995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4996$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004997
4998if test -n "$ac_tool_prefix"; then
4999 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5000set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5002$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005003if test "${ac_cv_prog_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005004 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005005else
5006 if test -n "$RANLIB"; then
5007 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5008else
5009as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5010for as_dir in $PATH
5011do
5012 IFS=$as_save_IFS
5013 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005014 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005015 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5016 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005017 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005018 break 2
5019 fi
5020done
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005022IFS=$as_save_IFS
5023
5024fi
5025fi
5026RANLIB=$ac_cv_prog_RANLIB
5027if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5029$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030else
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5032$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005033fi
5034
5035
5036fi
5037if test -z "$ac_cv_prog_RANLIB"; then
5038 ac_ct_RANLIB=$RANLIB
5039 # Extract the first word of "ranlib", so it can be a program name with args.
5040set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5042$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005043if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005044 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005045else
5046 if test -n "$ac_ct_RANLIB"; then
5047 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5048else
5049as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5050for as_dir in $PATH
5051do
5052 IFS=$as_save_IFS
5053 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005054 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005055 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5056 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005057 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005058 break 2
5059 fi
5060done
Matthias Kloseb9621712010-04-24 17:59:49 +00005061 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005062IFS=$as_save_IFS
5063
5064fi
5065fi
5066ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5067if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5069$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005070else
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5072$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005073fi
5074
5075 if test "x$ac_ct_RANLIB" = x; then
5076 RANLIB=":"
5077 else
5078 case $cross_compiling:$ac_tool_warned in
5079yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005080{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5081$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005082ac_tool_warned=yes ;;
5083esac
5084 RANLIB=$ac_ct_RANLIB
5085 fi
5086else
5087 RANLIB="$ac_cv_prog_RANLIB"
5088fi
5089
5090
5091for ac_prog in ar aal
5092do
5093 # Extract the first word of "$ac_prog", so it can be a program name with args.
5094set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5096$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005097if test "${ac_cv_prog_AR+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005098 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005099else
5100 if test -n "$AR"; then
5101 ac_cv_prog_AR="$AR" # Let the user override the test.
5102else
5103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5104for as_dir in $PATH
5105do
5106 IFS=$as_save_IFS
5107 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005108 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005109 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5110 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005112 break 2
5113 fi
5114done
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005116IFS=$as_save_IFS
5117
5118fi
5119fi
5120AR=$ac_cv_prog_AR
5121if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5123$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005124else
Matthias Kloseb9621712010-04-24 17:59:49 +00005125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5126$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005127fi
5128
5129
5130 test -n "$AR" && break
5131done
5132test -n "$AR" || AR="ar"
5133
5134
5135# tweak ARFLAGS only if the user didn't set it on the command line
5136
5137if test -z "$ARFLAGS"
5138then
5139 ARFLAGS="rc"
5140fi
5141
5142
Georg Brandl1ca2e792011-03-05 20:51:24 +01005143
5144
5145# Extract the first word of "hg", so it can be a program name with args.
5146set dummy hg; ac_word=$2
5147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5148$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005149if test "${ac_cv_prog_HAS_HG+set}" = set; then :
Georg Brandl1ca2e792011-03-05 20:51:24 +01005150 $as_echo_n "(cached) " >&6
5151else
5152 if test -n "$HAS_HG"; then
5153 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5154else
5155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5156for as_dir in $PATH
5157do
5158 IFS=$as_save_IFS
5159 test -z "$as_dir" && as_dir=.
5160 for ac_exec_ext in '' $ac_executable_extensions; do
5161 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5162 ac_cv_prog_HAS_HG="found"
5163 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5164 break 2
5165 fi
5166done
5167 done
5168IFS=$as_save_IFS
5169
5170 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5171fi
5172fi
5173HAS_HG=$ac_cv_prog_HAS_HG
5174if test -n "$HAS_HG"; then
5175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5176$as_echo "$HAS_HG" >&6; }
5177else
5178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5179$as_echo "no" >&6; }
5180fi
5181
5182
5183if test $HAS_HG = found
5184then
5185 HGVERSION="hg id -i \$(srcdir)"
5186 HGTAG="hg id -t \$(srcdir)"
5187 HGBRANCH="hg id -b \$(srcdir)"
5188else
5189 HGVERSION=""
5190 HGTAG=""
5191 HGBRANCH=""
5192fi
5193
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005194case $MACHDEP in
5195bsdos*|hp*|HP*)
5196 # install -d does not work on BSDI or HP-UX
5197 if test -z "$INSTALL"
5198 then
5199 INSTALL="${srcdir}/install-sh -c"
5200 fi
5201esac
5202ac_aux_dir=
5203for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07005204 if test -f "$ac_dir/install-sh"; then
5205 ac_aux_dir=$ac_dir
5206 ac_install_sh="$ac_aux_dir/install-sh -c"
5207 break
5208 elif test -f "$ac_dir/install.sh"; then
5209 ac_aux_dir=$ac_dir
5210 ac_install_sh="$ac_aux_dir/install.sh -c"
5211 break
5212 elif test -f "$ac_dir/shtool"; then
5213 ac_aux_dir=$ac_dir
5214 ac_install_sh="$ac_aux_dir/shtool install -c"
5215 break
5216 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005217done
5218if test -z "$ac_aux_dir"; then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07005219 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005220fi
5221
5222# These three variables are undocumented and unsupported,
5223# and are intended to be withdrawn in a future Autoconf release.
5224# They can cause serious problems if a builder's source tree is in a directory
5225# whose full name contains unusual characters.
5226ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5227ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5228ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5229
5230
5231# Find a good install program. We prefer a C program (faster),
5232# so one script is as good as another. But avoid the broken or
5233# incompatible versions:
5234# SysV /etc/install, /usr/sbin/install
5235# SunOS /usr/etc/install
5236# IRIX /sbin/install
5237# AIX /bin/install
5238# AmigaOS /C/install, which installs bootblocks on floppy discs
5239# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5240# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5241# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5242# OS/2's system install, which has a completely different semantic
5243# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005244# Reject install programs that cannot install multiple files.
5245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5246$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005247if test -z "$INSTALL"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005248if test "${ac_cv_path_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005249 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005250else
5251 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5252for as_dir in $PATH
5253do
5254 IFS=$as_save_IFS
5255 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005256 # Account for people who put trailing slashes in PATH elements.
5257case $as_dir/ in #((
5258 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005259 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005260 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005261 /usr/ucb/* ) ;;
5262 *)
5263 # OSF1 and SCO ODT 3.0 have their own names for install.
5264 # Don't use installbsd from OSF since it installs stuff as root
5265 # by default.
5266 for ac_prog in ginstall scoinst install; do
5267 for ac_exec_ext in '' $ac_executable_extensions; do
5268 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5269 if test $ac_prog = install &&
5270 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5271 # AIX install. It has an incompatible calling convention.
5272 :
5273 elif test $ac_prog = install &&
5274 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5275 # program-specific install script used by HP pwplus--don't use.
5276 :
5277 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005278 rm -rf conftest.one conftest.two conftest.dir
5279 echo one > conftest.one
5280 echo two > conftest.two
5281 mkdir conftest.dir
5282 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5283 test -s conftest.one && test -s conftest.two &&
5284 test -s conftest.dir/conftest.one &&
5285 test -s conftest.dir/conftest.two
5286 then
5287 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5288 break 3
5289 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005290 fi
5291 fi
5292 done
5293 done
5294 ;;
5295esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005296
5297 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005298IFS=$as_save_IFS
5299
Matthias Kloseb9621712010-04-24 17:59:49 +00005300rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005301
5302fi
5303 if test "${ac_cv_path_install+set}" = set; then
5304 INSTALL=$ac_cv_path_install
5305 else
5306 # As a last resort, use the slow shell script. Don't cache a
5307 # value for INSTALL within a source directory, because that will
5308 # break other packages using the cache if that directory is
5309 # removed, or if the value is a relative name.
5310 INSTALL=$ac_install_sh
5311 fi
5312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5314$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005315
5316# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5317# It thinks the first close brace ends the variable substitution.
5318test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5319
5320test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5321
5322test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5323
5324
5325# Not every filesystem supports hard links
5326
5327if test -z "$LN" ; then
5328 case $ac_sys_system in
5329 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005330 *) LN=ln;;
5331 esac
5332fi
5333
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005334# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005335
5336ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005337
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005338# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5340$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005341
5342# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005343if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005344 withval=$with_pydebug;
5345if test "$withval" != no
5346then
5347
Matthias Kloseb9621712010-04-24 17:59:49 +00005348$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005349
Matthias Kloseb9621712010-04-24 17:59:49 +00005350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5351$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005353 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005354else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5355$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005356fi
5357else
Matthias Kloseb9621712010-04-24 17:59:49 +00005358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5359$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005360fi
5361
5362
5363# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5364# merged with this chunk of code?
5365
5366# Optimizer/debugger flags
5367# ------------------------
5368# (The following bit of code is complicated enough - please keep things
5369# indented properly. Just pretend you're editing Python code. ;-)
5370
5371# There are two parallel sets of case statements below, one that checks to
5372# see if OPT was set and one that does BASECFLAGS setting based upon
5373# compiler and platform. BASECFLAGS tweaks need to be made even if the
5374# user set OPT.
5375
5376# tweak OPT based on compiler and platform, only if the user didn't set
5377# it on the command line
5378
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005379if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005380then
5381 case $GCC in
5382 yes)
5383 if test "$CC" != 'g++' ; then
5384 STRICT_PROTO="-Wstrict-prototypes"
5385 fi
5386 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5387 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5388 WRAP="-fwrapv"
5389 fi
5390 case $ac_cv_prog_cc_g in
5391 yes)
5392 if test "$Py_DEBUG" = 'true' ; then
5393 # Optimization messes up debuggers, so turn it off for
5394 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005395 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005396 else
5397 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5398 fi
5399 ;;
5400 *)
5401 OPT="-O3 -Wall $STRICT_PROTO"
5402 ;;
5403 esac
5404 case $ac_sys_system in
5405 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5406 ;;
5407 esac
5408 ;;
5409
5410 *)
5411 OPT="-O"
5412 ;;
5413 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005414fi
5415
5416
5417
5418# The -arch flags for universal builds on OSX
5419UNIVERSAL_ARCH_FLAGS=
5420
5421
5422# tweak BASECFLAGS based on compiler and platform
5423case $GCC in
5424yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005425 # Python doesn't violate C99 aliasing rules, but older versions of
5426 # GCC produce warnings for legal Python code. Enable
5427 # -fno-strict-aliasing on versions of GCC that support but produce
5428 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5430$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005431 ac_save_cc="$CC"
5432 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005433 save_CFLAGS="$CFLAGS"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005434 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005435 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005436else
Matthias Kloseb9621712010-04-24 17:59:49 +00005437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005438/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005439
Matthias Kloseb159a552010-04-25 21:00:44 +00005440
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005441int
5442main ()
5443{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005444
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005445 ;
5446 return 0;
5447}
Matthias Kloseb159a552010-04-25 21:00:44 +00005448
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005450if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005451
5452 CC="$ac_save_cc -fstrict-aliasing"
5453 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005455/* end confdefs.h. */
5456
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005457 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005458int
5459main ()
5460{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005461double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005462 ;
5463 return 0;
5464}
Matthias Kloseb159a552010-04-25 21:00:44 +00005465
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005467if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005468
5469 ac_cv_no_strict_aliasing=no
5470
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005471else
Matthias Kloseb159a552010-04-25 21:00:44 +00005472
5473 ac_cv_no_strict_aliasing=yes
5474
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005475fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005477
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005478else
Matthias Kloseb159a552010-04-25 21:00:44 +00005479
5480 ac_cv_no_strict_aliasing=no
5481
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005482fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005484fi
5485
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005486 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005487 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5489$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005490 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005491 then
5492 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5493 fi
5494
5495 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5496 # support. Without this, treatment of subnormals doesn't follow
5497 # the standard.
5498 case $ac_sys_machine in
5499 alpha*)
5500 BASECFLAGS="$BASECFLAGS -mieee"
5501 ;;
5502 esac
5503
5504 case $ac_sys_system in
5505 SCO_SV*)
5506 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5507 ;;
5508 # is there any other compiler on Darwin besides gcc?
5509 Darwin*)
5510 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5511 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005512 if test "${CC}" = gcc
5513 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5515$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005516 case "${UNIVERSALSDK}" in
5517 */MacOSX10.4u.sdk)
5518 # Build using 10.4 SDK, force usage of gcc when the
5519 # compiler is gcc, otherwise the user will get very
5520 # confusing error messages when building on OSX 10.6
5521 CC=gcc-4.0
5522 CPP=cpp-4.0
5523 ;;
5524 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5526$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005527 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005528
5529
5530 if test "${enable_universalsdk}"; then
5531 UNIVERSAL_ARCH_FLAGS=""
5532 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5533 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5534 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005535 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5537 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005538 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005539 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005540
5541 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5542 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005543 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005544 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005545
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005546 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5547 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005548 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005549 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005550
5551 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5552 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005553 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005554 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005555
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005556 else
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07005557 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 +00005558
5559 fi
5560
5561
Ronald Oussoren666028b2010-04-18 19:07:43 +00005562 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5563 if test "${UNIVERSALSDK}" != "/"
5564 then
5565 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5566 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005567 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005568 fi
5569 fi
5570
5571 # Calculate the right deployment target for this build.
5572 #
5573 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5574 if test ${cur_target} '>' 10.2; then
5575 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005576 if test ${enable_universalsdk}; then
5577 if test "${UNIVERSAL_ARCHS}" = "all"; then
5578 # Ensure that the default platform for a
5579 # 4-way universal build is OSX 10.5,
5580 # that's the first OS release where
5581 # 4-way builds make sense.
5582 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005583
5584 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5585 cur_target='10.5'
5586
5587 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5588 cur_target='10.5'
5589
5590 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5591 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005592 fi
5593 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005594 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005595 # On Intel macs default to a deployment
5596 # target of 10.4, that's the first OSX
5597 # release with Intel support.
5598 cur_target="10.4"
5599 fi
5600 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601 fi
5602 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5603
5604 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5605 # environment with a value that is the same as what we'll use
5606 # in the Makefile to ensure that we'll get the same compiler
5607 # environment during configure and build time.
5608 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5609 export MACOSX_DEPLOYMENT_TARGET
5610 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5611
5612 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613 esac
5614 ;;
5615
5616*)
5617 case $ac_sys_system in
5618 OpenUNIX*|UnixWare*)
5619 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5620 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005621 SCO_SV*)
5622 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5623 ;;
5624 esac
5625 ;;
5626esac
5627
5628if test "$Py_DEBUG" = 'true'; then
5629 :
5630else
5631 OPT="-DNDEBUG $OPT"
5632fi
5633
5634if test "$ac_arch_flags"
5635then
5636 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5637fi
5638
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639# Check whether GCC supports PyArg_ParseTuple format
5640if test "$GCC" = "yes"
5641then
Matthias Kloseb9621712010-04-24 17:59:49 +00005642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5643$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005644 save_CFLAGS=$CFLAGS
5645 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647/* end confdefs.h. */
5648
5649 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650int
5651main ()
5652{
5653
5654 ;
5655 return 0;
5656}
Matthias Kloseb159a552010-04-25 21:00:44 +00005657
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005659if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660
Matthias Kloseb159a552010-04-25 21:00:44 +00005661
Matthias Kloseb9621712010-04-24 17:59:49 +00005662$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663
Matthias Kloseb159a552010-04-25 21:00:44 +00005664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005665$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005666
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667else
Matthias Kloseb159a552010-04-25 21:00:44 +00005668
5669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005670$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671
5672fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5674 CFLAGS=$save_CFLAGS
5675fi
5676
5677# On some compilers, pthreads are available without further options
5678# (e.g. MacOS X). On some of these systems, the compiler will not
5679# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5680# So we have to see first whether pthreads are available without
5681# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5683$as_echo_n "checking whether pthreads are available without options... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005684if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005685 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686else
Matthias Kloseb9621712010-04-24 17:59:49 +00005687 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688 ac_cv_pthread_is_default=no
5689else
Matthias Kloseb9621712010-04-24 17:59:49 +00005690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691/* end confdefs.h. */
5692
5693#include <pthread.h>
5694
5695void* routine(void* p){return NULL;}
5696
5697int main(){
5698 pthread_t p;
5699 if(pthread_create(&p,NULL,routine,NULL)!=0)
5700 return 1;
5701 (void)pthread_detach(p);
5702 return 0;
5703}
5704
5705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005706if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707
5708 ac_cv_pthread_is_default=yes
5709 ac_cv_kthread=no
5710 ac_cv_pthread=no
5711
5712else
Matthias Kloseb9621712010-04-24 17:59:49 +00005713 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005715rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5716 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717fi
5718
5719
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720fi
5721
Matthias Kloseb9621712010-04-24 17:59:49 +00005722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5723$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724
5725
5726if test $ac_cv_pthread_is_default = yes
5727then
5728 ac_cv_kpthread=no
5729else
5730# -Kpthread, if available, provides the right #defines
5731# and linker options to make pthread_create available
5732# Some compilers won't report that they do not support -Kpthread,
5733# so we need to run a program to see whether it really made the
5734# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5736$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005737if test "${ac_cv_kpthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005738 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739else
5740 ac_save_cc="$CC"
5741CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005742if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743 ac_cv_kpthread=no
5744else
Matthias Kloseb9621712010-04-24 17:59:49 +00005745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746/* end confdefs.h. */
5747
5748#include <pthread.h>
5749
5750void* routine(void* p){return NULL;}
5751
5752int main(){
5753 pthread_t p;
5754 if(pthread_create(&p,NULL,routine,NULL)!=0)
5755 return 1;
5756 (void)pthread_detach(p);
5757 return 0;
5758}
5759
5760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005761if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762 ac_cv_kpthread=yes
5763else
Matthias Kloseb9621712010-04-24 17:59:49 +00005764 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5767 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768fi
5769
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770CC="$ac_save_cc"
5771fi
5772
Matthias Kloseb9621712010-04-24 17:59:49 +00005773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5774$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775fi
5776
5777if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5778then
5779# -Kthread, if available, provides the right #defines
5780# and linker options to make pthread_create available
5781# Some compilers won't report that they do not support -Kthread,
5782# so we need to run a program to see whether it really made the
5783# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5785$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005786if test "${ac_cv_kthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005787 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788else
5789 ac_save_cc="$CC"
5790CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005791if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792 ac_cv_kthread=no
5793else
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. */
5796
5797#include <pthread.h>
5798
5799void* routine(void* p){return NULL;}
5800
5801int main(){
5802 pthread_t p;
5803 if(pthread_create(&p,NULL,routine,NULL)!=0)
5804 return 1;
5805 (void)pthread_detach(p);
5806 return 0;
5807}
5808
5809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005810if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811 ac_cv_kthread=yes
5812else
Matthias Kloseb9621712010-04-24 17:59:49 +00005813 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005815rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5816 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817fi
5818
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819CC="$ac_save_cc"
5820fi
5821
Matthias Kloseb9621712010-04-24 17:59:49 +00005822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5823$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824fi
5825
5826if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5827then
5828# -pthread, if available, provides the right #defines
5829# and linker options to make pthread_create available
5830# Some compilers won't report that they do not support -pthread,
5831# so we need to run a program to see whether it really made the
5832# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5834$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005835if test "${ac_cv_thread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005836 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837else
5838 ac_save_cc="$CC"
5839CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005840if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841 ac_cv_pthread=no
5842else
Matthias Kloseb9621712010-04-24 17:59:49 +00005843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844/* end confdefs.h. */
5845
5846#include <pthread.h>
5847
5848void* routine(void* p){return NULL;}
5849
5850int main(){
5851 pthread_t p;
5852 if(pthread_create(&p,NULL,routine,NULL)!=0)
5853 return 1;
5854 (void)pthread_detach(p);
5855 return 0;
5856}
5857
5858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005859if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860 ac_cv_pthread=yes
5861else
Matthias Kloseb9621712010-04-24 17:59:49 +00005862 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5865 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866fi
5867
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868CC="$ac_save_cc"
5869fi
5870
Matthias Kloseb9621712010-04-24 17:59:49 +00005871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5872$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873fi
5874
5875# If we have set a CC compiler flag for thread support then
5876# check if it works for CXX, too.
5877ac_cv_cxx_thread=no
5878if test ! -z "$CXX"
5879then
Matthias Kloseb9621712010-04-24 17:59:49 +00005880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5881$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882ac_save_cxx="$CXX"
5883
5884if test "$ac_cv_kpthread" = "yes"
5885then
5886 CXX="$CXX -Kpthread"
5887 ac_cv_cxx_thread=yes
5888elif test "$ac_cv_kthread" = "yes"
5889then
5890 CXX="$CXX -Kthread"
5891 ac_cv_cxx_thread=yes
5892elif test "$ac_cv_pthread" = "yes"
5893then
5894 CXX="$CXX -pthread"
5895 ac_cv_cxx_thread=yes
5896fi
5897
5898if test $ac_cv_cxx_thread = yes
5899then
5900 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5901 $CXX -c conftest.$ac_ext 2>&5
5902 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5903 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5904 then
5905 ac_cv_cxx_thread=yes
5906 else
5907 ac_cv_cxx_thread=no
5908 fi
5909 rm -fr conftest*
5910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5912$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913fi
5914CXX="$ac_save_cxx"
5915
5916
5917# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5919$as_echo_n "checking for ANSI C header files... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005920if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005921 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922else
Matthias Kloseb9621712010-04-24 17:59:49 +00005923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924/* end confdefs.h. */
5925#include <stdlib.h>
5926#include <stdarg.h>
5927#include <string.h>
5928#include <float.h>
5929
5930int
5931main ()
5932{
5933
5934 ;
5935 return 0;
5936}
5937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005938if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939 ac_cv_header_stdc=yes
5940else
Matthias Kloseb9621712010-04-24 17:59:49 +00005941 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5944
5945if test $ac_cv_header_stdc = yes; then
5946 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948/* end confdefs.h. */
5949#include <string.h>
5950
5951_ACEOF
5952if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005953 $EGREP "memchr" >/dev/null 2>&1; then :
5954
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955else
5956 ac_cv_header_stdc=no
5957fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005958rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959
5960fi
5961
5962if test $ac_cv_header_stdc = yes; then
5963 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965/* end confdefs.h. */
5966#include <stdlib.h>
5967
5968_ACEOF
5969if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005970 $EGREP "free" >/dev/null 2>&1; then :
5971
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972else
5973 ac_cv_header_stdc=no
5974fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005975rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976
5977fi
5978
5979if test $ac_cv_header_stdc = yes; then
5980 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005981 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982 :
5983else
Matthias Kloseb9621712010-04-24 17:59:49 +00005984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985/* end confdefs.h. */
5986#include <ctype.h>
5987#include <stdlib.h>
5988#if ((' ' & 0x0FF) == 0x020)
5989# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5990# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5991#else
5992# define ISLOWER(c) \
5993 (('a' <= (c) && (c) <= 'i') \
5994 || ('j' <= (c) && (c) <= 'r') \
5995 || ('s' <= (c) && (c) <= 'z'))
5996# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5997#endif
5998
5999#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6000int
6001main ()
6002{
6003 int i;
6004 for (i = 0; i < 256; i++)
6005 if (XOR (islower (i), ISLOWER (i))
6006 || toupper (i) != TOUPPER (i))
6007 return 2;
6008 return 0;
6009}
6010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006011if ac_fn_c_try_run "$LINENO"; then :
6012
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013else
Matthias Kloseb9621712010-04-24 17:59:49 +00006014 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006016rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6017 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006018fi
6019
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020fi
6021fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6023$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006024if test $ac_cv_header_stdc = yes; then
6025
Matthias Kloseb9621712010-04-24 17:59:49 +00006026$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027
6028fi
6029
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006030for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6031fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006032ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006033shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006034unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006035sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6036sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006037sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6038sys/stat.h sys/termio.h sys/time.h \
6039sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
6040libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006041bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006042do :
6043 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6044ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006045if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006046 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006047#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006048_ACEOF
6049
6050fi
6051
Guido van Rossum627b2d71993-12-24 10:39:16 +00006052done
6053
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006054ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006055for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006056 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6058$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006059if eval "test \"\${$as_ac_Header+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006060 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006061else
Matthias Kloseb9621712010-04-24 17:59:49 +00006062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006063/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006064#include <sys/types.h>
6065#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006066
Martin v. Löwis11437992002-04-12 09:54:03 +00006067int
6068main ()
6069{
6070if ((DIR *) 0)
6071return 0;
6072 ;
6073 return 0;
6074}
6075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006076if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006077 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006078else
Matthias Kloseb9621712010-04-24 17:59:49 +00006079 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006082fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006083eval ac_res=\$$as_ac_Header
6084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6085$as_echo "$ac_res" >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006086if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006087 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006088#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006089_ACEOF
6090
6091ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006092fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006093
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006094done
6095# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6096if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6098$as_echo_n "checking for library containing opendir... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006099if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006100 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006101else
Martin v. Löwis11437992002-04-12 09:54:03 +00006102 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006105
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006106/* Override any GCC internal prototype to avoid an error.
6107 Use char because int might match the return type of a GCC
6108 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006109#ifdef __cplusplus
6110extern "C"
6111#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006112char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006113int
6114main ()
6115{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006116return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006117 ;
6118 return 0;
6119}
6120_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006121for ac_lib in '' dir; do
6122 if test -z "$ac_lib"; then
6123 ac_res="none required"
6124 else
6125 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006126 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006127 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006128 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006129 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006130fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006131rm -f core conftest.err conftest.$ac_objext \
6132 conftest$ac_exeext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006133 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006134 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006136done
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006137if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006138
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006139else
6140 ac_cv_search_opendir=no
6141fi
6142rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006143LIBS=$ac_func_search_save_LIBS
6144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6146$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006147ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006148if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006149 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006150
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006151fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006152
Michael W. Hudson54241132001-12-07 15:38:26 +00006153else
Matthias Kloseb9621712010-04-24 17:59:49 +00006154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6155$as_echo_n "checking for library containing opendir... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006156if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006157 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006158else
6159 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006162
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006163/* Override any GCC internal prototype to avoid an error.
6164 Use char because int might match the return type of a GCC
6165 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006166#ifdef __cplusplus
6167extern "C"
6168#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006169char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006170int
6171main ()
6172{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006173return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006174 ;
6175 return 0;
6176}
6177_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006178for ac_lib in '' x; do
6179 if test -z "$ac_lib"; then
6180 ac_res="none required"
6181 else
6182 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006183 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006184 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006185 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006186 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006187fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006188rm -f core conftest.err conftest.$ac_objext \
6189 conftest$ac_exeext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006190 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006191 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006193done
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006194if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006195
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006196else
6197 ac_cv_search_opendir=no
6198fi
6199rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006200LIBS=$ac_func_search_save_LIBS
6201fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6203$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006204ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006205if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006206 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006207
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006208fi
6209
6210fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006211
Matthias Kloseb9621712010-04-24 17:59:49 +00006212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6213$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006214if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006215 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006216else
Matthias Kloseb9621712010-04-24 17:59:49 +00006217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006218/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006219#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006220int
6221main ()
6222{
6223return makedev(0, 0);
6224 ;
6225 return 0;
6226}
6227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006228if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006229 ac_cv_header_sys_types_h_makedev=yes
6230else
Matthias Kloseb9621712010-04-24 17:59:49 +00006231 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006233rm -f core conftest.err conftest.$ac_objext \
6234 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006235
6236fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6238$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006239
6240if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006241ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006242if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006243
Matthias Kloseb9621712010-04-24 17:59:49 +00006244$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006245
6246fi
6247
6248
6249
6250 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006251 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006252if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006253
Matthias Kloseb9621712010-04-24 17:59:49 +00006254$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006255
6256fi
6257
6258
6259 fi
6260fi
6261
Michael W. Hudson54241132001-12-07 15:38:26 +00006262
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006263# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006264for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006265do :
6266 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006267#ifdef HAVE_CURSES_H
6268#include <curses.h>
6269#endif
6270
Matthias Kloseb9621712010-04-24 17:59:49 +00006271"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006272if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006273 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006274#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006275_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006276
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006277fi
6278
6279done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006280
6281
Martin v. Löwis11017b12006-01-14 18:12:57 +00006282# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006283for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006284do :
6285 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 +00006286#ifdef HAVE_ASM_TYPES_H
6287#include <asm/types.h>
6288#endif
6289#ifdef HAVE_SYS_SOCKET_H
6290#include <sys/socket.h>
6291#endif
6292
Matthias Kloseb9621712010-04-24 17:59:49 +00006293"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006294if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006295 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006296#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006297_ACEOF
6298
6299fi
6300
6301done
6302
6303
Guido van Rossum627b2d71993-12-24 10:39:16 +00006304# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006305was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6307$as_echo_n "checking for clock_t in time.h... " >&6; }
6308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006309/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006310#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006311
6312_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006313if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006314 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006315 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006316else
Martin v. Löwis11437992002-04-12 09:54:03 +00006317
6318
Matthias Kloseb9621712010-04-24 17:59:49 +00006319$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006320
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006321
Guido van Rossum627b2d71993-12-24 10:39:16 +00006322fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006323rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006324
Matthias Kloseb9621712010-04-24 17:59:49 +00006325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6326$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006327
Matthias Kloseb9621712010-04-24 17:59:49 +00006328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6329$as_echo_n "checking for makedev... " >&6; }
6330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006331/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006332
Jesus Cea740f53a2010-04-28 11:35:30 +00006333#if defined(MAJOR_IN_MKDEV)
6334#include <sys/mkdev.h>
6335#elif defined(MAJOR_IN_SYSMACROS)
6336#include <sys/sysmacros.h>
6337#else
6338#include <sys/types.h>
6339#endif
6340
Neal Norwitz11690112002-07-30 01:08:28 +00006341int
6342main ()
6343{
Jesus Cea740f53a2010-04-28 11:35:30 +00006344
6345 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006346 ;
6347 return 0;
6348}
Matthias Kloseb159a552010-04-25 21:00:44 +00006349
Neal Norwitz11690112002-07-30 01:08:28 +00006350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006351if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006352 ac_cv_has_makedev=yes
6353else
Matthias Kloseb9621712010-04-24 17:59:49 +00006354 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006355fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006356rm -f core conftest.err conftest.$ac_objext \
6357 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6359$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006360if test "$ac_cv_has_makedev" = "yes"; then
6361
Matthias Kloseb9621712010-04-24 17:59:49 +00006362$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006363
6364fi
6365
Martin v. Löwis399a6892002-10-04 10:22:02 +00006366# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6367# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6368# defined, but the compiler does not support pragma redefine_extname,
6369# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6370# structures (such as rlimit64) without declaring them. As a
6371# work-around, disable LFS on such configurations
6372
6373use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6375$as_echo_n "checking Solaris LFS bug... " >&6; }
6376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006377/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006378
6379#define _LARGEFILE_SOURCE 1
6380#define _FILE_OFFSET_BITS 64
6381#include <sys/resource.h>
6382
Martin v. Löwis399a6892002-10-04 10:22:02 +00006383int
6384main ()
6385{
6386struct rlimit foo;
6387 ;
6388 return 0;
6389}
6390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006391if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006392 sol_lfs_bug=no
6393else
Matthias Kloseb9621712010-04-24 17:59:49 +00006394 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6398$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006399if test "$sol_lfs_bug" = "yes"; then
6400 use_lfs=no
6401fi
6402
6403if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006404# Two defines needed to enable largefile support on various platforms
6405# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006406case $ac_sys_system/$ac_sys_release in
6407AIX*)
6408
6409$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6410
6411 ;;
6412esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006413
Matthias Kloseb9621712010-04-24 17:59:49 +00006414$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006415
6416
Matthias Kloseb9621712010-04-24 17:59:49 +00006417$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006418
Martin v. Löwis399a6892002-10-04 10:22:02 +00006419fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006420
Guido van Rossum84e7b241996-08-19 21:59:00 +00006421# Add some code to confdefs.h so that the test for off_t works on SCO
6422cat >> confdefs.h <<\EOF
6423#if defined(SCO_DS)
6424#undef _OFF_T
6425#endif
6426EOF
6427
Guido van Rossumef2255b2000-03-10 22:30:29 +00006428# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006429ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006430if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006431
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006432else
Martin v. Löwis11437992002-04-12 09:54:03 +00006433
6434cat >>confdefs.h <<_ACEOF
6435#define mode_t int
6436_ACEOF
6437
6438fi
6439
Matthias Kloseb9621712010-04-24 17:59:49 +00006440ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006441if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006442
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006443else
Martin v. Löwis11437992002-04-12 09:54:03 +00006444
6445cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006446#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006447_ACEOF
6448
6449fi
6450
Matthias Kloseb9621712010-04-24 17:59:49 +00006451ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006452if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006453
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006454else
Martin v. Löwis11437992002-04-12 09:54:03 +00006455
6456cat >>confdefs.h <<_ACEOF
6457#define pid_t int
6458_ACEOF
6459
6460fi
6461
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006462
Martin v. Löwis11437992002-04-12 09:54:03 +00006463cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006464#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006465_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006466
Matthias Kloseb9621712010-04-24 17:59:49 +00006467ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006468if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006469
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006470else
Martin v. Löwis11437992002-04-12 09:54:03 +00006471
6472cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006473#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006474_ACEOF
6475
6476fi
6477
Matthias Kloseb9621712010-04-24 17:59:49 +00006478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6479$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006480if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006481 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006482else
Matthias Kloseb9621712010-04-24 17:59:49 +00006483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006484/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006485#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006486
6487_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006488if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006489 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006490 ac_cv_type_uid_t=yes
6491else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006492 ac_cv_type_uid_t=no
6493fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006494rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006495
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6498$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006499if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006500
Matthias Kloseb9621712010-04-24 17:59:49 +00006501$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006502
6503
Matthias Kloseb9621712010-04-24 17:59:49 +00006504$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006505
6506fi
6507
Matthias Kloseb9621712010-04-24 17:59:49 +00006508ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6509case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006510 no|yes) ;; #(
6511 *)
6512
Matthias Kloseb9621712010-04-24 17:59:49 +00006513$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006514
6515
6516cat >>confdefs.h <<_ACEOF
6517#define uint32_t $ac_cv_c_uint32_t
6518_ACEOF
6519;;
6520 esac
6521
Matthias Kloseb9621712010-04-24 17:59:49 +00006522ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6523case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006524 no|yes) ;; #(
6525 *)
6526
Matthias Kloseb9621712010-04-24 17:59:49 +00006527$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006528
6529
6530cat >>confdefs.h <<_ACEOF
6531#define uint64_t $ac_cv_c_uint64_t
6532_ACEOF
6533;;
6534 esac
6535
Matthias Kloseb9621712010-04-24 17:59:49 +00006536ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6537case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006538 no|yes) ;; #(
6539 *)
6540
6541cat >>confdefs.h <<_ACEOF
6542#define int32_t $ac_cv_c_int32_t
6543_ACEOF
6544;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006545esac
6546
Matthias Kloseb9621712010-04-24 17:59:49 +00006547ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6548case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006549 no|yes) ;; #(
6550 *)
6551
6552cat >>confdefs.h <<_ACEOF
6553#define int64_t $ac_cv_c_int64_t
6554_ACEOF
6555;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006556esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006557
Matthias Kloseb9621712010-04-24 17:59:49 +00006558ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006559if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006560
Matthias Kloseb9621712010-04-24 17:59:49 +00006561$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006562
6563fi
6564
Jack Jansendd19cf82001-12-06 22:36:17 +00006565
Michael W. Hudson54241132001-12-07 15:38:26 +00006566# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006567# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006568# The cast to long int works around a bug in the HP C Compiler
6569# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6570# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6571# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6573$as_echo_n "checking size of int... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006574if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006575 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006576else
Matthias Kloseb9621712010-04-24 17:59:49 +00006577 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 +00006578
Martin v. Löwis11437992002-04-12 09:54:03 +00006579else
Matthias Kloseb9621712010-04-24 17:59:49 +00006580 if test "$ac_cv_type_int" = yes; then
6581 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6582$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006583as_fn_error 77 "cannot compute sizeof (int)
6584See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006585 else
6586 ac_cv_sizeof_int=0
6587 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006589
Martin v. Löwis11437992002-04-12 09:54:03 +00006590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6592$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006593
6594
6595
Martin v. Löwis11437992002-04-12 09:54:03 +00006596cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006597#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006598_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006599
6600
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006601# The cast to long int works around a bug in the HP C Compiler
6602# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6603# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6604# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6606$as_echo_n "checking size of long... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006607if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006608 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006609else
Matthias Kloseb9621712010-04-24 17:59:49 +00006610 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 +00006611
Martin v. Löwis11437992002-04-12 09:54:03 +00006612else
Matthias Kloseb9621712010-04-24 17:59:49 +00006613 if test "$ac_cv_type_long" = yes; then
6614 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6615$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006616as_fn_error 77 "cannot compute sizeof (long)
6617See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006618 else
6619 ac_cv_sizeof_long=0
6620 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006622
Martin v. Löwis11437992002-04-12 09:54:03 +00006623fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6625$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006626
6627
6628
Martin v. Löwis11437992002-04-12 09:54:03 +00006629cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006630#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006631_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006632
6633
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006634# The cast to long int works around a bug in the HP C Compiler
6635# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6636# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6637# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6639$as_echo_n "checking size of void *... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006640if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006641 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006642else
Matthias Kloseb9621712010-04-24 17:59:49 +00006643 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 +00006644
Martin v. Löwis11437992002-04-12 09:54:03 +00006645else
Matthias Kloseb9621712010-04-24 17:59:49 +00006646 if test "$ac_cv_type_void_p" = yes; then
6647 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6648$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006649as_fn_error 77 "cannot compute sizeof (void *)
6650See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006651 else
6652 ac_cv_sizeof_void_p=0
6653 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006655
Martin v. Löwis11437992002-04-12 09:54:03 +00006656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6658$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006659
6660
6661
Martin v. Löwis11437992002-04-12 09:54:03 +00006662cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006663#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006664_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006665
6666
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006667# The cast to long int works around a bug in the HP C Compiler
6668# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6669# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6670# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6672$as_echo_n "checking size of short... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006673if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006674 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006675else
Matthias Kloseb9621712010-04-24 17:59:49 +00006676 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 +00006677
Martin v. Löwis11437992002-04-12 09:54:03 +00006678else
Matthias Kloseb9621712010-04-24 17:59:49 +00006679 if test "$ac_cv_type_short" = yes; then
6680 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6681$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006682as_fn_error 77 "cannot compute sizeof (short)
6683See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006684 else
6685 ac_cv_sizeof_short=0
6686 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006688
Martin v. Löwis11437992002-04-12 09:54:03 +00006689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6691$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006692
6693
6694
Martin v. Löwis11437992002-04-12 09:54:03 +00006695cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006696#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006697_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006698
6699
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006700# The cast to long int works around a bug in the HP C Compiler
6701# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6702# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6703# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6705$as_echo_n "checking size of float... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006706if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006707 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006708else
Matthias Kloseb9621712010-04-24 17:59:49 +00006709 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 +00006710
Martin v. Löwis11437992002-04-12 09:54:03 +00006711else
Matthias Kloseb9621712010-04-24 17:59:49 +00006712 if test "$ac_cv_type_float" = yes; then
6713 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6714$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006715as_fn_error 77 "cannot compute sizeof (float)
6716See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006717 else
6718 ac_cv_sizeof_float=0
6719 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006720fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006721
Martin v. Löwis11437992002-04-12 09:54:03 +00006722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6724$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006725
6726
6727
Martin v. Löwis11437992002-04-12 09:54:03 +00006728cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006729#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006730_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006731
6732
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006733# The cast to long int works around a bug in the HP C Compiler
6734# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6735# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6736# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6738$as_echo_n "checking size of double... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006739if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006740 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006741else
Matthias Kloseb9621712010-04-24 17:59:49 +00006742 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 +00006743
Martin v. Löwis11437992002-04-12 09:54:03 +00006744else
Matthias Kloseb9621712010-04-24 17:59:49 +00006745 if test "$ac_cv_type_double" = yes; then
6746 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6747$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006748as_fn_error 77 "cannot compute sizeof (double)
6749See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006750 else
6751 ac_cv_sizeof_double=0
6752 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006754
Martin v. Löwis11437992002-04-12 09:54:03 +00006755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6757$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006758
6759
6760
Martin v. Löwis11437992002-04-12 09:54:03 +00006761cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006762#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006763_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006764
6765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006766# The cast to long int works around a bug in the HP C Compiler
6767# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6768# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6769# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6771$as_echo_n "checking size of fpos_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006772if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006773 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006774else
Matthias Kloseb9621712010-04-24 17:59:49 +00006775 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 +00006776
Martin v. Löwis11437992002-04-12 09:54:03 +00006777else
Matthias Kloseb9621712010-04-24 17:59:49 +00006778 if test "$ac_cv_type_fpos_t" = yes; then
6779 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6780$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006781as_fn_error 77 "cannot compute sizeof (fpos_t)
6782See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006783 else
6784 ac_cv_sizeof_fpos_t=0
6785 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006787
Martin v. Löwis11437992002-04-12 09:54:03 +00006788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6790$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006791
6792
6793
Martin v. Löwis11437992002-04-12 09:54:03 +00006794cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006795#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006796_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006797
Michael W. Hudson54241132001-12-07 15:38:26 +00006798
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006799# The cast to long int works around a bug in the HP C Compiler
6800# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6801# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6802# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6804$as_echo_n "checking size of size_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006805if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006806 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006807else
Matthias Kloseb9621712010-04-24 17:59:49 +00006808 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 +00006809
Martin v. Löwis18e16552006-02-15 17:27:45 +00006810else
Matthias Kloseb9621712010-04-24 17:59:49 +00006811 if test "$ac_cv_type_size_t" = yes; then
6812 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6813$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006814as_fn_error 77 "cannot compute sizeof (size_t)
6815See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006816 else
6817 ac_cv_sizeof_size_t=0
6818 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006820
Martin v. Löwis18e16552006-02-15 17:27:45 +00006821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6823$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006824
6825
6826
Martin v. Löwis18e16552006-02-15 17:27:45 +00006827cat >>confdefs.h <<_ACEOF
6828#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6829_ACEOF
6830
6831
Christian Heimes400adb02008-02-01 08:12:03 +00006832# The cast to long int works around a bug in the HP C Compiler
6833# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6834# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6835# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6837$as_echo_n "checking size of pid_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006838if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006839 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006840else
Matthias Kloseb9621712010-04-24 17:59:49 +00006841 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 +00006842
Christian Heimes400adb02008-02-01 08:12:03 +00006843else
Matthias Kloseb9621712010-04-24 17:59:49 +00006844 if test "$ac_cv_type_pid_t" = yes; then
6845 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6846$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006847as_fn_error 77 "cannot compute sizeof (pid_t)
6848See \`config.log' for more details" "$LINENO" 5 ; }
Christian Heimes400adb02008-02-01 08:12:03 +00006849 else
6850 ac_cv_sizeof_pid_t=0
6851 fi
6852fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006853
Christian Heimes400adb02008-02-01 08:12:03 +00006854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6856$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006857
6858
6859
6860cat >>confdefs.h <<_ACEOF
6861#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6862_ACEOF
6863
6864
Michael W. Hudson54241132001-12-07 15:38:26 +00006865
Matthias Kloseb9621712010-04-24 17:59:49 +00006866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6867$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006868have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006870/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006871
Martin v. Löwis11437992002-04-12 09:54:03 +00006872int
6873main ()
6874{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006875long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006876 ;
6877 return 0;
6878}
6879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006880if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006881
6882
Matthias Kloseb9621712010-04-24 17:59:49 +00006883$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006884
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006885 have_long_long=yes
6886
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6890$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006891if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006892# The cast to long int works around a bug in the HP C Compiler
6893# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6894# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6895# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6897$as_echo_n "checking size of long long... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006898if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006899 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006900else
Matthias Kloseb9621712010-04-24 17:59:49 +00006901 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 +00006902
Martin v. Löwis11437992002-04-12 09:54:03 +00006903else
Matthias Kloseb9621712010-04-24 17:59:49 +00006904 if test "$ac_cv_type_long_long" = yes; then
6905 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6906$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006907as_fn_error 77 "cannot compute sizeof (long long)
6908See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006909 else
6910 ac_cv_sizeof_long_long=0
6911 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006913
Martin v. Löwis11437992002-04-12 09:54:03 +00006914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6916$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006917
6918
6919
Martin v. Löwis11437992002-04-12 09:54:03 +00006920cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006921#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006922_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006923
Michael W. Hudson54241132001-12-07 15:38:26 +00006924
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006925fi
6926
Matthias Kloseb9621712010-04-24 17:59:49 +00006927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6928$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006929have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006931/* end confdefs.h. */
6932
6933int
6934main ()
6935{
6936long double x; x = (long double)0;
6937 ;
6938 return 0;
6939}
6940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006941if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006942
6943
Matthias Kloseb9621712010-04-24 17:59:49 +00006944$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006945
6946 have_long_double=yes
6947
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006948fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6951$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006952if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006953# The cast to long int works around a bug in the HP C Compiler
6954# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6955# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6956# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6958$as_echo_n "checking size of long double... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006959if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006960 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006961else
Matthias Kloseb9621712010-04-24 17:59:49 +00006962 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 +00006963
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006964else
Matthias Kloseb9621712010-04-24 17:59:49 +00006965 if test "$ac_cv_type_long_double" = yes; then
6966 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6967$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006968as_fn_error 77 "cannot compute sizeof (long double)
6969See \`config.log' for more details" "$LINENO" 5 ; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006970 else
6971 ac_cv_sizeof_long_double=0
6972 fi
6973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006974
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6977$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006978
6979
6980
6981cat >>confdefs.h <<_ACEOF
6982#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6983_ACEOF
6984
6985
6986fi
6987
6988
Matthias Kloseb9621712010-04-24 17:59:49 +00006989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6990$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006991have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00006993/* end confdefs.h. */
6994
6995int
6996main ()
6997{
6998_Bool x; x = (_Bool)0;
6999 ;
7000 return 0;
7001}
7002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007003if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007004
7005
Matthias Kloseb9621712010-04-24 17:59:49 +00007006$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007007
7008 have_c99_bool=yes
7009
Thomas Woutersb2137042007-02-01 18:02:27 +00007010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7013$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007014if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007015# The cast to long int works around a bug in the HP C Compiler
7016# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7017# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7018# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7020$as_echo_n "checking size of _Bool... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007021if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007022 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007023else
Matthias Kloseb9621712010-04-24 17:59:49 +00007024 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 +00007025
Thomas Woutersb2137042007-02-01 18:02:27 +00007026else
Matthias Kloseb9621712010-04-24 17:59:49 +00007027 if test "$ac_cv_type__Bool" = yes; then
7028 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7029$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07007030as_fn_error 77 "cannot compute sizeof (_Bool)
7031See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007032 else
7033 ac_cv_sizeof__Bool=0
7034 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007035fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007036
Thomas Woutersb2137042007-02-01 18:02:27 +00007037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7039$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007040
7041
7042
Thomas Woutersb2137042007-02-01 18:02:27 +00007043cat >>confdefs.h <<_ACEOF
7044#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7045_ACEOF
7046
7047
7048fi
7049
Matthias Kloseb9621712010-04-24 17:59:49 +00007050ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007051 #include <stdint.h>
7052 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007053 #ifdef HAVE_INTTYPES_H
7054 #include <inttypes.h>
7055 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007056"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007057if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007058
7059cat >>confdefs.h <<_ACEOF
7060#define HAVE_UINTPTR_T 1
7061_ACEOF
7062
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007063# The cast to long int works around a bug in the HP C Compiler
7064# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7065# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7066# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7068$as_echo_n "checking size of uintptr_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007069if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007070 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007071else
Matthias Kloseb9621712010-04-24 17:59:49 +00007072 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 +00007073
Martin v. Löwis11437992002-04-12 09:54:03 +00007074else
Matthias Kloseb9621712010-04-24 17:59:49 +00007075 if test "$ac_cv_type_uintptr_t" = yes; then
7076 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7077$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07007078as_fn_error 77 "cannot compute sizeof (uintptr_t)
7079See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007080 else
7081 ac_cv_sizeof_uintptr_t=0
7082 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007083fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007084
Martin v. Löwis11437992002-04-12 09:54:03 +00007085fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7087$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007088
7089
7090
Martin v. Löwis11437992002-04-12 09:54:03 +00007091cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007092#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007093_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007094
Michael W. Hudson54241132001-12-07 15:38:26 +00007095
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007096fi
7097
Thomas Wouters89f507f2006-12-13 04:49:30 +00007098
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007099# The cast to long int works around a bug in the HP C Compiler
7100# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7101# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7102# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7104$as_echo_n "checking size of off_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007105if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007106 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007107else
Matthias Kloseb9621712010-04-24 17:59:49 +00007108 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007109#ifdef HAVE_SYS_TYPES_H
7110#include <sys/types.h>
7111#endif
7112
Matthias Kloseb9621712010-04-24 17:59:49 +00007113"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007114
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007115else
Matthias Kloseb9621712010-04-24 17:59:49 +00007116 if test "$ac_cv_type_off_t" = yes; then
7117 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7118$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07007119as_fn_error 77 "cannot compute sizeof (off_t)
7120See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007121 else
7122 ac_cv_sizeof_off_t=0
7123 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007124fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007125
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7128$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007129
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007130
7131
Martin v. Löwis11437992002-04-12 09:54:03 +00007132cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007133#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007134_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007135
Michael W. Hudson54241132001-12-07 15:38:26 +00007136
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007137
Matthias Kloseb9621712010-04-24 17:59:49 +00007138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7139$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007140if test "$have_long_long" = yes
7141then
7142if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007143 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007144
Matthias Kloseb9621712010-04-24 17:59:49 +00007145$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007146
Matthias Kloseb9621712010-04-24 17:59:49 +00007147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7148$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007149else
Matthias Kloseb9621712010-04-24 17:59:49 +00007150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7151$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007152fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007153else
Matthias Kloseb9621712010-04-24 17:59:49 +00007154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7155$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007156fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007157
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +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 time_t" >&5
7163$as_echo_n "checking size of time_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007164if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007165 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007166else
Matthias Kloseb9621712010-04-24 17:59:49 +00007167 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007168#ifdef HAVE_SYS_TYPES_H
7169#include <sys/types.h>
7170#endif
7171#ifdef HAVE_TIME_H
7172#include <time.h>
7173#endif
7174
Matthias Kloseb9621712010-04-24 17:59:49 +00007175"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007176
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007177else
Matthias Kloseb9621712010-04-24 17:59:49 +00007178 if test "$ac_cv_type_time_t" = yes; then
7179 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7180$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07007181as_fn_error 77 "cannot compute sizeof (time_t)
7182See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007183 else
7184 ac_cv_sizeof_time_t=0
7185 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007186fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007187
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7190$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007191
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007192
7193
Martin v. Löwis11437992002-04-12 09:54:03 +00007194cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007195#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007196_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007197
Michael W. Hudson54241132001-12-07 15:38:26 +00007198
7199
Trent Mick635f6fb2000-08-23 21:33:05 +00007200# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007201ac_save_cc="$CC"
7202if test "$ac_cv_kpthread" = "yes"
7203then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007204elif test "$ac_cv_kthread" = "yes"
7205then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007206elif test "$ac_cv_pthread" = "yes"
7207then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007208fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007209
Matthias Kloseb9621712010-04-24 17:59:49 +00007210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7211$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007212have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007214/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007215
7216 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007217int
7218main ()
7219{
Guido van Rossum12580492000-09-24 16:47:19 +00007220pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007221 ;
7222 return 0;
7223}
Matthias Kloseb159a552010-04-25 21:00:44 +00007224
Martin v. Löwis11437992002-04-12 09:54:03 +00007225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007226if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007227 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7231$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007232if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007233 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007234# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7235# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7236# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7238$as_echo_n "checking size of pthread_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007239if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007240 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007241else
Matthias Kloseb9621712010-04-24 17:59:49 +00007242 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007243#ifdef HAVE_PTHREAD_H
7244#include <pthread.h>
7245#endif
7246
Matthias Kloseb9621712010-04-24 17:59:49 +00007247"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007248
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007249else
Matthias Kloseb9621712010-04-24 17:59:49 +00007250 if test "$ac_cv_type_pthread_t" = yes; then
7251 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7252$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07007253as_fn_error 77 "cannot compute sizeof (pthread_t)
7254See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007255 else
7256 ac_cv_sizeof_pthread_t=0
7257 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007258fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007259
Trent Mick635f6fb2000-08-23 21:33:05 +00007260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7262$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007263
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007264
7265
Martin v. Löwis11437992002-04-12 09:54:03 +00007266cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007267#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007268_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007269
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007270
Trent Mick635f6fb2000-08-23 21:33:05 +00007271fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007272CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007273
Michael W. Hudson54241132001-12-07 15:38:26 +00007274
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007275case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007276 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007277 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7278 ;;
7279 Darwin/*)
7280 OTHER_LIBTOOL_OPT=""
7281 ;;
7282esac
7283
7284
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007285ARCH_RUN_32BIT=""
7286
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007287case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007288 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007289 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7290 if test "${enable_universalsdk}"; then
7291 :
7292 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007293 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007294 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007295 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007296 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007297 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007298 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007299 if test ${gcc_version} '<' 4.0
7300 then
7301 LIBTOOL_CRUFT="-lcc_dynamic"
7302 else
7303 LIBTOOL_CRUFT=""
7304 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007305 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007306 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007307else
Matthias Kloseb9621712010-04-24 17:59:49 +00007308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007309/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007310
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007311 #include <unistd.h>
7312 int main(int argc, char*argv[])
7313 {
7314 if (sizeof(long) == 4) {
7315 return 0;
7316 } else {
7317 return 1;
7318 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007319 }
7320
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007322if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007323 ac_osx_32bit=yes
7324else
Matthias Kloseb9621712010-04-24 17:59:49 +00007325 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007326fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007327rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7328 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007329fi
7330
7331
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007332 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007333 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007334 i386)
7335 MACOSX_DEFAULT_ARCH="i386"
7336 ;;
7337 ppc)
7338 MACOSX_DEFAULT_ARCH="ppc"
7339 ;;
7340 *)
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07007341 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007342 ;;
7343 esac
7344 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007345 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007346 i386)
7347 MACOSX_DEFAULT_ARCH="x86_64"
7348 ;;
7349 ppc)
7350 MACOSX_DEFAULT_ARCH="ppc64"
7351 ;;
7352 *)
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07007353 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007354 ;;
7355 esac
7356
7357 #ARCH_RUN_32BIT="true"
7358 fi
7359
7360 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007361 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007362 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007363esac
7364
Matthias Kloseb9621712010-04-24 17:59:49 +00007365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7366$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007367if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007368then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007369 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007370 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007371 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007372
Matthias Kloseb9621712010-04-24 17:59:49 +00007373$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007374
Matthias Kloseb9621712010-04-24 17:59:49 +00007375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7376$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007377 if test $enable_shared = "yes"
7378 then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07007379 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 +00007380 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007381else
Matthias Kloseb9621712010-04-24 17:59:49 +00007382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7383$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007384fi
7385
Matthias Kloseb9621712010-04-24 17:59:49 +00007386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7387$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007388case $ac_sys_system/$ac_sys_release in
7389 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007390
Matthias Kloseb9621712010-04-24 17:59:49 +00007391$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007392
Matthias Kloseb9621712010-04-24 17:59:49 +00007393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7394$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007395 ;;
7396 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7398$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007399 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007400esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007401
Guido van Rossum0a516c91994-09-12 10:58:40 +00007402# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007403
Michael W. Hudson54241132001-12-07 15:38:26 +00007404
7405
7406
7407
Benjamin Peterson99f03762010-04-11 22:15:28 +00007408
Thomas Wouters477c8d52006-05-27 19:21:47 +00007409
Georg Brandlb1441c72009-01-03 22:33:39 +00007410
Thomas Wouters477c8d52006-05-27 19:21:47 +00007411cat >>confdefs.h <<_ACEOF
7412#define SHLIB_EXT "$SO"
7413_ACEOF
7414
Guido van Rossum0a516c91994-09-12 10:58:40 +00007415# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007416# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007417# (Shared libraries in this instance are shared modules to be loaded into
7418# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7420$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007421if test -z "$LDSHARED"
7422then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007423 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007424 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007425 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007426 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007427 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007428 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007429 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007430 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007431 if test "$GCC" = "yes" ; then
7432 LDSHARED='$(CC) -shared'
7433 LDCXXSHARED='$(CXX) -shared'
7434 else
7435 LDSHARED='$(CC) -G'
7436 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007437 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007438 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007439 if test "$GCC" = "yes" ; then
7440 LDSHARED='$(CC) -shared'
7441 LDCXXSHARED='$(CXX) -shared'
7442 else
7443 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007444 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007445 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007446 LDSHARED='$(CC) -bundle'
7447 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007448 if test "$enable_framework" ; then
7449 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007450 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7451 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007452 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007453 else
7454 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007455 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007456 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007457 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007458 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007459 LDSHARED='$(CC) -bundle'
7460 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007461 if test "$enable_framework" ; then
7462 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007463 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7464 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007465 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007466 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007467 # No framework, use the Python app as bundle-loader
7468 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007469 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007470 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007471 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007472 Darwin/*)
7473 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7474 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007475
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007476 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007477 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007478 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007479 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007480 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007481 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7482 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007483 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007484 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007485 LDSHARED='$(CC) -bundle'
7486 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007487 if test "$enable_framework" ; then
7488 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007489 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7490 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007491 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007492 else
7493 # No framework, use the Python app as bundle-loader
7494 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7495 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007496 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007497 fi
7498 fi
7499 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007500 Linux*|GNU*|QNX*)
7501 LDSHARED='$(CC) -shared'
7502 LDCXXSHARED='$(CXX) -shared';;
7503 BSD/OS*/4*)
7504 LDSHARED="gcc -shared"
7505 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007506 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007507 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007508 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007509 LDSHARED='$(CC) -shared'
7510 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007511 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007512 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007513 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007514 OpenBSD*)
7515 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7516 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007517 LDSHARED='$(CC) -shared $(CCSHARED)'
7518 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007519 else
7520 case `uname -r` in
7521 [01].* | 2.[0-7] | 2.[0-7].*)
7522 LDSHARED="ld -Bshareable ${LDFLAGS}"
7523 ;;
7524 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007525 LDSHARED='$(CC) -shared $(CCSHARED)'
7526 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007527 ;;
7528 esac
7529 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007530 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007531 LDSHARED='$(CC) -shared'
7532 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007533 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007534 if test "$GCC" = "yes" ; then
7535 LDSHARED='$(CC) -shared'
7536 LDCXXSHARED='$(CXX) -shared'
7537 else
7538 LDSHARED='$(CC) -G'
7539 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007540 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007541 SCO_SV*)
7542 LDSHARED='$(CC) -Wl,-G,-Bexport'
7543 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7544 CYGWIN*)
7545 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7546 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007547 *) LDSHARED="ld";;
7548 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7551$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007552LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007553BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007554# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007555# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7557$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007558if test -z "$CCSHARED"
7559then
Guido van Rossum07397971997-04-29 21:49:50 +00007560 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007561 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007562 then CCSHARED="-fPIC";
7563 elif test `uname -p` = sparc;
7564 then CCSHARED="-xcode=pic32";
7565 else CCSHARED="-Kpic";
7566 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007567 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007568 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007569 else CCSHARED="+z";
7570 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007571 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007572 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007573 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007574 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007575 if test "$GCC" = "yes"
7576 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007577 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007578 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007579 SCO_SV*)
7580 if test "$GCC" = "yes"
7581 then CCSHARED="-fPIC"
7582 else CCSHARED="-Kpic -belf"
7583 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007584 IRIX*/6*) case $CC in
7585 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007586 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007587 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007588 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7591$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007592# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007593# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7595$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007596if test -z "$LINKFORSHARED"
7597then
Guido van Rossum07397971997-04-29 21:49:50 +00007598 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007599 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007600 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007601 LINKFORSHARED="-Wl,-E -Wl,+s";;
7602# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007603 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007604 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007605 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007606 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007607 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007608 if test "$enable_framework"
7609 then
Jack Jansenda49e192005-01-07 13:08:22 +00007610 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007611 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007612 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007613 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007614 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007615 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007616 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007617 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7618 then
7619 LINKFORSHARED="-Wl,--export-dynamic"
7620 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007621 SunOS/5*) case $CC in
7622 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007623 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007624 then
7625 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007626 fi;;
7627 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007628 CYGWIN*)
7629 if test $enable_shared = "no"
7630 then
7631 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7632 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007633 QNX*)
7634 # -Wl,-E causes the symbols to be added to the dynamic
7635 # symbol table so that they can be found when a module
7636 # is loaded. -N 2048K causes the stack size to be set
7637 # to 2048 kilobytes so that the stack doesn't overflow
7638 # when running test_compile.py.
7639 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007640 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7643$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007644
Michael W. Hudson54241132001-12-07 15:38:26 +00007645
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007646
Matthias Kloseb9621712010-04-24 17:59:49 +00007647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7648$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007649if test ! "$LIBRARY" = "$LDLIBRARY"
7650then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007651 case $ac_sys_system in
7652 CYGWIN*)
7653 # Cygwin needs CCSHARED when building extension DLLs
7654 # but not when building the interpreter DLL.
7655 CFLAGSFORSHARED='';;
7656 *)
7657 CFLAGSFORSHARED='$(CCSHARED)'
7658 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7661$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007662
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007663# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7664# library (with --enable-shared).
7665# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007666# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7667# if it is not required, since it creates a dependency of the shared library
7668# to LIBS. This, in turn, means that applications linking the shared libpython
7669# don't need to link LIBS explicitly. The default should be only changed
7670# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007671
Matthias Kloseb9621712010-04-24 17:59:49 +00007672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7673$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007674case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007675 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007676 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007677esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7679$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007680
7681
Guido van Rossum627b2d71993-12-24 10:39:16 +00007682# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7684$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007685if test "${ac_cv_lib_sendfile_sendfile+set}" = set; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007686 $as_echo_n "(cached) " >&6
7687else
7688 ac_check_lib_save_LIBS=$LIBS
7689LIBS="-lsendfile $LIBS"
7690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7691/* end confdefs.h. */
7692
7693/* Override any GCC internal prototype to avoid an error.
7694 Use char because int might match the return type of a GCC
7695 builtin and then its argument prototype would still apply. */
7696#ifdef __cplusplus
7697extern "C"
7698#endif
7699char sendfile ();
7700int
7701main ()
7702{
7703return sendfile ();
7704 ;
7705 return 0;
7706}
7707_ACEOF
7708if ac_fn_c_try_link "$LINENO"; then :
7709 ac_cv_lib_sendfile_sendfile=yes
7710else
7711 ac_cv_lib_sendfile_sendfile=no
7712fi
7713rm -f core conftest.err conftest.$ac_objext \
7714 conftest$ac_exeext conftest.$ac_ext
7715LIBS=$ac_check_lib_save_LIBS
7716fi
7717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7718$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007719if test "x$ac_cv_lib_sendfile_sendfile" = x""yes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007720 cat >>confdefs.h <<_ACEOF
7721#define HAVE_LIBSENDFILE 1
7722_ACEOF
7723
7724 LIBS="-lsendfile $LIBS"
7725
7726fi
7727
Matthias Kloseb9621712010-04-24 17:59:49 +00007728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7729$as_echo_n "checking for dlopen in -ldl... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007730if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007731 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007732else
Martin v. Löwis11437992002-04-12 09:54:03 +00007733 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007734LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007738/* Override any GCC internal prototype to avoid an error.
7739 Use char because int might match the return type of a GCC
7740 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007741#ifdef __cplusplus
7742extern "C"
7743#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007744char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007745int
7746main ()
7747{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007748return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007749 ;
7750 return 0;
7751}
7752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007753if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007754 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007755else
Matthias Kloseb9621712010-04-24 17:59:49 +00007756 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007758rm -f core conftest.err conftest.$ac_objext \
7759 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007760LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7763$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007764if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007765 cat >>confdefs.h <<_ACEOF
7766#define HAVE_LIBDL 1
7767_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007768
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007769 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007770
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007771fi
7772 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7774$as_echo_n "checking for shl_load in -ldld... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007775if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007776 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007777else
Martin v. Löwis11437992002-04-12 09:54:03 +00007778 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007779LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007782
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007783/* Override any GCC internal prototype to avoid an error.
7784 Use char because int might match the return type of a GCC
7785 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007786#ifdef __cplusplus
7787extern "C"
7788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007789char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007790int
7791main ()
7792{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007793return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007794 ;
7795 return 0;
7796}
7797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007798if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007799 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007800else
Matthias Kloseb9621712010-04-24 17:59:49 +00007801 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007803rm -f core conftest.err conftest.$ac_objext \
7804 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007805LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7808$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007809if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007810 cat >>confdefs.h <<_ACEOF
7811#define HAVE_LIBDLD 1
7812_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007813
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007814 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007815
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007816fi
7817 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007818
Georg Brandlb1441c72009-01-03 22:33:39 +00007819# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007820if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7822$as_echo_n "checking for library containing sem_init... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007823if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007824 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007825else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007826 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007828/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007829
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830/* Override any GCC internal prototype to avoid an error.
7831 Use char because int might match the return type of a GCC
7832 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007833#ifdef __cplusplus
7834extern "C"
7835#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007836char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007837int
7838main ()
7839{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007840return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007841 ;
7842 return 0;
7843}
7844_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007845for ac_lib in '' pthread rt posix4; do
7846 if test -z "$ac_lib"; then
7847 ac_res="none required"
7848 else
7849 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007850 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007851 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007852 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007853 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007855rm -f core conftest.err conftest.$ac_objext \
7856 conftest$ac_exeext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007857 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007858 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007860done
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007861if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007862
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007863else
7864 ac_cv_search_sem_init=no
7865fi
7866rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007867LIBS=$ac_func_search_save_LIBS
7868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7870$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007871ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007872if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007873 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007874
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007875fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007876 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007877 # posix4 on Solaris 2.6
7878 # pthread (first!) on Linux
7879fi
7880
Martin v. Löwis19d17342003-06-14 21:03:05 +00007881# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7883$as_echo_n "checking for textdomain in -lintl... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007884if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007885 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007886else
7887 ac_check_lib_save_LIBS=$LIBS
7888LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007890/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892/* Override any GCC internal prototype to avoid an error.
7893 Use char because int might match the return type of a GCC
7894 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007895#ifdef __cplusplus
7896extern "C"
7897#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007898char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007899int
7900main ()
7901{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007902return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007903 ;
7904 return 0;
7905}
7906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007907if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007908 ac_cv_lib_intl_textdomain=yes
7909else
Matthias Kloseb9621712010-04-24 17:59:49 +00007910 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007912rm -f core conftest.err conftest.$ac_objext \
7913 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007914LIBS=$ac_check_lib_save_LIBS
7915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7917$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007918if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007919
Matthias Kloseb9621712010-04-24 17:59:49 +00007920$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007921
Brett Cannonc6d936e2009-06-07 20:09:53 +00007922 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007923fi
7924
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007925
7926# checks for system dependent C++ extensions support
7927case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007928 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7929$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007931/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007932
Georg Brandl59e87bd2011-02-15 19:48:59 +00007933 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007934int
7935main ()
7936{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007937loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007938 ;
7939 return 0;
7940}
Matthias Kloseb159a552010-04-25 21:00:44 +00007941
Martin v. Löwis11437992002-04-12 09:54:03 +00007942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007943if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007944
Matthias Kloseb159a552010-04-25 21:00:44 +00007945
Matthias Kloseb9621712010-04-24 17:59:49 +00007946$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007947
Matthias Kloseb159a552010-04-25 21:00:44 +00007948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007949$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007950
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007951else
Matthias Kloseb159a552010-04-25 21:00:44 +00007952
7953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007954$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007955
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007957rm -f core conftest.err conftest.$ac_objext \
7958 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007959 *) ;;
7960esac
7961
Guido van Rossum70c7f481998-03-26 18:44:10 +00007962# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7964$as_echo_n "checking for t_open in -lnsl... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007965if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007966 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007967else
Martin v. Löwis11437992002-04-12 09:54:03 +00007968 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007969LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007971/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007972
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007973/* Override any GCC internal prototype to avoid an error.
7974 Use char because int might match the return type of a GCC
7975 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007976#ifdef __cplusplus
7977extern "C"
7978#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007979char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007980int
7981main ()
7982{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007983return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007984 ;
7985 return 0;
7986}
7987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007988if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007989 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007990else
Matthias Kloseb9621712010-04-24 17:59:49 +00007991 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007993rm -f core conftest.err conftest.$ac_objext \
7994 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007995LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
7998$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007999if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008000 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008001fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008002 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8004$as_echo_n "checking for socket in -lsocket... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008005if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008006 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008007else
Martin v. Löwis11437992002-04-12 09:54:03 +00008008 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008009LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008011/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008012
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013/* Override any GCC internal prototype to avoid an error.
8014 Use char because int might match the return type of a GCC
8015 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008016#ifdef __cplusplus
8017extern "C"
8018#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008019char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008020int
8021main ()
8022{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008023return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008024 ;
8025 return 0;
8026}
8027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008028if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008029 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008030else
Matthias Kloseb9621712010-04-24 17:59:49 +00008031 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008032fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008033rm -f core conftest.err conftest.$ac_objext \
8034 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008035LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8038$as_echo "$ac_cv_lib_socket_socket" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008039if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008040 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008041fi
8042 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008043
Matthias Kloseb9621712010-04-24 17:59:49 +00008044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8045$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008047# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008048if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008049 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8051$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008052LIBS="$withval $LIBS"
8053
8054else
Matthias Kloseb9621712010-04-24 17:59:49 +00008055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8056$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008057fi
8058
Guido van Rossum7f43da71994-08-01 12:15:30 +00008059
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008060if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008061 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8062set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8064$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008065if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008066 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008067else
8068 case $PKG_CONFIG in
8069 [\\/]* | ?:[\\/]*)
8070 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8071 ;;
8072 *)
8073 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8074for as_dir in $PATH
8075do
8076 IFS=$as_save_IFS
8077 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008078 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008079 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8080 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008081 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008082 break 2
8083 fi
8084done
Matthias Kloseb9621712010-04-24 17:59:49 +00008085 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008086IFS=$as_save_IFS
8087
8088 ;;
8089esac
8090fi
8091PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8092if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8094$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008095else
Matthias Kloseb9621712010-04-24 17:59:49 +00008096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8097$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008098fi
8099
8100
8101fi
8102if test -z "$ac_cv_path_PKG_CONFIG"; then
8103 ac_pt_PKG_CONFIG=$PKG_CONFIG
8104 # Extract the first word of "pkg-config", so it can be a program name with args.
8105set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8107$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008108if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008109 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008110else
8111 case $ac_pt_PKG_CONFIG in
8112 [\\/]* | ?:[\\/]*)
8113 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8114 ;;
8115 *)
8116 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8117for as_dir in $PATH
8118do
8119 IFS=$as_save_IFS
8120 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008121 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008122 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8123 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008124 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008125 break 2
8126 fi
8127done
Matthias Kloseb9621712010-04-24 17:59:49 +00008128 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008129IFS=$as_save_IFS
8130
8131 ;;
8132esac
8133fi
8134ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8135if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8137$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008138else
Matthias Kloseb9621712010-04-24 17:59:49 +00008139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8140$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008141fi
8142
8143 if test "x$ac_pt_PKG_CONFIG" = x; then
8144 PKG_CONFIG=""
8145 else
8146 case $cross_compiling:$ac_tool_warned in
8147yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008148{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8149$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008150ac_tool_warned=yes ;;
8151esac
8152 PKG_CONFIG=$ac_pt_PKG_CONFIG
8153 fi
8154else
8155 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8156fi
8157
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008158
8159# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8161$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008162
8163# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008164if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008165 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008166else
8167 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008168fi
8169
8170
Matthias Kloseb9621712010-04-24 17:59:49 +00008171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8172$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008173
8174# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8176$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008177
8178# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008179if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008180 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008181else
8182 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008183fi
8184
8185
8186if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008187 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8188else
8189 LIBFFI_INCLUDEDIR=""
8190fi
8191
8192
Matthias Kloseb9621712010-04-24 17:59:49 +00008193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8194$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008195
Benjamin Peterson076ed002010-10-31 17:11:02 +00008196# Check for support for loadable sqlite extensions
8197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8198$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8199# Check whether --enable-loadable-sqlite-extensions was given.
8200if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8201 enableval=$enable_loadable_sqlite_extensions;
8202else
8203 enable_loadable_sqlite_extensions="no"
8204fi
8205
8206
8207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8208$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8209
Matthias Klose55708cc2009-04-30 08:06:49 +00008210# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8212$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008213
8214# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008215if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008216 withval=$with_dbmliborder;
8217if test x$with_dbmliborder = xyes
8218then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07008219as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008220else
8221 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8222 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8223 then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07008224 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008225 fi
8226 done
8227fi
8228fi
8229
Matthias Kloseb9621712010-04-24 17:59:49 +00008230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8231$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008232
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008233# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008234
8235
Matthias Kloseb9621712010-04-24 17:59:49 +00008236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8237$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008238
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008239# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008240if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008241 withval=$with_signal_module;
8242fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008243
8244
8245if test -z "$with_signal_module"
8246then with_signal_module="yes"
8247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8249$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008250
8251if test "${with_signal_module}" = "yes"; then
8252 USE_SIGNAL_MODULE=""
8253 SIGNAL_OBJS=""
8254else
8255 USE_SIGNAL_MODULE="#"
8256 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8257fi
8258
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008259# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008260
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008261USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008262
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008263
Martin v. Löwis11437992002-04-12 09:54:03 +00008264
8265# Templates for things AC_DEFINEd more than once.
8266# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008267
8268
Martin v. Löwis11437992002-04-12 09:54:03 +00008269
8270
Matthias Kloseb9621712010-04-24 17:59:49 +00008271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8272$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008273
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008274# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008275if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008276 withval=$with_threads;
8277fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008278
8279
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008280# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008281
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008282# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008283if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008284 withval=$with_thread; with_threads=$with_thread
8285fi
8286
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008287
8288if test -z "$with_threads"
8289then with_threads="yes"
8290fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8292$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008293
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008294
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008295if test "$with_threads" = "no"
8296then
8297 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008298elif test "$ac_cv_pthread_is_default" = yes
8299then
Matthias Kloseb9621712010-04-24 17:59:49 +00008300 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008301
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008302 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008303 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008304
8305 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008306 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008307elif test "$ac_cv_kpthread" = "yes"
8308then
8309 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008310 if test "$ac_cv_cxx_thread" = "yes"; then
8311 CXX="$CXX -Kpthread"
8312 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008313 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008314
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008315 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008316 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008317elif test "$ac_cv_kthread" = "yes"
8318then
8319 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008320 if test "$ac_cv_cxx_thread" = "yes"; then
8321 CXX="$CXX -Kthread"
8322 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008323 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008324
8325 posix_threads=yes
8326 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008327elif test "$ac_cv_pthread" = "yes"
8328then
8329 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008330 if test "$ac_cv_cxx_thread" = "yes"; then
8331 CXX="$CXX -pthread"
8332 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008333 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008334
8335 posix_threads=yes
8336 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008337else
8338 if test ! -z "$with_threads" -a -d "$with_threads"
8339 then LDFLAGS="$LDFLAGS -L$with_threads"
8340 fi
8341 if test ! -z "$withval" -a -d "$withval"
8342 then LDFLAGS="$LDFLAGS -L$withval"
8343 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008344
8345 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008346 # define _POSIX_THREADS in unistd.h. Some apparently don't
8347 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8349$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008351/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008352
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008353#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008354#ifdef _POSIX_THREADS
8355yes
8356#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008357
8358_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008359if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008360 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008361 unistd_defines_pthreads=yes
8362else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008363 unistd_defines_pthreads=no
8364fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008365rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008366
Matthias Kloseb9621712010-04-24 17:59:49 +00008367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8368$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008369
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008371
Matthias Kloseb9621712010-04-24 17:59:49 +00008372 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008373if test "x$ac_cv_header_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008375
Matthias Kloseb9621712010-04-24 17:59:49 +00008376 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008377
Martin v. Löwis11437992002-04-12 09:54:03 +00008378
Matthias Kloseb9621712010-04-24 17:59:49 +00008379$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008380
8381 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008382 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008383else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008384
Matthias Kloseb9621712010-04-24 17:59:49 +00008385 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008386if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008387 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008388
Matthias Kloseb9621712010-04-24 17:59:49 +00008389 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008390
Martin v. Löwis11437992002-04-12 09:54:03 +00008391
Matthias Kloseb9621712010-04-24 17:59:49 +00008392$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008393
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008394 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008395else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008396
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008397 # Just looking for pthread_create in libpthread is not enough:
8398 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8399 # So we really have to include pthread.h, and then link.
8400 _libs=$LIBS
8401 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8403$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008405/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008406#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008407
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008408void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008409int
8410main ()
8411{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008412
8413pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008414 ;
8415 return 0;
8416}
8417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008418if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008419
Matthias Kloseb9621712010-04-24 17:59:49 +00008420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8421$as_echo "yes" >&6; }
8422 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008423
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008424 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008425 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008426else
Martin v. Löwis11437992002-04-12 09:54:03 +00008427
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008428 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008429 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008430if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008431 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008432
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008433 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008434 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008435else
Guido van Rossumad678af1998-10-02 14:42:15 +00008436
Matthias Kloseb9621712010-04-24 17:59:49 +00008437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8438$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008439if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008440 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008441else
Martin v. Löwis11437992002-04-12 09:54:03 +00008442 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008443LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008445/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008447/* Override any GCC internal prototype to avoid an error.
8448 Use char because int might match the return type of a GCC
8449 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008450#ifdef __cplusplus
8451extern "C"
8452#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008453char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008454int
8455main ()
8456{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008457return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008458 ;
8459 return 0;
8460}
8461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008462if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008463 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008464else
Matthias Kloseb9621712010-04-24 17:59:49 +00008465 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008466fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008467rm -f core conftest.err conftest.$ac_objext \
8468 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008469LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8472$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008473if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008474 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008475
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008476 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008477 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008478 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008479else
Greg Steinadf63d62000-07-05 10:38:09 +00008480
Matthias Kloseb9621712010-04-24 17:59:49 +00008481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8482$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008483if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008484 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008485else
Martin v. Löwis11437992002-04-12 09:54:03 +00008486 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008487LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008489/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008490
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008491/* Override any GCC internal prototype to avoid an error.
8492 Use char because int might match the return type of a GCC
8493 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008494#ifdef __cplusplus
8495extern "C"
8496#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008497char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008498int
8499main ()
8500{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008501return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008502 ;
8503 return 0;
8504}
8505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008506if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008507 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008508else
Matthias Kloseb9621712010-04-24 17:59:49 +00008509 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008511rm -f core conftest.err conftest.$ac_objext \
8512 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008513LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008514fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8516$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008517if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008518 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008519
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008520 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008521 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008522 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008523else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008524
Matthias Kloseb9621712010-04-24 17:59:49 +00008525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8526$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008527if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008528 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008529else
Martin v. Löwis11437992002-04-12 09:54:03 +00008530 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008531LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008533/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008534
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008535/* Override any GCC internal prototype to avoid an error.
8536 Use char because int might match the return type of a GCC
8537 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008538#ifdef __cplusplus
8539extern "C"
8540#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008541char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008542int
8543main ()
8544{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008545return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008546 ;
8547 return 0;
8548}
8549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008550if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008551 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008552else
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008555rm -f core conftest.err conftest.$ac_objext \
8556 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008557LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008558fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8560$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008561if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008562 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008563
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008564 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008565 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008566 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008567else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008568
Matthias Kloseb9621712010-04-24 17:59:49 +00008569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8570$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008571if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008572 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008573else
Martin v. Löwis11437992002-04-12 09:54:03 +00008574 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008575LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008577/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008578
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008579/* Override any GCC internal prototype to avoid an error.
8580 Use char because int might match the return type of a GCC
8581 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008582#ifdef __cplusplus
8583extern "C"
8584#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008585char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008586int
8587main ()
8588{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008589return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008590 ;
8591 return 0;
8592}
8593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008594if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008595 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008596else
Matthias Kloseb9621712010-04-24 17:59:49 +00008597 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008599rm -f core conftest.err conftest.$ac_objext \
8600 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008601LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8604$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008605if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008606 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008607
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008608 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008609 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008610 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008611else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008612
Martin v. Löwis130fb172001-07-19 11:00:41 +00008613 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008614fi
8615
Guido van Rossum627b2d71993-12-24 10:39:16 +00008616
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008617fi
8618
Guido van Rossum0be3e491997-05-22 20:33:33 +00008619fi
8620
Guido van Rossum49545951997-12-02 19:28:29 +00008621fi
8622
Guido van Rossumb93a8621998-05-07 13:27:32 +00008623fi
8624
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008626rm -f core conftest.err conftest.$ac_objext \
8627 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008628fi
8629
Martin v. Löwis11437992002-04-12 09:54:03 +00008630
8631fi
8632
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008633
Michael W. Hudson54241132001-12-07 15:38:26 +00008634
Matthias Kloseb9621712010-04-24 17:59:49 +00008635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8636$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008637if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008638 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008639else
Martin v. Löwis11437992002-04-12 09:54:03 +00008640 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008641LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008645/* Override any GCC internal prototype to avoid an error.
8646 Use char because int might match the return type of a GCC
8647 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008648#ifdef __cplusplus
8649extern "C"
8650#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008651char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008652int
8653main ()
8654{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008655return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008656 ;
8657 return 0;
8658}
8659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008660if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008661 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008662else
Matthias Kloseb9621712010-04-24 17:59:49 +00008663 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008665rm -f core conftest.err conftest.$ac_objext \
8666 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008667LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8670$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008671if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008672 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008673
Martin v. Löwis130fb172001-07-19 11:00:41 +00008674 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008675 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008676 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008677fi
8678
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008679
Neal Norwitza978ab02002-11-02 16:58:05 +00008680 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8682$as_echo_n "checking for thr_create in -lthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008683if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008684 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008685else
Martin v. Löwis11437992002-04-12 09:54:03 +00008686 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008687LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008690
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008691/* Override any GCC internal prototype to avoid an error.
8692 Use char because int might match the return type of a GCC
8693 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008694#ifdef __cplusplus
8695extern "C"
8696#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008697char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008698int
8699main ()
8700{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008701return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008702 ;
8703 return 0;
8704}
8705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008706if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008707 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008708else
Matthias Kloseb9621712010-04-24 17:59:49 +00008709 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008711rm -f core conftest.err conftest.$ac_objext \
8712 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008713LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8716$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008717if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008718 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008719
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008720 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008721 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008722 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008723fi
8724
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008725 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008726fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008727
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008728if test "$posix_threads" = "yes"; then
8729 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008730
Matthias Kloseb9621712010-04-24 17:59:49 +00008731$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008732
8733 fi
8734
8735 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8736 case $ac_sys_system/$ac_sys_release in
8737 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008738$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008739
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008740 ;;
8741 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008742$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008743
8744 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008745 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008746$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008747
8748 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008749 AIX/6)
8750$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8751
8752 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008753 esac
8754
Matthias Kloseb9621712010-04-24 17:59:49 +00008755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8756$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008757 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008758 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008759else
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008761 ac_cv_pthread_system_supported=no
8762else
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008764/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008765#include <pthread.h>
8766 void *foo(void *parm) {
8767 return NULL;
8768 }
8769 main() {
8770 pthread_attr_t attr;
8771 pthread_t id;
8772 if (pthread_attr_init(&attr)) exit(-1);
8773 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8774 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8775 exit(0);
8776 }
8777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008778if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008779 ac_cv_pthread_system_supported=yes
8780else
Matthias Kloseb9621712010-04-24 17:59:49 +00008781 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008783rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8784 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008785fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008787
Guido van Rossum627b2d71993-12-24 10:39:16 +00008788fi
8789
Matthias Kloseb9621712010-04-24 17:59:49 +00008790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8791$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008792 if test "$ac_cv_pthread_system_supported" = "yes"; then
8793
Matthias Kloseb9621712010-04-24 17:59:49 +00008794$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008795
8796 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008797 for ac_func in pthread_sigmask
8798do :
8799 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008800if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008801 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008802#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008803_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008804 case $ac_sys_system in
8805 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008806
Matthias Kloseb9621712010-04-24 17:59:49 +00008807$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008808
8809 ;;
8810 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008811fi
8812done
8813
8814fi
8815
8816
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008817# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008818
Matthias Kloseb9621712010-04-24 17:59:49 +00008819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8820$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008821# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008822if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008823 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008824 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8826$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008827 ipv6=no
8828 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008829 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8830$as_echo "yes" >&6; }
8831 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008832
8833 ipv6=yes
8834 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008835 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008836else
Martin v. Löwis11437992002-04-12 09:54:03 +00008837
Matthias Kloseb9621712010-04-24 17:59:49 +00008838 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008839
Matthias Kloseb9621712010-04-24 17:59:49 +00008840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8841$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008842 ipv6=no
8843
8844else
Matthias Kloseb9621712010-04-24 17:59:49 +00008845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008846/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008847 /* AF_INET6 available check */
8848#include <sys/types.h>
8849#include <sys/socket.h>
8850main()
8851{
8852 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8853 exit(1);
8854 else
8855 exit(0);
8856}
8857
Martin v. Löwis11437992002-04-12 09:54:03 +00008858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008859if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008860
Matthias Kloseb9621712010-04-24 17:59:49 +00008861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8862$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008863 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008864
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008865else
Matthias Kloseb159a552010-04-25 21:00:44 +00008866
Matthias Kloseb9621712010-04-24 17:59:49 +00008867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8868$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008869 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008870
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8873 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008874fi
8875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008876
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008877if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8879$as_echo_n "checking if RFC2553 API is available... " >&6; }
8880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008881/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008882
8883 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008884#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008885int
8886main ()
8887{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008888struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008889 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008890 ;
8891 return 0;
8892}
Matthias Kloseb159a552010-04-25 21:00:44 +00008893
Martin v. Löwis11437992002-04-12 09:54:03 +00008894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008895if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008896
8897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008898$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008899 ipv6=yes
8900
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008901else
Matthias Kloseb159a552010-04-25 21:00:44 +00008902
8903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008904$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008905 ipv6=no
8906
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008907fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008909fi
8910
8911if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008912 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008913
8914fi
8915
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008916fi
8917
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008918
8919ipv6type=unknown
8920ipv6lib=none
8921ipv6trylibc=no
8922
8923if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8925$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008926 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8927 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008928 case $i in
8929 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008931/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008932
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008933#include <netinet/in.h>
8934#ifdef IPV6_INRIA_VERSION
8935yes
8936#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008937_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008938if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008939 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008940 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008941fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008942rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008943
8944 ;;
8945 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008947/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008948
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008949#include <netinet/in.h>
8950#ifdef __KAME__
8951yes
8952#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008953_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008954if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008955 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008956 ipv6type=$i;
8957 ipv6lib=inet6
8958 ipv6libdir=/usr/local/v6/lib
8959 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008960fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008961rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008962
8963 ;;
8964 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008966/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008967
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008968#include <features.h>
8969#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8970yes
8971#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008972_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008973if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008974 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008975 ipv6type=$i;
8976 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008977fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008978rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008979
8980 ;;
8981 linux-inet6)
8982 if test -d /usr/inet6; then
8983 ipv6type=$i
8984 ipv6lib=inet6
8985 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008986 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008987 fi
8988 ;;
8989 solaris)
8990 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00008991 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008992 ipv6type=$i
8993 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008994 fi
8995 fi
8996 ;;
8997 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00008998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008999/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009000
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001#include <sys/param.h>
9002#ifdef _TOSHIBA_INET6
9003yes
9004#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009005_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009006if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009007 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009008 ipv6type=$i;
9009 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009010 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009011fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009012rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009013
9014 ;;
9015 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009017/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009018
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009019#include </usr/local/v6/include/sys/v6config.h>
9020#ifdef __V6D__
9021yes
9022#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009023_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009024if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009025 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009026 ipv6type=$i;
9027 ipv6lib=v6;
9028 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009029 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009030fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009031rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009032
9033 ;;
9034 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009036/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009037
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009038#include <sys/param.h>
9039#ifdef _ZETA_MINAMI_INET6
9040yes
9041#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009042_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009043if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009044 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009045 ipv6type=$i;
9046 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009047 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009048fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009049rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009050
9051 ;;
9052 esac
9053 if test "$ipv6type" != "unknown"; then
9054 break
9055 fi
9056 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9058$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009059fi
9060
9061if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9062 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9063 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9064 echo "using lib$ipv6lib"
9065 else
9066 if test $ipv6trylibc = "yes"; then
9067 echo "using libc"
9068 else
9069 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9070 echo "You need to fetch lib$ipv6lib.a from appropriate"
9071 echo 'ipv6 kit and compile beforehand.'
9072 exit 1
9073 fi
9074 fi
9075fi
9076
Matthias Kloseb9621712010-04-24 17:59:49 +00009077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9078$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009080/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009081
9082 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009083int
9084main ()
9085{
9086FSIORefNum fRef = 0
9087 ;
9088 return 0;
9089}
Matthias Kloseb159a552010-04-25 21:00:44 +00009090
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009092if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009093
Matthias Kloseb159a552010-04-25 21:00:44 +00009094
Matthias Kloseb9621712010-04-24 17:59:49 +00009095$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009096
Matthias Kloseb9621712010-04-24 17:59:49 +00009097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9098$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009099
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009100else
Matthias Kloseb159a552010-04-25 21:00:44 +00009101
Matthias Kloseb9621712010-04-24 17:59:49 +00009102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9103$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009104
9105fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9107
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009108# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9110$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009111
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009112# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009113if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009114 withval=$with_doc_strings;
9115fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009116
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009117
9118if test -z "$with_doc_strings"
9119then with_doc_strings="yes"
9120fi
9121if test "$with_doc_strings" != "no"
9122then
9123
Matthias Kloseb9621712010-04-24 17:59:49 +00009124$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009125
9126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9128$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009129
Antoine Pitrou042b1282010-08-13 21:15:58 +00009130# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9132$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009133
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009134# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009135if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009136 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009137if test "$withval" != no
9138then
9139
Matthias Kloseb9621712010-04-24 17:59:49 +00009140$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009141
Matthias Kloseb9621712010-04-24 17:59:49 +00009142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9143$as_echo "yes" >&6; }
9144else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9145$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009146fi
9147else
Matthias Kloseb9621712010-04-24 17:59:49 +00009148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9149$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009150fi
9151
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009152
9153# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9155$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009156
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009157# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009158if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009159 withval=$with_pymalloc;
9160fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009161
Neil Schemenauera35c6882001-02-27 04:45:05 +00009162
Neil Schemenauer16c22972002-03-22 15:34:49 +00009163if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009164then
9165 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009166 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009167fi
9168if test "$with_pymalloc" != "no"
9169then
Martin v. Löwis11437992002-04-12 09:54:03 +00009170
Matthias Kloseb9621712010-04-24 17:59:49 +00009171$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009172
9173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9175$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009176
Benjamin Peterson05159c42009-12-03 03:01:27 +00009177# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9179$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009180
9181# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009182if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009183 withval=$with_valgrind;
9184else
9185 with_valgrind=no
9186fi
9187
Matthias Kloseb9621712010-04-24 17:59:49 +00009188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9189$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009190if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009191 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009192if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009193
Matthias Kloseb9621712010-04-24 17:59:49 +00009194$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009195
9196else
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009197 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009198
9199fi
9200
9201
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009202 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009203fi
9204
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009205# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009206
Guido van Rossum98935bf2001-09-05 19:13:16 +00009207DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009208
Guido van Rossume97ee181999-12-20 21:27:22 +00009209# the dlopen() function means we might want to use dynload_shlib.o. some
9210# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009211for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009212do :
9213 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009214if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009215 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009216#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009217_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009218
Guido van Rossume97ee181999-12-20 21:27:22 +00009219fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009220done
Guido van Rossume97ee181999-12-20 21:27:22 +00009221
Michael W. Hudson54241132001-12-07 15:38:26 +00009222
Guido van Rossume97ee181999-12-20 21:27:22 +00009223# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9224# loading of modules.
9225
Matthias Kloseb9621712010-04-24 17:59:49 +00009226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9227$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009228if test -z "$DYNLOADFILE"
9229then
9230 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009231 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9232 if test "$ac_cv_func_dlopen" = yes
9233 then DYNLOADFILE="dynload_shlib.o"
9234 else DYNLOADFILE="dynload_aix.o"
9235 fi
9236 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009237 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009238 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9239 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009240 *)
9241 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9242 # out any dynamic loading
9243 if test "$ac_cv_func_dlopen" = yes
9244 then DYNLOADFILE="dynload_shlib.o"
9245 else DYNLOADFILE="dynload_stub.o"
9246 fi
9247 ;;
9248 esac
9249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9251$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009252if test "$DYNLOADFILE" != "dynload_stub.o"
9253then
Martin v. Löwis11437992002-04-12 09:54:03 +00009254
Matthias Kloseb9621712010-04-24 17:59:49 +00009255$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009256
9257fi
9258
Neil Schemenauer4e425612001-06-19 15:44:15 +00009259# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9260
Michael W. Hudson54241132001-12-07 15:38:26 +00009261
Matthias Kloseb9621712010-04-24 17:59:49 +00009262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9263$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009264if test -z "$MACHDEP_OBJS"
9265then
Jack Jansene578a632001-08-15 01:27:14 +00009266 MACHDEP_OBJS=$extra_machdep_objs
9267else
9268 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009269fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9271$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009272
Guido van Rossum627b2d71993-12-24 10:39:16 +00009273# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009274for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009275 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009276 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
9277 futimens futimes \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009278 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009279 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009280 if_nameindex \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009281 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009282 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009283 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009284 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009285 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009286 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009287 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009288 sigaction sigaltstack siginterrupt sigpending \
9289 sigrelse sigwait snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009290 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009291 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9292 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009293do :
9294 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9295ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009296if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009297 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009298#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009299_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009300
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009301fi
9302done
9303
Michael W. Hudson54241132001-12-07 15:38:26 +00009304
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009305# For some functions, having a definition is not sufficient, since
9306# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9308$as_echo_n "checking for chroot... " >&6; }
9309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009310/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009311#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009312int
9313main ()
9314{
9315void *x=chroot
9316 ;
9317 return 0;
9318}
9319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009320if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009321
Matthias Kloseb9621712010-04-24 17:59:49 +00009322$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009323
Matthias Kloseb159a552010-04-25 21:00:44 +00009324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009325$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009326else
Matthias Kloseb9621712010-04-24 17:59:49 +00009327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9328$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009329
9330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9333$as_echo_n "checking for link... " >&6; }
9334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009335/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009336#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009337int
9338main ()
9339{
9340void *x=link
9341 ;
9342 return 0;
9343}
9344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009345if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009346
Matthias Kloseb9621712010-04-24 17:59:49 +00009347$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009348
Matthias Kloseb159a552010-04-25 21:00:44 +00009349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009350$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009351else
Matthias Kloseb9621712010-04-24 17:59:49 +00009352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9353$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009354
9355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9358$as_echo_n "checking for symlink... " >&6; }
9359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009360/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009361#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009362int
9363main ()
9364{
9365void *x=symlink
9366 ;
9367 return 0;
9368}
9369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009370if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009371
Matthias Kloseb9621712010-04-24 17:59:49 +00009372$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009373
Matthias Kloseb159a552010-04-25 21:00:44 +00009374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009375$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009376else
Matthias Kloseb9621712010-04-24 17:59:49 +00009377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9378$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009379
9380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9383$as_echo_n "checking for fchdir... " >&6; }
9384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009385/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009386#include <unistd.h>
9387int
9388main ()
9389{
9390void *x=fchdir
9391 ;
9392 return 0;
9393}
9394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009395if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009396
Matthias Kloseb9621712010-04-24 17:59:49 +00009397$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009398
Matthias Kloseb159a552010-04-25 21:00:44 +00009399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009400$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009401else
Matthias Kloseb9621712010-04-24 17:59:49 +00009402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9403$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009404
9405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9408$as_echo_n "checking for fsync... " >&6; }
9409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009410/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009411#include <unistd.h>
9412int
9413main ()
9414{
9415void *x=fsync
9416 ;
9417 return 0;
9418}
9419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009420if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009421
Matthias Kloseb9621712010-04-24 17:59:49 +00009422$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009423
Matthias Kloseb159a552010-04-25 21:00:44 +00009424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009425$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009426else
Matthias Kloseb9621712010-04-24 17:59:49 +00009427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9428$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009429
9430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9433$as_echo_n "checking for fdatasync... " >&6; }
9434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009435/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009436#include <unistd.h>
9437int
9438main ()
9439{
9440void *x=fdatasync
9441 ;
9442 return 0;
9443}
9444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009445if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009446
Matthias Kloseb9621712010-04-24 17:59:49 +00009447$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009448
Matthias Kloseb159a552010-04-25 21:00:44 +00009449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009450$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009451else
Matthias Kloseb9621712010-04-24 17:59:49 +00009452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9453$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009454
9455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9458$as_echo_n "checking for epoll... " >&6; }
9459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009460/* end confdefs.h. */
9461#include <sys/epoll.h>
9462int
9463main ()
9464{
9465void *x=epoll_create
9466 ;
9467 return 0;
9468}
9469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009470if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009471
Matthias Kloseb9621712010-04-24 17:59:49 +00009472$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009473
Matthias Kloseb159a552010-04-25 21:00:44 +00009474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009475$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009476else
Matthias Kloseb9621712010-04-24 17:59:49 +00009477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9478$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009479
9480fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9483$as_echo_n "checking for kqueue... " >&6; }
9484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009485/* end confdefs.h. */
9486
9487#include <sys/types.h>
9488#include <sys/event.h>
9489
9490int
9491main ()
9492{
9493int x=kqueue()
9494 ;
9495 return 0;
9496}
9497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009498if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009499
Matthias Kloseb9621712010-04-24 17:59:49 +00009500$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009501
Matthias Kloseb159a552010-04-25 21:00:44 +00009502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009503$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009504else
Matthias Kloseb9621712010-04-24 17:59:49 +00009505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9506$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009507
9508fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009510# On some systems (eg. FreeBSD 5), we would find a definition of the
9511# functions ctermid_r, setgroups in the library, but no prototype
9512# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9513# address to avoid compiler warnings and potential miscompilations
9514# because of the missing prototypes.
9515
Matthias Kloseb9621712010-04-24 17:59:49 +00009516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9517$as_echo_n "checking for ctermid_r... " >&6; }
9518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009519/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009520
Martin v. Löwisd5843682002-11-21 20:41:28 +00009521#include <stdio.h>
9522
Martin v. Löwisd5843682002-11-21 20:41:28 +00009523int
9524main ()
9525{
9526void* p = ctermid_r
9527 ;
9528 return 0;
9529}
9530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009531if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009532
Matthias Kloseb9621712010-04-24 17:59:49 +00009533$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009534
Matthias Kloseb159a552010-04-25 21:00:44 +00009535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009536$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009537else
Matthias Kloseb9621712010-04-24 17:59:49 +00009538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9539$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009540
9541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9543
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9545$as_echo_n "checking for flock declaration... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009546if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009547 $as_echo_n "(cached) " >&6
9548else
9549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009550/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009551#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009552int
9553main ()
9554{
9555void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009556
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009557 ;
9558 return 0;
9559}
9560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009561if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009562 ac_cv_flock_decl=yes
9563else
9564 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009565
9566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009568
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009569fi
9570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9571$as_echo "$ac_cv_flock_decl" >&6; }
9572if test "x${ac_cv_flock_decl}" = xyes; then
9573 for ac_func in flock
9574do :
9575 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009576if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009577 cat >>confdefs.h <<_ACEOF
9578#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009579_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009580
Antoine Pitroua3000072010-09-07 14:52:42 +00009581else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009583$as_echo_n "checking for flock in -lbsd... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009584if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009585 $as_echo_n "(cached) " >&6
9586else
9587 ac_check_lib_save_LIBS=$LIBS
9588LIBS="-lbsd $LIBS"
9589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9590/* end confdefs.h. */
9591
9592/* Override any GCC internal prototype to avoid an error.
9593 Use char because int might match the return type of a GCC
9594 builtin and then its argument prototype would still apply. */
9595#ifdef __cplusplus
9596extern "C"
9597#endif
9598char flock ();
9599int
9600main ()
9601{
9602return flock ();
9603 ;
9604 return 0;
9605}
9606_ACEOF
9607if ac_fn_c_try_link "$LINENO"; then :
9608 ac_cv_lib_bsd_flock=yes
9609else
9610 ac_cv_lib_bsd_flock=no
9611fi
9612rm -f core conftest.err conftest.$ac_objext \
9613 conftest$ac_exeext conftest.$ac_ext
9614LIBS=$ac_check_lib_save_LIBS
9615fi
9616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9617$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009618if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009619 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009620
9621
9622$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9623
9624
9625fi
9626
9627
9628fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009629done
9630
Antoine Pitroua3000072010-09-07 14:52:42 +00009631fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009632
Matthias Kloseb9621712010-04-24 17:59:49 +00009633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9634$as_echo_n "checking for getpagesize... " >&6; }
9635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009636/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009637
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009638#include <unistd.h>
9639
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009640int
9641main ()
9642{
9643void* p = getpagesize
9644 ;
9645 return 0;
9646}
9647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009648if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009649
Matthias Kloseb9621712010-04-24 17:59:49 +00009650$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009651
Matthias Kloseb159a552010-04-25 21:00:44 +00009652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009653$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009654else
Matthias Kloseb9621712010-04-24 17:59:49 +00009655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9656$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009657
9658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009660
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mallopt can set malloc mmap threshold" >&5
9662$as_echo_n "checking whether mallopt can set malloc mmap threshold... " >&6; }
9663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9664/* end confdefs.h. */
9665
9666#include <malloc.h>
9667
9668int
9669main ()
9670{
9671mallopt(M_MMAP_THRESHOLD, 256 * 1024)
9672 ;
9673 return 0;
9674}
9675_ACEOF
9676if ac_fn_c_try_compile "$LINENO"; then :
9677
9678$as_echo "#define HAVE_MALLOPT_MMAP_THRESHOLD 1" >>confdefs.h
9679
9680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9681$as_echo "yes" >&6; }
9682else
9683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9684$as_echo "no" >&6; }
9685
9686fi
9687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9688
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009689for ac_prog in true
9690do
9691 # Extract the first word of "$ac_prog", so it can be a program name with args.
9692set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9694$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009695if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009696 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009697else
9698 if test -n "$TRUE"; then
9699 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9700else
9701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9702for as_dir in $PATH
9703do
9704 IFS=$as_save_IFS
9705 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009706 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009707 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009708 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009709 $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 +00009710 break 2
9711 fi
9712done
Matthias Kloseb9621712010-04-24 17:59:49 +00009713 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009714IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009715
9716fi
9717fi
9718TRUE=$ac_cv_prog_TRUE
9719if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9721$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009722else
Matthias Kloseb9621712010-04-24 17:59:49 +00009723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9724$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009725fi
9726
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009727
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009728 test -n "$TRUE" && break
9729done
9730test -n "$TRUE" || TRUE="/bin/true"
9731
9732
Matthias Kloseb9621712010-04-24 17:59:49 +00009733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9734$as_echo_n "checking for inet_aton in -lc... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009735if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009736 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009737else
9738 ac_check_lib_save_LIBS=$LIBS
9739LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009741/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009742
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009743/* Override any GCC internal prototype to avoid an error.
9744 Use char because int might match the return type of a GCC
9745 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009746#ifdef __cplusplus
9747extern "C"
9748#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009749char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009750int
9751main ()
9752{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009753return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009754 ;
9755 return 0;
9756}
9757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009758if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009759 ac_cv_lib_c_inet_aton=yes
9760else
Matthias Kloseb9621712010-04-24 17:59:49 +00009761 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009763rm -f core conftest.err conftest.$ac_objext \
9764 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009765LIBS=$ac_check_lib_save_LIBS
9766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9768$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009769if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009770 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009771else
Matthias Kloseb9621712010-04-24 17:59:49 +00009772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9773$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009774if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009775 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009776else
9777 ac_check_lib_save_LIBS=$LIBS
9778LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009780/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009782/* Override any GCC internal prototype to avoid an error.
9783 Use char because int might match the return type of a GCC
9784 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009785#ifdef __cplusplus
9786extern "C"
9787#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009788char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009789int
9790main ()
9791{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009792return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009793 ;
9794 return 0;
9795}
9796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009797if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009798 ac_cv_lib_resolv_inet_aton=yes
9799else
Matthias Kloseb9621712010-04-24 17:59:49 +00009800 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009802rm -f core conftest.err conftest.$ac_objext \
9803 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009804LIBS=$ac_check_lib_save_LIBS
9805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9807$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009808if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009809 cat >>confdefs.h <<_ACEOF
9810#define HAVE_LIBRESOLV 1
9811_ACEOF
9812
9813 LIBS="-lresolv $LIBS"
9814
9815fi
9816
9817
9818fi
9819
9820
Christian Heimesd0764e22007-12-04 15:00:33 +00009821# On Tru64, chflags seems to be present, but calling it will
9822# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9824$as_echo_n "checking for chflags... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009825if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009826 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009827else
Matthias Kloseb9621712010-04-24 17:59:49 +00009828 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009829 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009830else
Matthias Kloseb9621712010-04-24 17:59:49 +00009831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009832/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009833[
Christian Heimesd0764e22007-12-04 15:00:33 +00009834#include <sys/stat.h>
9835#include <unistd.h>
9836int main(int argc, char*argv[])
9837{
9838 if(chflags(argv[0], 0) != 0)
9839 return 1;
9840 return 0;
9841}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009842]
Christian Heimesd0764e22007-12-04 15:00:33 +00009843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009844if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009845 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009846else
Matthias Kloseb9621712010-04-24 17:59:49 +00009847 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9850 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009851fi
9852
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009853
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9856$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009857if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009858 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009859if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009860 ac_cv_have_chflags="yes"
9861else
9862 ac_cv_have_chflags="no"
9863fi
9864
9865fi
9866if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009867
Matthias Kloseb9621712010-04-24 17:59:49 +00009868$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009869
9870fi
9871
Matthias Kloseb9621712010-04-24 17:59:49 +00009872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9873$as_echo_n "checking for lchflags... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009874if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009875 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009876else
Matthias Kloseb9621712010-04-24 17:59:49 +00009877 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009878 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009879else
Matthias Kloseb9621712010-04-24 17:59:49 +00009880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009881/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009882[
Christian Heimesd0764e22007-12-04 15:00:33 +00009883#include <sys/stat.h>
9884#include <unistd.h>
9885int main(int argc, char*argv[])
9886{
9887 if(lchflags(argv[0], 0) != 0)
9888 return 1;
9889 return 0;
9890}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009891]
Christian Heimesd0764e22007-12-04 15:00:33 +00009892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009893if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009894 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009895else
Matthias Kloseb9621712010-04-24 17:59:49 +00009896 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009898rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9899 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009900fi
9901
9902
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9905$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009906if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009907 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009908if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009909 ac_cv_have_lchflags="yes"
9910else
9911 ac_cv_have_lchflags="no"
9912fi
9913
9914fi
9915if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009916
Matthias Kloseb9621712010-04-24 17:59:49 +00009917$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009918
9919fi
9920
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009921case $ac_sys_system/$ac_sys_release in
9922Darwin/*)
9923 _CUR_CFLAGS="${CFLAGS}"
9924 _CUR_LDFLAGS="${LDFLAGS}"
9925 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9926 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9927 ;;
9928esac
9929
Matthias Kloseb9621712010-04-24 17:59:49 +00009930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9931$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009932if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009933 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009934else
9935 ac_check_lib_save_LIBS=$LIBS
9936LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009938/* end confdefs.h. */
9939
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009940/* Override any GCC internal prototype to avoid an error.
9941 Use char because int might match the return type of a GCC
9942 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009943#ifdef __cplusplus
9944extern "C"
9945#endif
9946char inflateCopy ();
9947int
9948main ()
9949{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009950return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009951 ;
9952 return 0;
9953}
9954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009955if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009956 ac_cv_lib_z_inflateCopy=yes
9957else
Matthias Kloseb9621712010-04-24 17:59:49 +00009958 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009960rm -f core conftest.err conftest.$ac_objext \
9961 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009962LIBS=$ac_check_lib_save_LIBS
9963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9965$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009966if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009967
Matthias Kloseb9621712010-04-24 17:59:49 +00009968$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009969
9970fi
9971
9972
9973case $ac_sys_system/$ac_sys_release in
9974Darwin/*)
9975 CFLAGS="${_CUR_CFLAGS}"
9976 LDFLAGS="${_CUR_LDFLAGS}"
9977 ;;
9978esac
9979
Matthias Kloseb9621712010-04-24 17:59:49 +00009980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9981$as_echo_n "checking for hstrerror... " >&6; }
9982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009983/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009984
Martin v. Löwise9416172003-05-03 10:12:45 +00009985#include <netdb.h>
9986
Martin v. Löwise9416172003-05-03 10:12:45 +00009987int
9988main ()
9989{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009990void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009991 ;
9992 return 0;
9993}
9994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009995if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009996
Matthias Kloseb9621712010-04-24 17:59:49 +00009997$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009998
Matthias Kloseb159a552010-04-25 21:00:44 +00009999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010000$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010001else
Matthias Kloseb9621712010-04-24 17:59:49 +000010002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10003$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010004
10005fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010006rm -f core conftest.err conftest.$ac_objext \
10007 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010008
Matthias Kloseb9621712010-04-24 17:59:49 +000010009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10010$as_echo_n "checking for inet_aton... " >&6; }
10011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010012/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010013
Martin v. Löwis86d66262006-02-17 08:40:11 +000010014#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010015#include <sys/socket.h>
10016#include <netinet/in.h>
10017#include <arpa/inet.h>
10018
Martin v. Löwise9416172003-05-03 10:12:45 +000010019int
10020main ()
10021{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010022void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010023 ;
10024 return 0;
10025}
10026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010027if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010028
Matthias Kloseb9621712010-04-24 17:59:49 +000010029$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010030
Matthias Kloseb159a552010-04-25 21:00:44 +000010031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010032$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010033else
Matthias Kloseb9621712010-04-24 17:59:49 +000010034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10035$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010036
10037fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010038rm -f core conftest.err conftest.$ac_objext \
10039 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010040
Matthias Kloseb9621712010-04-24 17:59:49 +000010041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10042$as_echo_n "checking for inet_pton... " >&6; }
10043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010044/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010045
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010046#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010047#include <sys/socket.h>
10048#include <netinet/in.h>
10049#include <arpa/inet.h>
10050
Martin v. Löwise9416172003-05-03 10:12:45 +000010051int
10052main ()
10053{
10054void* p = inet_pton
10055 ;
10056 return 0;
10057}
10058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010059if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010060
Matthias Kloseb9621712010-04-24 17:59:49 +000010061$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010062
Matthias Kloseb159a552010-04-25 21:00:44 +000010063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010064$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010065else
Matthias Kloseb9621712010-04-24 17:59:49 +000010066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10067$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010068
10069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010071
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010072# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10074$as_echo_n "checking for setgroups... " >&6; }
10075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010076/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010077
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010078#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010079#ifdef HAVE_GRP_H
10080#include <grp.h>
10081#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010082
Martin v. Löwisd5843682002-11-21 20:41:28 +000010083int
10084main ()
10085{
10086void* p = setgroups
10087 ;
10088 return 0;
10089}
10090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010091if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010092
Matthias Kloseb9621712010-04-24 17:59:49 +000010093$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010094
Matthias Kloseb159a552010-04-25 21:00:44 +000010095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010096$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010097else
Matthias Kloseb9621712010-04-24 17:59:49 +000010098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10099$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010100
10101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010103
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010104# check for openpty and forkpty
10105
10106for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010107do :
10108 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010109if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010110 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010111#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010112_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010113
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010114else
Matthias Kloseb9621712010-04-24 17:59:49 +000010115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10116$as_echo_n "checking for openpty in -lutil... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010117if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010118 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010119else
Martin v. Löwis11437992002-04-12 09:54:03 +000010120 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010121LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010125/* Override any GCC internal prototype to avoid an error.
10126 Use char because int might match the return type of a GCC
10127 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010128#ifdef __cplusplus
10129extern "C"
10130#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010131char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010132int
10133main ()
10134{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010135return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010136 ;
10137 return 0;
10138}
10139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010140if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010142else
Matthias Kloseb9621712010-04-24 17:59:49 +000010143 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010145rm -f core conftest.err conftest.$ac_objext \
10146 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010147LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10150$as_echo "$ac_cv_lib_util_openpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010151if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010152 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010153 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010154else
Matthias Kloseb9621712010-04-24 17:59:49 +000010155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10156$as_echo_n "checking for openpty in -lbsd... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010157if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010158 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010159else
10160 ac_check_lib_save_LIBS=$LIBS
10161LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010163/* end confdefs.h. */
10164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010165/* Override any GCC internal prototype to avoid an error.
10166 Use char because int might match the return type of a GCC
10167 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010168#ifdef __cplusplus
10169extern "C"
10170#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010171char openpty ();
10172int
10173main ()
10174{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010175return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010176 ;
10177 return 0;
10178}
10179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010180if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010181 ac_cv_lib_bsd_openpty=yes
10182else
Matthias Kloseb9621712010-04-24 17:59:49 +000010183 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010185rm -f core conftest.err conftest.$ac_objext \
10186 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010187LIBS=$ac_check_lib_save_LIBS
10188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10190$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010191if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010192 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010193 LIBS="$LIBS -lbsd"
10194fi
10195
10196
10197fi
10198
Fred Drake8cef4cf2000-06-28 16:40:38 +000010199
10200fi
10201done
10202
10203for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010204do :
10205 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010206if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010207 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010208#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010209_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010210
Fred Drake8cef4cf2000-06-28 16:40:38 +000010211else
Matthias Kloseb9621712010-04-24 17:59:49 +000010212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10213$as_echo_n "checking for forkpty in -lutil... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010214if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010215 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010216else
Martin v. Löwis11437992002-04-12 09:54:03 +000010217 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010218LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010221
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010222/* Override any GCC internal prototype to avoid an error.
10223 Use char because int might match the return type of a GCC
10224 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010225#ifdef __cplusplus
10226extern "C"
10227#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010228char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010229int
10230main ()
10231{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010232return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010233 ;
10234 return 0;
10235}
10236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010237if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010238 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010239else
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010242rm -f core conftest.err conftest.$ac_objext \
10243 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010244LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010245fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10247$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010248if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010249 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010250 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010251else
Matthias Kloseb9621712010-04-24 17:59:49 +000010252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10253$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010254if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010255 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010256else
10257 ac_check_lib_save_LIBS=$LIBS
10258LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010260/* end confdefs.h. */
10261
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010262/* Override any GCC internal prototype to avoid an error.
10263 Use char because int might match the return type of a GCC
10264 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010265#ifdef __cplusplus
10266extern "C"
10267#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010268char forkpty ();
10269int
10270main ()
10271{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010272return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010273 ;
10274 return 0;
10275}
10276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010277if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010278 ac_cv_lib_bsd_forkpty=yes
10279else
Matthias Kloseb9621712010-04-24 17:59:49 +000010280 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010281fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010282rm -f core conftest.err conftest.$ac_objext \
10283 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010284LIBS=$ac_check_lib_save_LIBS
10285fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10287$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010288if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010289 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010290 LIBS="$LIBS -lbsd"
10291fi
10292
10293
10294fi
10295
Fred Drake8cef4cf2000-06-28 16:40:38 +000010296
10297fi
10298done
10299
Jack Jansendd19cf82001-12-06 22:36:17 +000010300
Christian Heimesb186d002008-03-18 15:15:01 +000010301# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010302for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010303do :
10304 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010305if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010306 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010307#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010308_ACEOF
10309
10310fi
10311done
10312
10313
Michael W. Hudson54241132001-12-07 15:38:26 +000010314# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010315for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010316do :
10317 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10318ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010319if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010320 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010321#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010322_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010323
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010324fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010325done
10326
Michael W. Hudson54241132001-12-07 15:38:26 +000010327
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010328ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10329if test "x$ac_cv_func_dup2" = x""yes; then :
10330 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010331
Martin v. Löwis1142de32002-03-29 16:28:31 +000010332else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010333 case " $LIBOBJS " in
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010334 *" dup2.$ac_objext "* ) ;;
10335 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010336 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010337esac
10338
Martin v. Löwis1142de32002-03-29 16:28:31 +000010339fi
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010340
10341ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10342if test "x$ac_cv_func_getcwd" = x""yes; then :
10343 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10344
10345else
10346 case " $LIBOBJS " in
10347 *" getcwd.$ac_objext "* ) ;;
10348 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10349 ;;
10350esac
10351
10352fi
10353
10354ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10355if test "x$ac_cv_func_strdup" = x""yes; then :
10356 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10357
10358else
10359 case " $LIBOBJS " in
10360 *" strdup.$ac_objext "* ) ;;
10361 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10362 ;;
10363esac
10364
10365fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010366
10367
10368for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010369do :
10370 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010371if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010372 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010373#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010376/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010377#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010378int
10379main ()
10380{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010381getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010382 ;
10383 return 0;
10384}
10385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010386if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010387
Matthias Kloseb9621712010-04-24 17:59:49 +000010388$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010389
Guido van Rossum627b2d71993-12-24 10:39:16 +000010390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010392
Guido van Rossum627b2d71993-12-24 10:39:16 +000010393fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010394done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010395
Jack Jansen150753c2003-03-29 22:07:47 +000010396for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010397do :
10398 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010399if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010400 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010401#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010404/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010405#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010406int
10407main ()
10408{
10409setpgrp(0,0);
10410 ;
10411 return 0;
10412}
10413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010414if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010415
Matthias Kloseb9621712010-04-24 17:59:49 +000010416$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010417
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010420
10421fi
10422done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010423
Thomas Wouters3a584202000-08-05 23:28:51 +000010424for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010425do :
10426 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010427if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010428 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010429#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010432/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010433#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010434int
10435main ()
10436{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010437gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010438 ;
10439 return 0;
10440}
10441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010442if ac_fn_c_try_compile "$LINENO"; then :
10443
Guido van Rossum627b2d71993-12-24 10:39:16 +000010444else
Skip Montanaro6dead952003-09-25 14:50:04 +000010445
Matthias Kloseb9621712010-04-24 17:59:49 +000010446$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010447
Martin v. Löwis11437992002-04-12 09:54:03 +000010448
Guido van Rossum627b2d71993-12-24 10:39:16 +000010449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010451
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010452fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010453done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010454
Michael W. Hudson54241132001-12-07 15:38:26 +000010455
Matthias Kloseb9621712010-04-24 17:59:49 +000010456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10457$as_echo_n "checking for major... " >&6; }
10458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010459/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010460
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010461#if defined(MAJOR_IN_MKDEV)
10462#include <sys/mkdev.h>
10463#elif defined(MAJOR_IN_SYSMACROS)
10464#include <sys/sysmacros.h>
10465#else
10466#include <sys/types.h>
10467#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010468
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010469int
10470main ()
10471{
10472
10473 makedev(major(0),minor(0));
10474
10475 ;
10476 return 0;
10477}
10478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010479if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010480
10481
Matthias Kloseb9621712010-04-24 17:59:49 +000010482$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010483
Matthias Kloseb9621712010-04-24 17:59:49 +000010484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10485$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010486
10487else
Skip Montanaro6dead952003-09-25 14:50:04 +000010488
Matthias Kloseb9621712010-04-24 17:59:49 +000010489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10490$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010491
10492fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010493rm -f core conftest.err conftest.$ac_objext \
10494 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010495
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010496# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010497# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10499$as_echo_n "checking for getaddrinfo... " >&6; }
10500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010501/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010502
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010503#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010504#include <sys/socket.h>
10505#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010506#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010507
Martin v. Löwis11437992002-04-12 09:54:03 +000010508int
10509main ()
10510{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010511getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010512 ;
10513 return 0;
10514}
10515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010516if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010517 have_getaddrinfo=yes
10518else
Matthias Kloseb9621712010-04-24 17:59:49 +000010519 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010520fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010521rm -f core conftest.err conftest.$ac_objext \
10522 conftest$ac_exeext conftest.$ac_ext
10523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10524$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010525if test $have_getaddrinfo = yes
10526then
Matthias Kloseb9621712010-04-24 17:59:49 +000010527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10528$as_echo_n "checking getaddrinfo bug... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010529 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010530 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010531else
Matthias Kloseb9621712010-04-24 17:59:49 +000010532 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010533 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010534else
Matthias Kloseb9621712010-04-24 17:59:49 +000010535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010536/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010537
10538#include <sys/types.h>
10539#include <netdb.h>
10540#include <string.h>
10541#include <sys/socket.h>
10542#include <netinet/in.h>
10543
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010544int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010545{
10546 int passive, gaierr, inet4 = 0, inet6 = 0;
10547 struct addrinfo hints, *ai, *aitop;
10548 char straddr[INET6_ADDRSTRLEN], strport[16];
10549
10550 for (passive = 0; passive <= 1; passive++) {
10551 memset(&hints, 0, sizeof(hints));
10552 hints.ai_family = AF_UNSPEC;
10553 hints.ai_flags = passive ? AI_PASSIVE : 0;
10554 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010555 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010556 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10557 (void)gai_strerror(gaierr);
10558 goto bad;
10559 }
10560 for (ai = aitop; ai; ai = ai->ai_next) {
10561 if (ai->ai_addr == NULL ||
10562 ai->ai_addrlen == 0 ||
10563 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10564 straddr, sizeof(straddr), strport, sizeof(strport),
10565 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10566 goto bad;
10567 }
10568 switch (ai->ai_family) {
10569 case AF_INET:
10570 if (strcmp(strport, "54321") != 0) {
10571 goto bad;
10572 }
10573 if (passive) {
10574 if (strcmp(straddr, "0.0.0.0") != 0) {
10575 goto bad;
10576 }
10577 } else {
10578 if (strcmp(straddr, "127.0.0.1") != 0) {
10579 goto bad;
10580 }
10581 }
10582 inet4++;
10583 break;
10584 case AF_INET6:
10585 if (strcmp(strport, "54321") != 0) {
10586 goto bad;
10587 }
10588 if (passive) {
10589 if (strcmp(straddr, "::") != 0) {
10590 goto bad;
10591 }
10592 } else {
10593 if (strcmp(straddr, "::1") != 0) {
10594 goto bad;
10595 }
10596 }
10597 inet6++;
10598 break;
10599 case AF_UNSPEC:
10600 goto bad;
10601 break;
10602 default:
10603 /* another family support? */
10604 break;
10605 }
10606 }
10607 }
10608
10609 if (!(inet4 == 0 || inet4 == 2))
10610 goto bad;
10611 if (!(inet6 == 0 || inet6 == 2))
10612 goto bad;
10613
10614 if (aitop)
10615 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010616 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010617
10618 bad:
10619 if (aitop)
10620 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010621 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010622}
10623
Martin v. Löwis11437992002-04-12 09:54:03 +000010624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010625if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010626 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010627else
Matthias Kloseb9621712010-04-24 17:59:49 +000010628 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010629fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010630rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10631 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010634fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010635
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010636fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010637
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10639$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10640
Mark Dickinson2df5d282009-12-31 21:22:50 +000010641if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010642then
10643 if test $ipv6 = yes
10644 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010645 echo 'Fatal: You must get working getaddrinfo() function.'
10646 echo ' or you can specify "--disable-ipv6"'.
10647 exit 1
10648 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010649else
Martin v. Löwis11437992002-04-12 09:54:03 +000010650
Matthias Kloseb9621712010-04-24 17:59:49 +000010651$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010652
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010653fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010654
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010655for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010656do :
10657 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010658if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010659 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010660#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010661_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010662
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010663fi
10664done
10665
Michael W. Hudson54241132001-12-07 15:38:26 +000010666
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010667# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10669$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010670if test "${ac_cv_header_time+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010671 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010672else
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010674/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010675#include <sys/types.h>
10676#include <sys/time.h>
10677#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010678
Martin v. Löwis11437992002-04-12 09:54:03 +000010679int
10680main ()
10681{
10682if ((struct tm *) 0)
10683return 0;
10684 ;
10685 return 0;
10686}
10687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010688if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010689 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010690else
Matthias Kloseb9621712010-04-24 17:59:49 +000010691 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010694fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10696$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010697if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010698
Matthias Kloseb9621712010-04-24 17:59:49 +000010699$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010700
10701fi
10702
Matthias Kloseb9621712010-04-24 17:59:49 +000010703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10704$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010705if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010706 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010707else
Matthias Kloseb9621712010-04-24 17:59:49 +000010708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010709/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010710#include <sys/types.h>
10711#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010712
Martin v. Löwis11437992002-04-12 09:54:03 +000010713int
10714main ()
10715{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010716struct tm tm;
10717 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010718 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010719 ;
10720 return 0;
10721}
10722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010723if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010724 ac_cv_struct_tm=time.h
10725else
Matthias Kloseb9621712010-04-24 17:59:49 +000010726 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010727fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010729fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10731$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010732if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010733
Matthias Kloseb9621712010-04-24 17:59:49 +000010734$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010735
10736fi
10737
Matthias Kloseb9621712010-04-24 17:59:49 +000010738ac_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 +000010739#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010740
Matthias Kloseb9621712010-04-24 17:59:49 +000010741"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010742if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010743
10744cat >>confdefs.h <<_ACEOF
10745#define HAVE_STRUCT_TM_TM_ZONE 1
10746_ACEOF
10747
10748
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010749fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010750
Martin v. Löwis11437992002-04-12 09:54:03 +000010751if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10752
Matthias Kloseb9621712010-04-24 17:59:49 +000010753$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010754
10755else
Matthias Kloseb9621712010-04-24 17:59:49 +000010756 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10757"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010758if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010759 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010760else
Matthias Kloseb9621712010-04-24 17:59:49 +000010761 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010762fi
10763
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010764cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010765#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010766_ACEOF
10767
Matthias Kloseb9621712010-04-24 17:59:49 +000010768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10769$as_echo_n "checking for tzname... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010770if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010771 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010772else
Matthias Kloseb9621712010-04-24 17:59:49 +000010773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010774/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010775#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010776#if !HAVE_DECL_TZNAME
10777extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010778#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010779
Martin v. Löwis11437992002-04-12 09:54:03 +000010780int
10781main ()
10782{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010783return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010784 ;
10785 return 0;
10786}
10787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010788if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010789 ac_cv_var_tzname=yes
10790else
Matthias Kloseb9621712010-04-24 17:59:49 +000010791 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010793rm -f core conftest.err conftest.$ac_objext \
10794 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010795fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10797$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010798 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010799
Matthias Kloseb9621712010-04-24 17:59:49 +000010800$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010801
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010802 fi
10803fi
10804
Matthias Kloseb9621712010-04-24 17:59:49 +000010805ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010806if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010807
10808cat >>confdefs.h <<_ACEOF
10809#define HAVE_STRUCT_STAT_ST_RDEV 1
10810_ACEOF
10811
10812
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010813fi
10814
Matthias Kloseb9621712010-04-24 17:59:49 +000010815ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010816if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010817
Martin v. Löwis11437992002-04-12 09:54:03 +000010818cat >>confdefs.h <<_ACEOF
10819#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10820_ACEOF
10821
10822
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010823fi
10824
Matthias Kloseb9621712010-04-24 17:59:49 +000010825ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010826if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010827
10828cat >>confdefs.h <<_ACEOF
10829#define HAVE_STRUCT_STAT_ST_FLAGS 1
10830_ACEOF
10831
10832
10833fi
10834
Matthias Kloseb9621712010-04-24 17:59:49 +000010835ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010836if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010837
10838cat >>confdefs.h <<_ACEOF
10839#define HAVE_STRUCT_STAT_ST_GEN 1
10840_ACEOF
10841
10842
10843fi
10844
Matthias Kloseb9621712010-04-24 17:59:49 +000010845ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010846if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010847
10848cat >>confdefs.h <<_ACEOF
10849#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10850_ACEOF
10851
10852
10853fi
10854
Matthias Kloseb9621712010-04-24 17:59:49 +000010855ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010856if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010857
Martin v. Löwis11437992002-04-12 09:54:03 +000010858cat >>confdefs.h <<_ACEOF
10859#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10860_ACEOF
10861
10862
Matthias Kloseb9621712010-04-24 17:59:49 +000010863$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010864
10865else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010866 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010867 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010868 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10869 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010870esac
10871
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010872fi
10873
Michael W. Hudson54241132001-12-07 15:38:26 +000010874
Martin v. Löwis11437992002-04-12 09:54:03 +000010875
Matthias Kloseb9621712010-04-24 17:59:49 +000010876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10877$as_echo_n "checking for time.h that defines altzone... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010878if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010879 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010880else
Matthias Kloseb159a552010-04-25 21:00:44 +000010881
Matthias Kloseb9621712010-04-24 17:59:49 +000010882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010883/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010884#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010885int
10886main ()
10887{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010888return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010889 ;
10890 return 0;
10891}
10892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010893if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010894 ac_cv_header_time_altzone=yes
10895else
Matthias Kloseb9621712010-04-24 17:59:49 +000010896 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010900fi
10901
Matthias Kloseb9621712010-04-24 17:59:49 +000010902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10903$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010904if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010905
Matthias Kloseb9621712010-04-24 17:59:49 +000010906$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010907
10908fi
10909
Guido van Rossumda88dad1995-01-26 00:46:29 +000010910was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10912$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010914/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010915
10916#include <sys/types.h>
10917#include <sys/select.h>
10918#include <sys/time.h>
10919
Martin v. Löwis11437992002-04-12 09:54:03 +000010920int
10921main ()
10922{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010923;
Martin v. Löwis11437992002-04-12 09:54:03 +000010924 ;
10925 return 0;
10926}
10927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010928if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010929
10930
Matthias Kloseb9621712010-04-24 17:59:49 +000010931$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010932
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010933 was_it_defined=yes
10934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10938$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010939
Matthias Kloseb9621712010-04-24 17:59:49 +000010940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10941$as_echo_n "checking for addrinfo... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010942if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010943 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010944else
Matthias Kloseb9621712010-04-24 17:59:49 +000010945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010946/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010947#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010948int
10949main ()
10950{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010951struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010952 ;
10953 return 0;
10954}
10955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010956if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010957 ac_cv_struct_addrinfo=yes
10958else
Matthias Kloseb9621712010-04-24 17:59:49 +000010959 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10962fi
10963
Matthias Kloseb9621712010-04-24 17:59:49 +000010964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10965$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010966if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010967
Matthias Kloseb9621712010-04-24 17:59:49 +000010968$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010969
10970fi
10971
Matthias Kloseb9621712010-04-24 17:59:49 +000010972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10973$as_echo_n "checking for sockaddr_storage... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010974if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010975 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010976else
Matthias Kloseb9621712010-04-24 17:59:49 +000010977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010978/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010979
10980# include <sys/types.h>
10981# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010982int
10983main ()
10984{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010985struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010986 ;
10987 return 0;
10988}
10989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010990if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010991 ac_cv_struct_sockaddr_storage=yes
10992else
Matthias Kloseb9621712010-04-24 17:59:49 +000010993 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010994fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10996fi
10997
Matthias Kloseb9621712010-04-24 17:59:49 +000010998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10999$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011000if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011001
Matthias Kloseb9621712010-04-24 17:59:49 +000011002$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011003
11004fi
11005
Guido van Rossum627b2d71993-12-24 10:39:16 +000011006# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011007
Matthias Kloseb9621712010-04-24 17:59:49 +000011008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11009$as_echo_n "checking whether char is unsigned... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011010if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011011 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011012else
Matthias Kloseb9621712010-04-24 17:59:49 +000011013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011014/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011015$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011016int
11017main ()
11018{
11019static int test_array [1 - 2 * !(((char) -1) < 0)];
11020test_array [0] = 0
11021
11022 ;
11023 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011024}
Martin v. Löwis11437992002-04-12 09:54:03 +000011025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011026if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011027 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011028else
Matthias Kloseb9621712010-04-24 17:59:49 +000011029 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011032fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11034$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011035if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011036 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011037
11038fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011039
Matthias Kloseb9621712010-04-24 17:59:49 +000011040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11041$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011042if test "${ac_cv_c_const+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011043 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011044else
Matthias Kloseb9621712010-04-24 17:59:49 +000011045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011046/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011047
Martin v. Löwis11437992002-04-12 09:54:03 +000011048int
11049main ()
11050{
11051/* FIXME: Include the comments suggested by Paul. */
11052#ifndef __cplusplus
11053 /* Ultrix mips cc rejects this. */
11054 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011055 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011056 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011057 char const *const *pcpcc;
11058 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011059 /* NEC SVR4.0.2 mips cc rejects this. */
11060 struct point {int x, y;};
11061 static struct point const zero = {0,0};
11062 /* AIX XL C 1.02.0.0 rejects this.
11063 It does not let you subtract one const X* pointer from another in
11064 an arm of an if-expression whose if-part is not a constant
11065 expression */
11066 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011067 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011068 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011069 ++pcpcc;
11070 ppc = (char**) pcpcc;
11071 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011072 { /* SCO 3.2v4 cc rejects this. */
11073 char *t;
11074 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011075
Martin v. Löwis11437992002-04-12 09:54:03 +000011076 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011077 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011078 }
11079 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11080 int x[] = {25, 17};
11081 const int *foo = &x[0];
11082 ++foo;
11083 }
11084 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11085 typedef const int *iptr;
11086 iptr p = 0;
11087 ++p;
11088 }
11089 { /* AIX XL C 1.02.0.0 rejects this saying
11090 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11091 struct s { int j; const int *ap[3]; };
11092 struct s *b; b->j = 5;
11093 }
11094 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11095 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011096 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011097 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011098 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011099#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011100
Martin v. Löwis11437992002-04-12 09:54:03 +000011101 ;
11102 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011103}
Martin v. Löwis11437992002-04-12 09:54:03 +000011104_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011105if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011106 ac_cv_c_const=yes
11107else
Matthias Kloseb9621712010-04-24 17:59:49 +000011108 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011111fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11113$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011114if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011115
Matthias Kloseb9621712010-04-24 17:59:49 +000011116$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011117
11118fi
11119
Michael W. Hudson54241132001-12-07 15:38:26 +000011120
Guido van Rossumda88dad1995-01-26 00:46:29 +000011121works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11123$as_echo_n "checking for working volatile... " >&6; }
11124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011125/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011126
Martin v. Löwis11437992002-04-12 09:54:03 +000011127int
11128main ()
11129{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011130volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011131 ;
11132 return 0;
11133}
11134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011135if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011136 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011137else
Skip Montanaro6dead952003-09-25 14:50:04 +000011138
Matthias Kloseb9621712010-04-24 17:59:49 +000011139$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011140
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011141
Guido van Rossum627b2d71993-12-24 10:39:16 +000011142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11145$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011146
Guido van Rossumda88dad1995-01-26 00:46:29 +000011147works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11149$as_echo_n "checking for working signed char... " >&6; }
11150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011151/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011152
Martin v. Löwis11437992002-04-12 09:54:03 +000011153int
11154main ()
11155{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011156signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011157 ;
11158 return 0;
11159}
11160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011161if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011162 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011163else
Skip Montanaro6dead952003-09-25 14:50:04 +000011164
Matthias Kloseb9621712010-04-24 17:59:49 +000011165$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011166
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011167
Guido van Rossum7f43da71994-08-01 12:15:30 +000011168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11171$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011172
Guido van Rossumda88dad1995-01-26 00:46:29 +000011173have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11175$as_echo_n "checking for prototypes... " >&6; }
11176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011177/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011178int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011179int
11180main ()
11181{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011182return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011183 ;
11184 return 0;
11185}
11186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011187if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011188
Matthias Kloseb9621712010-04-24 17:59:49 +000011189$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011190
Matthias Kloseb159a552010-04-25 21:00:44 +000011191 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11195$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011196
Guido van Rossumda88dad1995-01-26 00:46:29 +000011197works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11199$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011201/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011202
11203#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011204int foo(int x, ...) {
11205 va_list va;
11206 va_start(va, x);
11207 va_arg(va, int);
11208 va_arg(va, char *);
11209 va_arg(va, double);
11210 return 0;
11211}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011212
Martin v. Löwis11437992002-04-12 09:54:03 +000011213int
11214main ()
11215{
Guido van Rossum90eea071996-08-30 20:58:57 +000011216return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011217 ;
11218 return 0;
11219}
11220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011221if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011222
11223
Matthias Kloseb9621712010-04-24 17:59:49 +000011224$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011225
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011226 works=yes
11227
Guido van Rossum627b2d71993-12-24 10:39:16 +000011228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11231$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011232
Martin v. Löwisd6320502004-08-12 13:45:08 +000011233# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11235$as_echo_n "checking for socketpair... " >&6; }
11236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011237/* end confdefs.h. */
11238
11239#include <sys/types.h>
11240#include <sys/socket.h>
11241
11242int
11243main ()
11244{
11245void *x=socketpair
11246 ;
11247 return 0;
11248}
11249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011250if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011251
Matthias Kloseb9621712010-04-24 17:59:49 +000011252$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011253
Matthias Kloseb159a552010-04-25 21:00:44 +000011254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011255$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011256else
Matthias Kloseb9621712010-04-24 17:59:49 +000011257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11258$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011259
11260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011262
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011263# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11265$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011267/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011268#include <sys/types.h>
11269#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011270int
11271main ()
11272{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011273struct sockaddr x;
11274x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011275 ;
11276 return 0;
11277}
11278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011279if ac_fn_c_try_compile "$LINENO"; then :
11280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11281$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011282
Matthias Kloseb9621712010-04-24 17:59:49 +000011283$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011284
11285else
Matthias Kloseb9621712010-04-24 17:59:49 +000011286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11287$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011288
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011291
Guido van Rossumda88dad1995-01-26 00:46:29 +000011292va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11294$as_echo_n "checking whether va_list is an array... " >&6; }
11295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011296/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011297
11298#ifdef HAVE_STDARG_PROTOTYPES
11299#include <stdarg.h>
11300#else
11301#include <varargs.h>
11302#endif
11303
Martin v. Löwis11437992002-04-12 09:54:03 +000011304int
11305main ()
11306{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011307va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011308 ;
11309 return 0;
11310}
11311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011312if ac_fn_c_try_compile "$LINENO"; then :
11313
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011314else
Skip Montanaro6dead952003-09-25 14:50:04 +000011315
Martin v. Löwis11437992002-04-12 09:54:03 +000011316
Matthias Kloseb9621712010-04-24 17:59:49 +000011317$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011318
Guido van Rossumda88dad1995-01-26 00:46:29 +000011319 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011320
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11324$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011325
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011326# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011327
11328
Matthias Kloseb9621712010-04-24 17:59:49 +000011329ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011330if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011331
Matthias Kloseb9621712010-04-24 17:59:49 +000011332 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011333
Matthias Kloseb9621712010-04-24 17:59:49 +000011334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11335$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011336 OLD_CFLAGS=$CFLAGS
11337 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011339/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011340
11341# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011342
Martin v. Löwis11437992002-04-12 09:54:03 +000011343int
11344main ()
11345{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011346
11347 char *name;
11348 struct hostent *he, *res;
11349 char buffer[2048];
11350 int buflen = 2048;
11351 int h_errnop;
11352
11353 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011354
11355 ;
11356 return 0;
11357}
11358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011359if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011360
Matthias Kloseb9621712010-04-24 17:59:49 +000011361 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011362
Martin v. Löwis11437992002-04-12 09:54:03 +000011363
Matthias Kloseb9621712010-04-24 17:59:49 +000011364$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011365
Matthias Kloseb9621712010-04-24 17:59:49 +000011366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11367$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011368
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011369else
Skip Montanaro6dead952003-09-25 14:50:04 +000011370
Matthias Kloseb9621712010-04-24 17:59:49 +000011371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11372$as_echo "no" >&6; }
11373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11374$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011376/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011377
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011378# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011379
Martin v. Löwis11437992002-04-12 09:54:03 +000011380int
11381main ()
11382{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011383
11384 char *name;
11385 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011386 char buffer[2048];
11387 int buflen = 2048;
11388 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011389
Matthias Kloseb159a552010-04-25 21:00:44 +000011390 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011391
11392 ;
11393 return 0;
11394}
11395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011396if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011397
Matthias Kloseb9621712010-04-24 17:59:49 +000011398 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011399
Martin v. Löwis11437992002-04-12 09:54:03 +000011400
Matthias Kloseb159a552010-04-25 21:00:44 +000011401$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011402
Matthias Kloseb9621712010-04-24 17:59:49 +000011403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11404$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011405
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011406else
Skip Montanaro6dead952003-09-25 14:50:04 +000011407
Matthias Kloseb9621712010-04-24 17:59:49 +000011408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11409$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11411$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11413/* end confdefs.h. */
11414
11415# include <netdb.h>
11416
11417int
11418main ()
11419{
11420
11421 char *name;
11422 struct hostent *he;
11423 struct hostent_data data;
11424
11425 (void) gethostbyname_r(name, he, &data);
11426
11427 ;
11428 return 0;
11429}
11430_ACEOF
11431if ac_fn_c_try_compile "$LINENO"; then :
11432
11433 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11434
11435
11436$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11437
11438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11439$as_echo "yes" >&6; }
11440
11441else
11442
11443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11444$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011445
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011448
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011451
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011454 CFLAGS=$OLD_CFLAGS
11455
11456else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011457
Matthias Kloseb9621712010-04-24 17:59:49 +000011458 for ac_func in gethostbyname
11459do :
11460 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011461if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011462 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011463#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011464_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011465
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011466fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011467done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011468
Michael W. Hudson54241132001-12-07 15:38:26 +000011469
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011470fi
11471
Michael W. Hudson54241132001-12-07 15:38:26 +000011472
11473
11474
11475
11476
11477
Guido van Rossum627b2d71993-12-24 10:39:16 +000011478# checks for system services
11479# (none yet)
11480
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011481# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011482ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011483if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011484
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011485else
Matthias Kloseb9621712010-04-24 17:59:49 +000011486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11487$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011488if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011489 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011490else
Martin v. Löwis11437992002-04-12 09:54:03 +000011491 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011492LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011495
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496/* Override any GCC internal prototype to avoid an error.
11497 Use char because int might match the return type of a GCC
11498 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011499#ifdef __cplusplus
11500extern "C"
11501#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011502char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011503int
11504main ()
11505{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011506return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011507 ;
11508 return 0;
11509}
11510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011511if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011512 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011513else
Matthias Kloseb9621712010-04-24 17:59:49 +000011514 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011515fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011516rm -f core conftest.err conftest.$ac_objext \
11517 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011518LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011519fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11521$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011522if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011523 cat >>confdefs.h <<_ACEOF
11524#define HAVE_LIBIEEE 1
11525_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011526
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011527 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011528
Guido van Rossum627b2d71993-12-24 10:39:16 +000011529fi
11530
Michael W. Hudson54241132001-12-07 15:38:26 +000011531
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011532fi
11533
Michael W. Hudson54241132001-12-07 15:38:26 +000011534
Guido van Rossum7f253911997-05-09 02:42:48 +000011535# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11537$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011538
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011539# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011540if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011541 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011542if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011543then
11544
Matthias Kloseb9621712010-04-24 17:59:49 +000011545$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011546
Matthias Kloseb9621712010-04-24 17:59:49 +000011547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11548$as_echo "yes" >&6; }
11549else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11550$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011551fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011552else
Matthias Kloseb9621712010-04-24 17:59:49 +000011553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11554$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011555fi
11556
Guido van Rossum7f253911997-05-09 02:42:48 +000011557
Guido van Rossum7f43da71994-08-01 12:15:30 +000011558# check for --with-libm=...
11559
Guido van Rossum563e7081996-09-10 18:20:48 +000011560case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011561Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011562*) LIBM=-lm
11563esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11565$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011567# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011568if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011569 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011570if test "$withval" = no
11571then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11573$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011574elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011575then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11577$as_echo "set LIBM=\"$withval\"" >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011578else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011579fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011580else
Matthias Kloseb9621712010-04-24 17:59:49 +000011581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11582$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011583fi
11584
Guido van Rossum7f43da71994-08-01 12:15:30 +000011585
11586# check for --with-libc=...
11587
Matthias Kloseb9621712010-04-24 17:59:49 +000011588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11589$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011590
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011591# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011592if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011593 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011594if test "$withval" = no
11595then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11597$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011598elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011599then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11601$as_echo "set LIBC=\"$withval\"" >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011602else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011603fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011604else
Matthias Kloseb9621712010-04-24 17:59:49 +000011605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11606$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011607fi
11608
Guido van Rossum7f43da71994-08-01 12:15:30 +000011609
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011610# **************************************************
11611# * Check for various properties of floating point *
11612# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011613
Matthias Kloseb9621712010-04-24 17:59:49 +000011614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11615$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011616if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011617 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011618else
11619
Matthias Kloseb9621712010-04-24 17:59:49 +000011620if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011621 ac_cv_little_endian_double=no
11622else
Matthias Kloseb9621712010-04-24 17:59:49 +000011623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011624/* end confdefs.h. */
11625
11626#include <string.h>
11627int main() {
11628 double x = 9006104071832581.0;
11629 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11630 return 0;
11631 else
11632 return 1;
11633}
11634
11635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011636if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011637 ac_cv_little_endian_double=yes
11638else
Matthias Kloseb9621712010-04-24 17:59:49 +000011639 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011640fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011641rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11642 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011643fi
11644
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011645fi
11646
Matthias Kloseb9621712010-04-24 17:59:49 +000011647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11648$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011649if test "$ac_cv_little_endian_double" = yes
11650then
11651
Matthias Kloseb9621712010-04-24 17:59:49 +000011652$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011653
11654fi
11655
Matthias Kloseb9621712010-04-24 17:59:49 +000011656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11657$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011658if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011659 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011660else
11661
Matthias Kloseb9621712010-04-24 17:59:49 +000011662if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011663 ac_cv_big_endian_double=no
11664else
Matthias Kloseb9621712010-04-24 17:59:49 +000011665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011666/* end confdefs.h. */
11667
11668#include <string.h>
11669int main() {
11670 double x = 9006104071832581.0;
11671 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11672 return 0;
11673 else
11674 return 1;
11675}
11676
11677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011678if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011679 ac_cv_big_endian_double=yes
11680else
Matthias Kloseb9621712010-04-24 17:59:49 +000011681 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011682fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011683rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11684 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011685fi
11686
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011687fi
11688
Matthias Kloseb9621712010-04-24 17:59:49 +000011689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11690$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011691if test "$ac_cv_big_endian_double" = yes
11692then
11693
Matthias Kloseb9621712010-04-24 17:59:49 +000011694$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011695
11696fi
11697
11698# Some ARM platforms use a mixed-endian representation for doubles.
11699# While Python doesn't currently have full support for these platforms
11700# (see e.g., issue 1762561), we can at least make sure that float <-> string
11701# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11703$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011704if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011705 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011706else
11707
Matthias Kloseb9621712010-04-24 17:59:49 +000011708if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011709 ac_cv_mixed_endian_double=no
11710else
Matthias Kloseb9621712010-04-24 17:59:49 +000011711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011712/* end confdefs.h. */
11713
11714#include <string.h>
11715int main() {
11716 double x = 9006104071832581.0;
11717 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11718 return 0;
11719 else
11720 return 1;
11721}
11722
11723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011724if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011725 ac_cv_mixed_endian_double=yes
11726else
Matthias Kloseb9621712010-04-24 17:59:49 +000011727 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011729rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11730 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011731fi
11732
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011733fi
11734
Matthias Kloseb9621712010-04-24 17:59:49 +000011735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11736$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011737if test "$ac_cv_mixed_endian_double" = yes
11738then
11739
Matthias Kloseb9621712010-04-24 17:59:49 +000011740$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011741
11742fi
11743
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011744# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011745# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011746# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011747# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011748# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011749# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011750
11751# This inline assembler syntax may also work for suncc and icc,
11752# so we try it on all platforms.
11753
Matthias Kloseb9621712010-04-24 17:59:49 +000011754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11755$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011757/* end confdefs.h. */
11758
11759int
11760main ()
11761{
11762
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011763 unsigned short cw;
11764 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11765 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011766
11767 ;
11768 return 0;
11769}
11770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011771if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011772 have_gcc_asm_for_x87=yes
11773else
Matthias Kloseb9621712010-04-24 17:59:49 +000011774 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011775fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11778$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011779if test "$have_gcc_asm_for_x87" = yes
11780then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011781
Matthias Kloseb9621712010-04-24 17:59:49 +000011782$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011783
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011784fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011785
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011786# Detect whether system arithmetic is subject to x87-style double
11787# rounding issues. The result of this test has little meaning on non
11788# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11789# mode is round-to-nearest and double rounding issues are present, and
11790# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11792$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011793# $BASECFLAGS may affect the result
11794ac_save_cc="$CC"
11795CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011796if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011797 ac_cv_x87_double_rounding=no
11798else
Matthias Kloseb9621712010-04-24 17:59:49 +000011799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011800/* end confdefs.h. */
11801
11802#include <stdlib.h>
11803#include <math.h>
11804int main() {
11805 volatile double x, y, z;
11806 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11807 x = 0.99999999999999989; /* 1-2**-53 */
11808 y = 1./x;
11809 if (y != 1.)
11810 exit(0);
11811 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11812 x = 1e16;
11813 y = 2.99999;
11814 z = x + y;
11815 if (z != 1e16+4.)
11816 exit(0);
11817 /* both tests show evidence of double rounding */
11818 exit(1);
11819}
11820
11821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011822if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011823 ac_cv_x87_double_rounding=no
11824else
Matthias Kloseb9621712010-04-24 17:59:49 +000011825 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011826fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11828 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011829fi
11830
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011831CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11833$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011834if test "$ac_cv_x87_double_rounding" = yes
11835then
11836
Matthias Kloseb9621712010-04-24 17:59:49 +000011837$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011838
11839fi
11840
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011841# ************************************
11842# * Check for mathematical functions *
11843# ************************************
11844
11845LIBS_SAVE=$LIBS
11846LIBS="$LIBS $LIBM"
11847
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011848for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11849do :
11850 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11851ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011852if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011853 cat >>confdefs.h <<_ACEOF
11854#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11855_ACEOF
11856
11857fi
11858done
11859
Victor Stinner8f9f8d62011-05-09 12:45:41 +020011860for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011861do :
11862 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11863ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011864if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011865 cat >>confdefs.h <<_ACEOF
11866#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11867_ACEOF
11868
11869fi
11870done
11871
11872ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11873"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011874if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011875 ac_have_decl=1
11876else
11877 ac_have_decl=0
11878fi
11879
11880cat >>confdefs.h <<_ACEOF
11881#define HAVE_DECL_ISINF $ac_have_decl
11882_ACEOF
11883ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11884"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011885if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011886 ac_have_decl=1
11887else
11888 ac_have_decl=0
11889fi
11890
11891cat >>confdefs.h <<_ACEOF
11892#define HAVE_DECL_ISNAN $ac_have_decl
11893_ACEOF
11894ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11895"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011896if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011897 ac_have_decl=1
11898else
11899 ac_have_decl=0
11900fi
11901
11902cat >>confdefs.h <<_ACEOF
11903#define HAVE_DECL_ISFINITE $ac_have_decl
11904_ACEOF
11905
11906
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011907# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11908# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11910$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011911if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011912 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011913else
11914
Matthias Kloseb9621712010-04-24 17:59:49 +000011915if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011916 ac_cv_tanh_preserves_zero_sign=no
11917else
Matthias Kloseb9621712010-04-24 17:59:49 +000011918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011919/* end confdefs.h. */
11920
11921#include <math.h>
11922#include <stdlib.h>
11923int main() {
11924 /* return 0 if either negative zeros don't exist
11925 on this platform or if negative zeros exist
11926 and tanh(-0.) == -0. */
11927 if (atan2(0., -1.) == atan2(-0., -1.) ||
11928 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11929 else exit(1);
11930}
11931
11932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011933if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011934 ac_cv_tanh_preserves_zero_sign=yes
11935else
Matthias Kloseb9621712010-04-24 17:59:49 +000011936 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011937fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011938rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11939 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011940fi
11941
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011942fi
11943
Matthias Kloseb9621712010-04-24 17:59:49 +000011944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11945$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011946if test "$ac_cv_tanh_preserves_zero_sign" = yes
11947then
11948
Matthias Kloseb9621712010-04-24 17:59:49 +000011949$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011950
11951fi
11952
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011953if test "$ac_cv_func_log1p" = yes
11954then
11955 # On some versions of AIX, log1p(-0.) returns 0. instead of
11956 # -0. See issue #9920.
11957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
11958$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011959 if test "${ac_cv_log1p_drops_zero_sign+set}" = set; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011960 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011961else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011962
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011963 if test "$cross_compiling" = yes; then :
11964 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011965else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11967/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011968
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011969 #include <math.h>
11970 #include <stdlib.h>
11971 int main() {
11972 /* Fail if the signs of log1p(-0.) and -0. can be
11973 distinguished. */
11974 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
11975 return 0;
11976 else
11977 return 1;
11978 }
11979
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011980_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011981if ac_fn_c_try_run "$LINENO"; then :
11982 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011983else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011984 ac_cv_log1p_drops_zero_sign=yes
11985fi
11986rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11987 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011988fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011989
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011990fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011991
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
11993$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
11994fi
11995if test "$ac_cv_log1p_drops_zero_sign" = yes
11996then
11997
11998$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
11999
12000fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012001
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012002LIBS=$LIBS_SAVE
12003
Mark Dickinsona614f042009-11-28 12:48:43 +000012004# For multiprocessing module, check that sem_open
12005# actually works. For FreeBSD versions <= 7.2,
12006# the kernel module that provides POSIX semaphores
12007# isn't loaded by default, so an attempt to call
12008# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12010$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012011if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012012 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012013else
Matthias Kloseb9621712010-04-24 17:59:49 +000012014 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012015 ac_cv_posix_semaphores_enabled=yes
12016else
Matthias Kloseb9621712010-04-24 17:59:49 +000012017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012018/* end confdefs.h. */
12019
12020#include <unistd.h>
12021#include <fcntl.h>
12022#include <stdio.h>
12023#include <semaphore.h>
12024#include <sys/stat.h>
12025
12026int main(void) {
12027 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12028 if (a == SEM_FAILED) {
12029 perror("sem_open");
12030 return 1;
12031 }
12032 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012033 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012034 return 0;
12035}
12036
12037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012038if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012039 ac_cv_posix_semaphores_enabled=yes
12040else
Matthias Kloseb9621712010-04-24 17:59:49 +000012041 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012042fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012043rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12044 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012045fi
12046
12047
Mark Dickinsona614f042009-11-28 12:48:43 +000012048fi
12049
Matthias Kloseb9621712010-04-24 17:59:49 +000012050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12051$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012052if test $ac_cv_posix_semaphores_enabled = no
12053then
12054
Matthias Kloseb9621712010-04-24 17:59:49 +000012055$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012056
12057fi
12058
Mark Dickinson10683072009-04-18 21:18:19 +000012059# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12061$as_echo_n "checking for broken sem_getvalue... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012062if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012063 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012064else
Matthias Kloseb9621712010-04-24 17:59:49 +000012065 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012066 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012067else
Matthias Kloseb9621712010-04-24 17:59:49 +000012068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012069/* end confdefs.h. */
12070
12071#include <unistd.h>
12072#include <fcntl.h>
12073#include <stdio.h>
12074#include <semaphore.h>
12075#include <sys/stat.h>
12076
12077int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012078 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012079 int count;
12080 int res;
12081 if(a==SEM_FAILED){
12082 perror("sem_open");
12083 return 1;
12084
12085 }
12086 res = sem_getvalue(a, &count);
12087 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012088 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012089 return res==-1 ? 1 : 0;
12090}
12091
Mark Dickinson10683072009-04-18 21:18:19 +000012092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012093if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012094 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012095else
Matthias Kloseb9621712010-04-24 17:59:49 +000012096 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012098rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12099 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012100fi
12101
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012102
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012103fi
12104
Matthias Kloseb9621712010-04-24 17:59:49 +000012105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12106$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012107if test $ac_cv_broken_sem_getvalue = yes
12108then
12109
Matthias Kloseb9621712010-04-24 17:59:49 +000012110$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012111
12112fi
12113
Mark Dickinsonbd792642009-03-18 20:06:12 +000012114# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12116$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012117# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012118if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012119 enableval=$enable_big_digits; case $enable_big_digits in
12120yes)
12121 enable_big_digits=30 ;;
12122no)
12123 enable_big_digits=15 ;;
1212415|30)
12125 ;;
12126*)
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070012127 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 +000012128esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12130$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012131
12132cat >>confdefs.h <<_ACEOF
12133#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12134_ACEOF
12135
12136
12137else
Matthias Kloseb9621712010-04-24 17:59:49 +000012138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12139$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012140fi
12141
12142
Guido van Rossumef2255b2000-03-10 22:30:29 +000012143# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012144ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012145if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012146
12147
Matthias Kloseb9621712010-04-24 17:59:49 +000012148$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012149
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012150 wchar_h="yes"
12151
Guido van Rossumef2255b2000-03-10 22:30:29 +000012152else
Martin v. Löwis11437992002-04-12 09:54:03 +000012153 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012154
12155fi
12156
Michael W. Hudson54241132001-12-07 15:38:26 +000012157
Martin v. Löwis11437992002-04-12 09:54:03 +000012158
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012159# determine wchar_t size
12160if test "$wchar_h" = yes
12161then
Matthias Kloseb9621712010-04-24 17:59:49 +000012162 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012163# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12164# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12165# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12167$as_echo_n "checking size of wchar_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012168if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012169 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012170else
Matthias Kloseb9621712010-04-24 17:59:49 +000012171 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12172"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012173
Martin v. Löwis11437992002-04-12 09:54:03 +000012174else
Matthias Kloseb9621712010-04-24 17:59:49 +000012175 if test "$ac_cv_type_wchar_t" = yes; then
12176 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12177$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070012178as_fn_error 77 "cannot compute sizeof (wchar_t)
12179See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012180 else
12181 ac_cv_sizeof_wchar_t=0
12182 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012183fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012184
Martin v. Löwis11437992002-04-12 09:54:03 +000012185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12187$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012188
12189
12190
Martin v. Löwis11437992002-04-12 09:54:03 +000012191cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012192#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012193_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012194
Michael W. Hudson54241132001-12-07 15:38:26 +000012195
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012196fi
12197
Matthias Kloseb9621712010-04-24 17:59:49 +000012198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12199$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012200have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012202/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012203
12204#include <tcl.h>
12205#if TCL_UTF_MAX != 6
12206# error "NOT UCS4_TCL"
12207#endif
12208int
12209main ()
12210{
12211
12212 ;
12213 return 0;
12214}
12215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012216if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012217
12218
Matthias Kloseb9621712010-04-24 17:59:49 +000012219$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012220
12221 have_ucs4_tcl=yes
12222
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12226$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012227
Skip Montanaro6dead952003-09-25 14:50:04 +000012228# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012229if test "$wchar_h" = yes
12230then
12231 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12233$as_echo_n "checking whether wchar_t is signed... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012234 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012235 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012236else
12237
Matthias Kloseb9621712010-04-24 17:59:49 +000012238 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012239 ac_cv_wchar_t_signed=yes
12240else
Matthias Kloseb9621712010-04-24 17:59:49 +000012241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012242/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012243
12244 #include <wchar.h>
12245 int main()
12246 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012247 /* Success: exit code 0 */
12248 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012249 }
12250
12251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012252if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012253 ac_cv_wchar_t_signed=yes
12254else
Matthias Kloseb9621712010-04-24 17:59:49 +000012255 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012257rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12258 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012259fi
12260
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012261fi
12262
Matthias Kloseb9621712010-04-24 17:59:49 +000012263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12264$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012265fi
12266
Matthias Kloseb9621712010-04-24 17:59:49 +000012267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12268$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012269
12270# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012271if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012272 withval=$with_wide_unicode;
12273if test "$withval" != no
12274then unicode_size="4"
12275else unicode_size="2"
12276fi
12277
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012278else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012279
Georg Brandl52d168a2008-01-07 18:10:24 +000012280case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012281 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012282 *) unicode_size="2" ;;
12283esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012284
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012285fi
12286
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012287
12288
Georg Brandl52d168a2008-01-07 18:10:24 +000012289case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012290 4)
12291 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12292
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012293 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012294 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012295 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012296 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012297esac
12298
Michael W. Hudson54241132001-12-07 15:38:26 +000012299
Martin v. Löwis11437992002-04-12 09:54:03 +000012300
Georg Brandl52d168a2008-01-07 18:10:24 +000012301# wchar_t is only usable if it maps to an unsigned type
12302if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012303 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012304then
12305 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012306
Matthias Kloseb9621712010-04-24 17:59:49 +000012307$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012308
Matthias Kloseb9621712010-04-24 17:59:49 +000012309 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012310
Georg Brandl52d168a2008-01-07 18:10:24 +000012311elif test "$ac_cv_sizeof_short" = "$unicode_size"
12312then
12313 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012314 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012315
Georg Brandl52d168a2008-01-07 18:10:24 +000012316elif test "$ac_cv_sizeof_long" = "$unicode_size"
12317then
12318 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012319 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012320
Georg Brandl52d168a2008-01-07 18:10:24 +000012321else
12322 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012323fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12325$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012326
12327# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12329$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012330if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012331 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012332else
Matthias Kloseb9621712010-04-24 17:59:49 +000012333 ac_cv_c_bigendian=unknown
12334 # See if we're dealing with a universal compiler.
12335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12336/* end confdefs.h. */
12337#ifndef __APPLE_CC__
12338 not a universal capable compiler
12339 #endif
12340 typedef int dummy;
12341
Skip Montanaro6dead952003-09-25 14:50:04 +000012342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012343if ac_fn_c_try_compile "$LINENO"; then :
12344
12345 # Check for potential -arch flags. It is not universal unless
12346 # there are at least two -arch flags with different values.
12347 ac_arch=
12348 ac_prev=
12349 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12350 if test -n "$ac_prev"; then
12351 case $ac_word in
12352 i?86 | x86_64 | ppc | ppc64)
12353 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12354 ac_arch=$ac_word
12355 else
12356 ac_cv_c_bigendian=universal
12357 break
12358 fi
12359 ;;
12360 esac
12361 ac_prev=
12362 elif test "x$ac_word" = "x-arch"; then
12363 ac_prev=arch
12364 fi
12365 done
12366fi
12367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12368 if test $ac_cv_c_bigendian = unknown; then
12369 # See if sys/param.h defines the BYTE_ORDER macro.
12370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012371/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012372#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012373 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012374
Martin v. Löwis11437992002-04-12 09:54:03 +000012375int
12376main ()
12377{
Matthias Kloseb9621712010-04-24 17:59:49 +000012378#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12379 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12380 && LITTLE_ENDIAN)
12381 bogus endian macros
12382 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012383
12384 ;
12385 return 0;
12386}
12387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012388if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012389 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012391/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012392#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012393 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012394
Martin v. Löwis11437992002-04-12 09:54:03 +000012395int
12396main ()
12397{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012398#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012399 not big endian
12400 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012401
12402 ;
12403 return 0;
12404}
12405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012406if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012407 ac_cv_c_bigendian=yes
12408else
Matthias Kloseb9621712010-04-24 17:59:49 +000012409 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012412fi
12413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12414 fi
12415 if test $ac_cv_c_bigendian = unknown; then
12416 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012418/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012419#include <limits.h>
12420
Martin v. Löwis11437992002-04-12 09:54:03 +000012421int
12422main ()
12423{
Matthias Kloseb9621712010-04-24 17:59:49 +000012424#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12425 bogus endian macros
12426 #endif
12427
Martin v. Löwis11437992002-04-12 09:54:03 +000012428 ;
12429 return 0;
12430}
12431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012432if ac_fn_c_try_compile "$LINENO"; then :
12433 # It does; now see whether it defined to _BIG_ENDIAN or not.
12434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12435/* end confdefs.h. */
12436#include <limits.h>
12437
12438int
12439main ()
12440{
12441#ifndef _BIG_ENDIAN
12442 not big endian
12443 #endif
12444
12445 ;
12446 return 0;
12447}
12448_ACEOF
12449if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012450 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012451else
Matthias Kloseb9621712010-04-24 17:59:49 +000012452 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012453fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12455fi
12456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12457 fi
12458 if test $ac_cv_c_bigendian = unknown; then
12459 # Compile a test program.
12460 if test "$cross_compiling" = yes; then :
12461 # Try to guess by grepping values from an object file.
12462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12463/* end confdefs.h. */
12464short int ascii_mm[] =
12465 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12466 short int ascii_ii[] =
12467 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12468 int use_ascii (int i) {
12469 return ascii_mm[i] + ascii_ii[i];
12470 }
12471 short int ebcdic_ii[] =
12472 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12473 short int ebcdic_mm[] =
12474 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12475 int use_ebcdic (int i) {
12476 return ebcdic_mm[i] + ebcdic_ii[i];
12477 }
12478 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012479
Matthias Kloseb9621712010-04-24 17:59:49 +000012480int
12481main ()
12482{
12483return use_ascii (foo) == use_ebcdic (foo);
12484 ;
12485 return 0;
12486}
12487_ACEOF
12488if ac_fn_c_try_compile "$LINENO"; then :
12489 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12490 ac_cv_c_bigendian=yes
12491 fi
12492 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12493 if test "$ac_cv_c_bigendian" = unknown; then
12494 ac_cv_c_bigendian=no
12495 else
12496 # finding both strings is unlikely to happen, but who knows?
12497 ac_cv_c_bigendian=unknown
12498 fi
12499 fi
12500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012502else
Matthias Kloseb9621712010-04-24 17:59:49 +000012503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012504/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012505$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012506int
12507main ()
12508{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012509
Matthias Kloseb9621712010-04-24 17:59:49 +000012510 /* Are we little or big endian? From Harbison&Steele. */
12511 union
12512 {
12513 long int l;
12514 char c[sizeof (long int)];
12515 } u;
12516 u.l = 1;
12517 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012518
12519 ;
12520 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012521}
Martin v. Löwis11437992002-04-12 09:54:03 +000012522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012523if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012524 ac_cv_c_bigendian=no
12525else
Matthias Kloseb9621712010-04-24 17:59:49 +000012526 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012527fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012528rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12529 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012531
Matthias Kloseb9621712010-04-24 17:59:49 +000012532 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012533fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12535$as_echo "$ac_cv_c_bigendian" >&6; }
12536 case $ac_cv_c_bigendian in #(
12537 yes)
12538 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12539;; #(
12540 no)
12541 ;; #(
12542 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012543
Matthias Kloseb9621712010-04-24 17:59:49 +000012544$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012545
Matthias Kloseb9621712010-04-24 17:59:49 +000012546 ;; #(
12547 *)
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070012548 as_fn_error $? "unknown endianness
12549 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012550 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012551
Michael W. Hudson54241132001-12-07 15:38:26 +000012552
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012553# ABI version string for Python extension modules. This appears between the
12554# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12555# from the following attributes which affect the ABI of this Python build (in
12556# this order):
12557#
12558# * The Python implementation (always 'cpython-' for us)
12559# * The major and minor version numbers
12560# * --with-pydebug (adds a 'd')
12561# * --with-pymalloc (adds a 'm')
12562# * --with-wide-unicode (adds a 'u')
12563#
12564# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012565# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12566# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012567
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12569$as_echo_n "checking ABIFLAGS... " >&6; }
12570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12571$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12573$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012574SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12576$as_echo "$SOABI" >&6; }
12577
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12579$as_echo_n "checking LDVERSION... " >&6; }
12580LDVERSION='$(VERSION)$(ABIFLAGS)'
12581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12582$as_echo "$LDVERSION" >&6; }
12583
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012584# SO is the extension of shared libraries `(including the dot!)
12585# -- usually .so, .sl on HP-UX, .dll on Cygwin
12586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12587$as_echo_n "checking SO... " >&6; }
12588if test -z "$SO"
12589then
12590 case $ac_sys_system in
12591 hp*|HP*)
12592 case `uname -m` in
12593 ia64) SO=.so;;
12594 *) SO=.sl;;
12595 esac
12596 ;;
12597 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012598 Linux*|GNU*)
12599 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012600 *) SO=.so;;
12601 esac
12602else
12603 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012604 echo
12605 echo '====================================================================='
12606 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012607 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012608 echo '+ Do you really mean to change the extension for shared libraries? +'
12609 echo '+ Continuing in 10 seconds to let you to ponder. +'
12610 echo '+ +'
12611 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012612 sleep 10
12613fi
12614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12615$as_echo "$SO" >&6; }
12616
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012617# Check whether right shifting a negative integer extends the sign bit
12618# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12620$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012621if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012622 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012623else
Martin v. Löwis11437992002-04-12 09:54:03 +000012624
Matthias Kloseb9621712010-04-24 17:59:49 +000012625if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012626 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012627else
Matthias Kloseb9621712010-04-24 17:59:49 +000012628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012629/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012630
12631int main()
12632{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012633 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012634}
12635
Martin v. Löwis11437992002-04-12 09:54:03 +000012636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012637if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012638 ac_cv_rshift_extends_sign=yes
12639else
Matthias Kloseb9621712010-04-24 17:59:49 +000012640 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012641fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12643 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012644fi
12645
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012646fi
12647
Matthias Kloseb9621712010-04-24 17:59:49 +000012648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12649$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012650if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012651then
Martin v. Löwis11437992002-04-12 09:54:03 +000012652
Matthias Kloseb9621712010-04-24 17:59:49 +000012653$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012654
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012655fi
12656
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012657# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12659$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012660if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012661 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012662else
Martin v. Löwis11437992002-04-12 09:54:03 +000012663
Matthias Kloseb9621712010-04-24 17:59:49 +000012664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012665/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012666#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012667int
12668main ()
12669{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012670
12671 FILE *f = fopen("/dev/null", "r");
12672 flockfile(f);
12673 getc_unlocked(f);
12674 funlockfile(f);
12675
Martin v. Löwis11437992002-04-12 09:54:03 +000012676 ;
12677 return 0;
12678}
12679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012680if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012681 ac_cv_have_getc_unlocked=yes
12682else
Matthias Kloseb9621712010-04-24 17:59:49 +000012683 ac_cv_have_getc_unlocked=no
12684fi
12685rm -f core conftest.err conftest.$ac_objext \
12686 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012688
Matthias Kloseb9621712010-04-24 17:59:49 +000012689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12690$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012691if test "$ac_cv_have_getc_unlocked" = yes
12692then
Martin v. Löwis11437992002-04-12 09:54:03 +000012693
Matthias Kloseb9621712010-04-24 17:59:49 +000012694$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012695
12696fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012697
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012698# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012699# save the value of LIBS so we don't actually link Python with readline
12700LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012701
Gregory P. Smith18820942008-09-07 06:24:49 +000012702# On some systems we need to link readline to a termcap compatible
12703# library. NOTE: Keep the precedence of listed libraries synchronised
12704# with setup.py.
12705py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12707$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012708for py_libtermcap in "" ncursesw ncurses curses termcap; do
12709 if test -z "$py_libtermcap"; then
12710 READLINE_LIBS="-lreadline"
12711 else
12712 READLINE_LIBS="-lreadline -l$py_libtermcap"
12713 fi
12714 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012716/* end confdefs.h. */
12717
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012718/* Override any GCC internal prototype to avoid an error.
12719 Use char because int might match the return type of a GCC
12720 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012721#ifdef __cplusplus
12722extern "C"
12723#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012724char readline ();
12725int
12726main ()
12727{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012728return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012729 ;
12730 return 0;
12731}
12732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012733if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012734 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012735fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012736rm -f core conftest.err conftest.$ac_objext \
12737 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012738 if test $py_cv_lib_readline = yes; then
12739 break
12740 fi
12741done
12742# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12743#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012744if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12746$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012747else
Matthias Kloseb9621712010-04-24 17:59:49 +000012748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12749$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012750
Matthias Kloseb9621712010-04-24 17:59:49 +000012751$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012752
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012753fi
12754
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012755# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12757$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012758if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012759 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012760else
12761 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012762LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012764/* end confdefs.h. */
12765
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012766/* Override any GCC internal prototype to avoid an error.
12767 Use char because int might match the return type of a GCC
12768 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012769#ifdef __cplusplus
12770extern "C"
12771#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012772char rl_callback_handler_install ();
12773int
12774main ()
12775{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012776return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012777 ;
12778 return 0;
12779}
12780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012781if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012782 ac_cv_lib_readline_rl_callback_handler_install=yes
12783else
Matthias Kloseb9621712010-04-24 17:59:49 +000012784 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012786rm -f core conftest.err conftest.$ac_objext \
12787 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012788LIBS=$ac_check_lib_save_LIBS
12789fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12791$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012792if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012793
Matthias Kloseb9621712010-04-24 17:59:49 +000012794$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012795
12796fi
12797
12798
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012799# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012801/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012802#include <readline/readline.h>
12803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012804if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012805 have_readline=yes
12806else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012807 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012808
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012809fi
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070012810rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012811if test $have_readline = yes
12812then
Matthias Kloseb9621712010-04-24 17:59:49 +000012813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012814/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012815#include <readline/readline.h>
12816
12817_ACEOF
12818if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012819 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012820
Matthias Kloseb9621712010-04-24 17:59:49 +000012821$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012822
12823fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012824rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012825
Matthias Kloseb9621712010-04-24 17:59:49 +000012826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012827/* end confdefs.h. */
12828#include <readline/readline.h>
12829
12830_ACEOF
12831if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012832 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012833
Matthias Kloseb9621712010-04-24 17:59:49 +000012834$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012835
12836fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012837rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012838
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012839fi
12840
Martin v. Löwis0daad592001-09-30 21:09:59 +000012841# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12843$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012844if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012845 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012846else
Martin v. Löwis11437992002-04-12 09:54:03 +000012847 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012848LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012850/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012851
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012852/* Override any GCC internal prototype to avoid an error.
12853 Use char because int might match the return type of a GCC
12854 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012855#ifdef __cplusplus
12856extern "C"
12857#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012858char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012859int
12860main ()
12861{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012862return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012863 ;
12864 return 0;
12865}
12866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012867if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012868 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012869else
Matthias Kloseb9621712010-04-24 17:59:49 +000012870 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012871fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012872rm -f core conftest.err conftest.$ac_objext \
12873 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012874LIBS=$ac_check_lib_save_LIBS
12875fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12877$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012878if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012879
Matthias Kloseb9621712010-04-24 17:59:49 +000012880$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012881
Martin v. Löwis0daad592001-09-30 21:09:59 +000012882fi
12883
Michael W. Hudson54241132001-12-07 15:38:26 +000012884
Thomas Wouters89d996e2007-09-08 17:39:28 +000012885# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12887$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012888if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012889 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012890else
12891 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012892LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012894/* end confdefs.h. */
12895
12896/* Override any GCC internal prototype to avoid an error.
12897 Use char because int might match the return type of a GCC
12898 builtin and then its argument prototype would still apply. */
12899#ifdef __cplusplus
12900extern "C"
12901#endif
12902char rl_completion_display_matches_hook ();
12903int
12904main ()
12905{
12906return rl_completion_display_matches_hook ();
12907 ;
12908 return 0;
12909}
12910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012911if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012912 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12913else
Matthias Kloseb9621712010-04-24 17:59:49 +000012914 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012915fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012916rm -f core conftest.err conftest.$ac_objext \
12917 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012918LIBS=$ac_check_lib_save_LIBS
12919fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12921$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012922if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012923
Matthias Kloseb9621712010-04-24 17:59:49 +000012924$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012925
12926fi
12927
12928
Martin v. Löwis0daad592001-09-30 21:09:59 +000012929# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12931$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012932if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012933 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012934else
Martin v. Löwis11437992002-04-12 09:54:03 +000012935 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012936LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012939
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012940/* Override any GCC internal prototype to avoid an error.
12941 Use char because int might match the return type of a GCC
12942 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012943#ifdef __cplusplus
12944extern "C"
12945#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012946char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012947int
12948main ()
12949{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012950return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012951 ;
12952 return 0;
12953}
12954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012955if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012956 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012957else
Matthias Kloseb9621712010-04-24 17:59:49 +000012958 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012959fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012960rm -f core conftest.err conftest.$ac_objext \
12961 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012962LIBS=$ac_check_lib_save_LIBS
12963fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12965$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012966if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012967
Matthias Kloseb9621712010-04-24 17:59:49 +000012968$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012969
Guido van Rossum353ae582001-07-10 16:45:32 +000012970fi
12971
Jack Jansendd19cf82001-12-06 22:36:17 +000012972
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012973# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012975/* end confdefs.h. */
12976#include <readline/readline.h>
12977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012978if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012979 have_readline=yes
12980else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012981 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012982
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012983fi
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070012984rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012985if test $have_readline = yes
12986then
Matthias Kloseb9621712010-04-24 17:59:49 +000012987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012988/* end confdefs.h. */
12989#include <readline/readline.h>
12990
12991_ACEOF
12992if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012993 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012994
Matthias Kloseb9621712010-04-24 17:59:49 +000012995$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012996
12997fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012998rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012999
13000fi
13001
Martin v. Löwis82bca632006-02-10 20:49:30 +000013002# End of readline checks: restore LIBS
13003LIBS=$LIBS_no_readline
13004
Matthias Kloseb9621712010-04-24 17:59:49 +000013005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13006$as_echo_n "checking for broken nice()... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013007if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013008 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013009else
Martin v. Löwis11437992002-04-12 09:54:03 +000013010
Matthias Kloseb9621712010-04-24 17:59:49 +000013011if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013012 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013013else
Matthias Kloseb9621712010-04-24 17:59:49 +000013014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013015/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013016
13017int main()
13018{
13019 int val1 = nice(1);
13020 if (val1 != -1 && val1 == nice(2))
13021 exit(0);
13022 exit(1);
13023}
13024
Martin v. Löwis11437992002-04-12 09:54:03 +000013025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013026if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013027 ac_cv_broken_nice=yes
13028else
Matthias Kloseb9621712010-04-24 17:59:49 +000013029 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013030fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013031rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13032 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013033fi
13034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013035fi
13036
Matthias Kloseb9621712010-04-24 17:59:49 +000013037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13038$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013039if test "$ac_cv_broken_nice" = yes
13040then
Martin v. Löwis11437992002-04-12 09:54:03 +000013041
Matthias Kloseb9621712010-04-24 17:59:49 +000013042$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013043
13044fi
13045
Matthias Kloseb9621712010-04-24 17:59:49 +000013046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13047$as_echo_n "checking for broken poll()... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013048if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013049 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013050else
Matthias Kloseb9621712010-04-24 17:59:49 +000013051 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013052 ac_cv_broken_poll=no
13053else
Matthias Kloseb9621712010-04-24 17:59:49 +000013054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013055/* end confdefs.h. */
13056
13057#include <poll.h>
13058
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013059int main()
13060{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013061 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013062 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013063
13064 close (42);
13065
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013066 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013067 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013068 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013069 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013070 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013071 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013072 return 1;
13073}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013074
13075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013076if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013077 ac_cv_broken_poll=yes
13078else
Matthias Kloseb9621712010-04-24 17:59:49 +000013079 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13082 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013084
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013085fi
13086
Matthias Kloseb9621712010-04-24 17:59:49 +000013087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13088$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013089if test "$ac_cv_broken_poll" = yes
13090then
13091
Matthias Kloseb9621712010-04-24 17:59:49 +000013092$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013093
13094fi
13095
Brett Cannon43802422005-02-10 20:48:03 +000013096# 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 +000013097# (which is not required by ISO C or UNIX spec) and/or if we support
13098# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013099ac_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 +000013100#include <$ac_cv_struct_tm>
13101
Matthias Kloseb9621712010-04-24 17:59:49 +000013102"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013103if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013104
13105cat >>confdefs.h <<_ACEOF
13106#define HAVE_STRUCT_TM_TM_ZONE 1
13107_ACEOF
13108
13109
13110fi
13111
13112if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13113
Matthias Kloseb9621712010-04-24 17:59:49 +000013114$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013115
13116else
Matthias Kloseb9621712010-04-24 17:59:49 +000013117 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13118"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013119if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013120 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013121else
Matthias Kloseb9621712010-04-24 17:59:49 +000013122 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013123fi
13124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013125cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013126#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013127_ACEOF
13128
Matthias Kloseb9621712010-04-24 17:59:49 +000013129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13130$as_echo_n "checking for tzname... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013131if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013132 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013133else
Matthias Kloseb9621712010-04-24 17:59:49 +000013134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013135/* end confdefs.h. */
13136#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013137#if !HAVE_DECL_TZNAME
13138extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013139#endif
13140
13141int
13142main ()
13143{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013144return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013145 ;
13146 return 0;
13147}
13148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013149if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013150 ac_cv_var_tzname=yes
13151else
Matthias Kloseb9621712010-04-24 17:59:49 +000013152 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013154rm -f core conftest.err conftest.$ac_objext \
13155 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013156fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13158$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013159 if test $ac_cv_var_tzname = yes; then
13160
Matthias Kloseb9621712010-04-24 17:59:49 +000013161$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013162
13163 fi
13164fi
13165
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013166
Martin v. Löwis1d459062005-03-14 21:23:33 +000013167# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13169$as_echo_n "checking for working tzset()... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013170if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013171 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013172else
13173
Matthias Kloseb9621712010-04-24 17:59:49 +000013174if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013175 ac_cv_working_tzset=no
13176else
Matthias Kloseb9621712010-04-24 17:59:49 +000013177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013178/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013179
13180#include <stdlib.h>
13181#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013182#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013183
13184#if HAVE_TZNAME
13185extern char *tzname[];
13186#endif
13187
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013188int main()
13189{
Brett Cannon18367812003-09-19 00:59:16 +000013190 /* Note that we need to ensure that not only does tzset(3)
13191 do 'something' with localtime, but it works as documented
13192 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013193 This includes making sure that tzname is set properly if
13194 tm->tm_zone does not exist since it is the alternative way
13195 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013196
13197 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013198 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013199 */
13200
Martin v. Löwis1d459062005-03-14 21:23:33 +000013201 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013202 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13203
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013204 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013205 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013206 if (localtime(&groundhogday)->tm_hour != 0)
13207 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013208#if HAVE_TZNAME
13209 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13210 if (strcmp(tzname[0], "UTC") ||
13211 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13212 exit(1);
13213#endif
Brett Cannon18367812003-09-19 00:59:16 +000013214
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013215 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013216 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013217 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013218 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013219#if HAVE_TZNAME
13220 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13221 exit(1);
13222#endif
Brett Cannon18367812003-09-19 00:59:16 +000013223
13224 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13225 tzset();
13226 if (localtime(&groundhogday)->tm_hour != 11)
13227 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013228#if HAVE_TZNAME
13229 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13230 exit(1);
13231#endif
13232
13233#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013234 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13235 exit(1);
13236 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13237 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013238#endif
Brett Cannon18367812003-09-19 00:59:16 +000013239
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013240 exit(0);
13241}
13242
13243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013244if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013245 ac_cv_working_tzset=yes
13246else
Matthias Kloseb9621712010-04-24 17:59:49 +000013247 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013248fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013249rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13250 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013251fi
13252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013253fi
13254
Matthias Kloseb9621712010-04-24 17:59:49 +000013255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13256$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013257if test "$ac_cv_working_tzset" = yes
13258then
13259
Matthias Kloseb9621712010-04-24 17:59:49 +000013260$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013261
13262fi
13263
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013264# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13266$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013267if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013268 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013269else
Matthias Kloseb9621712010-04-24 17:59:49 +000013270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013271/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013272#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013273int
13274main ()
13275{
13276
13277struct stat st;
13278st.st_mtim.tv_nsec = 1;
13279
13280 ;
13281 return 0;
13282}
13283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013284if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013285 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013286else
Matthias Kloseb9621712010-04-24 17:59:49 +000013287 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13290fi
13291
Matthias Kloseb9621712010-04-24 17:59:49 +000013292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13293$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013294if test "$ac_cv_stat_tv_nsec" = yes
13295then
13296
Matthias Kloseb9621712010-04-24 17:59:49 +000013297$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013298
13299fi
13300
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013301# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13303$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013304if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013305 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013306else
Matthias Kloseb9621712010-04-24 17:59:49 +000013307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013308/* end confdefs.h. */
13309#include <sys/stat.h>
13310int
13311main ()
13312{
13313
13314struct stat st;
13315st.st_mtimespec.tv_nsec = 1;
13316
13317 ;
13318 return 0;
13319}
13320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013321if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013322 ac_cv_stat_tv_nsec2=yes
13323else
Matthias Kloseb9621712010-04-24 17:59:49 +000013324 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13327fi
13328
Matthias Kloseb9621712010-04-24 17:59:49 +000013329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13330$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013331if test "$ac_cv_stat_tv_nsec2" = yes
13332then
13333
Matthias Kloseb9621712010-04-24 17:59:49 +000013334$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013335
13336fi
13337
Jack Jansen666b1e72001-10-31 12:11:48 +000013338# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13340$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013341if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013342 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013343else
Matthias Kloseb9621712010-04-24 17:59:49 +000013344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013345/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013346#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013347int
13348main ()
13349{
Jack Jansen666b1e72001-10-31 12:11:48 +000013350
13351 int rtn;
13352 rtn = mvwdelch(0,0,0);
13353
Martin v. Löwis11437992002-04-12 09:54:03 +000013354 ;
13355 return 0;
13356}
13357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013358if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013359 ac_cv_mvwdelch_is_expression=yes
13360else
Matthias Kloseb9621712010-04-24 17:59:49 +000013361 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13364fi
13365
Matthias Kloseb9621712010-04-24 17:59:49 +000013366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13367$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013368
13369if test "$ac_cv_mvwdelch_is_expression" = yes
13370then
Martin v. Löwis11437992002-04-12 09:54:03 +000013371
Matthias Kloseb9621712010-04-24 17:59:49 +000013372$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013373
13374fi
13375
Matthias Kloseb9621712010-04-24 17:59:49 +000013376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13377$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013378if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013379 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013380else
Matthias Kloseb9621712010-04-24 17:59:49 +000013381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013382/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013383#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013384int
13385main ()
13386{
Jack Jansen666b1e72001-10-31 12:11:48 +000013387
13388 WINDOW *w;
13389 w->_flags = 0;
13390
Martin v. Löwis11437992002-04-12 09:54:03 +000013391 ;
13392 return 0;
13393}
13394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013395if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013396 ac_cv_window_has_flags=yes
13397else
Matthias Kloseb9621712010-04-24 17:59:49 +000013398 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13401fi
13402
Matthias Kloseb9621712010-04-24 17:59:49 +000013403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13404$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013405
Jack Jansen666b1e72001-10-31 12:11:48 +000013406
13407if test "$ac_cv_window_has_flags" = yes
13408then
Martin v. Löwis11437992002-04-12 09:54:03 +000013409
Matthias Kloseb9621712010-04-24 17:59:49 +000013410$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013411
13412fi
13413
Matthias Kloseb9621712010-04-24 17:59:49 +000013414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13415$as_echo_n "checking for is_term_resized... " >&6; }
13416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013417/* end confdefs.h. */
13418#include <curses.h>
13419int
13420main ()
13421{
13422void *x=is_term_resized
13423 ;
13424 return 0;
13425}
13426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013427if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013428
Matthias Kloseb9621712010-04-24 17:59:49 +000013429$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013430
Matthias Kloseb159a552010-04-25 21:00:44 +000013431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013432$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013433else
Matthias Kloseb9621712010-04-24 17:59:49 +000013434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13435$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013436
13437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13439
Matthias Kloseb9621712010-04-24 17:59:49 +000013440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13441$as_echo_n "checking for resize_term... " >&6; }
13442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013443/* end confdefs.h. */
13444#include <curses.h>
13445int
13446main ()
13447{
13448void *x=resize_term
13449 ;
13450 return 0;
13451}
13452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013453if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013454
Matthias Kloseb9621712010-04-24 17:59:49 +000013455$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013456
Matthias Kloseb159a552010-04-25 21:00:44 +000013457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013458$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013459else
Matthias Kloseb9621712010-04-24 17:59:49 +000013460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13461$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013462
13463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13465
Matthias Kloseb9621712010-04-24 17:59:49 +000013466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13467$as_echo_n "checking for resizeterm... " >&6; }
13468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013469/* end confdefs.h. */
13470#include <curses.h>
13471int
13472main ()
13473{
13474void *x=resizeterm
13475 ;
13476 return 0;
13477}
13478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013479if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013480
Matthias Kloseb9621712010-04-24 17:59:49 +000013481$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013482
Matthias Kloseb159a552010-04-25 21:00:44 +000013483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013484$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013485else
Matthias Kloseb9621712010-04-24 17:59:49 +000013486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13487$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013488
13489fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13491
Matthias Kloseb9621712010-04-24 17:59:49 +000013492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13493$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013494
13495if test -r /dev/ptmx
13496then
Matthias Kloseb9621712010-04-24 17:59:49 +000013497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13498$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013499
Matthias Kloseb9621712010-04-24 17:59:49 +000013500$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013501
Thomas Wouters89f507f2006-12-13 04:49:30 +000013502else
Matthias Kloseb9621712010-04-24 17:59:49 +000013503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13504$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013505fi
13506
Matthias Kloseb9621712010-04-24 17:59:49 +000013507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13508$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013509
13510if test -r /dev/ptc
13511then
Matthias Kloseb9621712010-04-24 17:59:49 +000013512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13513$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013514
Matthias Kloseb9621712010-04-24 17:59:49 +000013515$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013516
Thomas Wouters89f507f2006-12-13 04:49:30 +000013517else
Matthias Kloseb9621712010-04-24 17:59:49 +000013518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13519$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013520fi
13521
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013522if test "$have_long_long" = yes
13523then
Matthias Kloseb9621712010-04-24 17:59:49 +000013524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13525$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013526 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013527 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013528else
Matthias Kloseb9621712010-04-24 17:59:49 +000013529 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013530 ac_cv_have_long_long_format=no
13531else
Matthias Kloseb9621712010-04-24 17:59:49 +000013532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013533/* end confdefs.h. */
13534
13535 #include <stdio.h>
13536 #include <stddef.h>
13537 #include <string.h>
13538
13539 #ifdef HAVE_SYS_TYPES_H
13540 #include <sys/types.h>
13541 #endif
13542
13543 int main()
13544 {
13545 char buffer[256];
13546
13547 if (sprintf(buffer, "%lld", (long long)123) < 0)
13548 return 1;
13549 if (strcmp(buffer, "123"))
13550 return 1;
13551
13552 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13553 return 1;
13554 if (strcmp(buffer, "-123"))
13555 return 1;
13556
13557 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13558 return 1;
13559 if (strcmp(buffer, "123"))
13560 return 1;
13561
13562 return 0;
13563 }
13564
13565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013566if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013567 ac_cv_have_long_long_format=yes
13568else
Matthias Kloseb9621712010-04-24 17:59:49 +000013569 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013570fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013571rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13572 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013573fi
13574
13575
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013576fi
13577
Matthias Kloseb9621712010-04-24 17:59:49 +000013578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13579$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013580fi
13581
Mark Dickinson89d7d412009-12-31 20:50:59 +000013582if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013583then
13584
Matthias Kloseb9621712010-04-24 17:59:49 +000013585$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013586
13587fi
13588
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013589if test $ac_sys_system = Darwin
13590then
13591 LIBS="$LIBS -framework CoreFoundation"
13592fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013593
Matthias Kloseb9621712010-04-24 17:59:49 +000013594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13595$as_echo_n "checking for %zd printf() format support... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013596if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013597 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013598else
Matthias Kloseb9621712010-04-24 17:59:49 +000013599 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013600 ac_cv_have_size_t_format="cross -- assuming yes"
13601
Thomas Wouters477c8d52006-05-27 19:21:47 +000013602else
Matthias Kloseb9621712010-04-24 17:59:49 +000013603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013604/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013605
Thomas Wouters477c8d52006-05-27 19:21:47 +000013606#include <stdio.h>
13607#include <stddef.h>
13608#include <string.h>
13609
Christian Heimes2c181612007-12-17 20:04:13 +000013610#ifdef HAVE_SYS_TYPES_H
13611#include <sys/types.h>
13612#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013613
13614#ifdef HAVE_SSIZE_T
13615typedef ssize_t Py_ssize_t;
13616#elif SIZEOF_VOID_P == SIZEOF_LONG
13617typedef long Py_ssize_t;
13618#else
13619typedef int Py_ssize_t;
13620#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013621
Christian Heimes2c181612007-12-17 20:04:13 +000013622int main()
13623{
13624 char buffer[256];
13625
Thomas Wouters477c8d52006-05-27 19:21:47 +000013626 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13627 return 1;
13628
Thomas Wouters89f507f2006-12-13 04:49:30 +000013629 if (strcmp(buffer, "123"))
13630 return 1;
13631
13632 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13633 return 1;
13634
13635 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013636 return 1;
13637
13638 return 0;
13639}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013640
Thomas Wouters477c8d52006-05-27 19:21:47 +000013641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013642if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013643 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013644else
Matthias Kloseb9621712010-04-24 17:59:49 +000013645 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013646fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013647rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13648 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013649fi
13650
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013651fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13653$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013654if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013655
Matthias Kloseb9621712010-04-24 17:59:49 +000013656$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013657
13658fi
13659
Matthias Kloseb9621712010-04-24 17:59:49 +000013660ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013661#ifdef HAVE_SYS_TYPES_H
13662#include <sys/types.h>
13663#endif
13664#ifdef HAVE_SYS_SOCKET_H
13665#include <sys/socket.h>
13666#endif
13667
Matthias Kloseb9621712010-04-24 17:59:49 +000013668"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013669if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013670
Martin v. Löwis11437992002-04-12 09:54:03 +000013671else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013672
Matthias Kloseb9621712010-04-24 17:59:49 +000013673$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013674
13675fi
13676
Michael W. Hudson54241132001-12-07 15:38:26 +000013677
Matthias Kloseb9621712010-04-24 17:59:49 +000013678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13679$as_echo_n "checking for broken mbstowcs... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013680if test "${ac_cv_broken_mbstowcs+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013681 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013682else
Matthias Kloseb9621712010-04-24 17:59:49 +000013683 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013684 ac_cv_broken_mbstowcs=no
13685else
Matthias Kloseb9621712010-04-24 17:59:49 +000013686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013687/* end confdefs.h. */
13688
13689#include<stdlib.h>
13690int main() {
13691 size_t len = -1;
13692 const char *str = "text";
13693 len = mbstowcs(NULL, str, 0);
13694 return (len != 4);
13695}
13696
13697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013698if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013699 ac_cv_broken_mbstowcs=no
13700else
Matthias Kloseb9621712010-04-24 17:59:49 +000013701 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013702fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013703rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13704 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013705fi
13706
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013707fi
13708
Matthias Kloseb9621712010-04-24 17:59:49 +000013709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13710$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013711if test "$ac_cv_broken_mbstowcs" = yes
13712then
13713
Matthias Kloseb9621712010-04-24 17:59:49 +000013714$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013715
13716fi
13717
Antoine Pitrou042b1282010-08-13 21:15:58 +000013718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13719$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013720if test "${ac_cv_computed_gotos+set}" = set; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013721 $as_echo_n "(cached) " >&6
13722else
13723 if test "$cross_compiling" = yes; then :
13724 ac_cv_computed_gotos=no
13725else
13726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13727/* end confdefs.h. */
13728
13729int main(int argc, char **argv)
13730{
13731 static void *targets[1] = { &&LABEL1 };
13732 goto LABEL2;
13733LABEL1:
13734 return 0;
13735LABEL2:
13736 goto *targets[0];
13737 return 1;
13738}
13739
13740_ACEOF
13741if ac_fn_c_try_run "$LINENO"; then :
13742 ac_cv_computed_gotos=yes
13743else
13744 ac_cv_computed_gotos=no
13745fi
13746rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13747 conftest.$ac_objext conftest.beam conftest.$ac_ext
13748fi
13749
13750fi
13751
13752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13753$as_echo "$ac_cv_computed_gotos" >&6; }
13754if test "$ac_cv_computed_gotos" = yes
13755then
13756
13757$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13758
13759fi
13760
Antoine Pitroub52ec782009-01-25 16:34:23 +000013761# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13763$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013764
13765# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013766if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013767 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013768if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013769then
13770
Matthias Kloseb9621712010-04-24 17:59:49 +000013771$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013772
Matthias Kloseb9621712010-04-24 17:59:49 +000013773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13774$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013775fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013776if test "$withval" = no
13777then
13778
13779$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13780
Matthias Kloseb9621712010-04-24 17:59:49 +000013781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13782$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013783fi
13784
Antoine Pitrou042b1282010-08-13 21:15:58 +000013785else
13786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13787$as_echo "no value specified" >&6; }
13788fi
13789
Antoine Pitroub52ec782009-01-25 16:34:23 +000013790
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013791case $ac_sys_system in
13792AIX*)
13793
13794$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13795 ;;
13796esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013797
Michael W. Hudson54241132001-12-07 15:38:26 +000013798
Gregory P. Smith138fa432010-12-13 08:00:52 +000013799ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013800if test "x$ac_cv_func_pipe2" = x""yes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013801
13802$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13803
13804fi
Jesus Cea6a792292010-05-03 21:18:48 +000013805
13806
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013807
13808
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013809for h in `(cd $srcdir;echo Python/thread_*.h)`
13810do
13811 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13812done
13813
Michael W. Hudson54241132001-12-07 15:38:26 +000013814
Neal Norwitzd24499d2005-12-18 21:36:39 +000013815SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13817$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013818for dir in $SRCDIRS; do
13819 if test ! -d $dir; then
13820 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013821 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013822done
Matthias Kloseb9621712010-04-24 17:59:49 +000013823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13824$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013825
Guido van Rossum627b2d71993-12-24 10:39:16 +000013826# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013827ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013828
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013829ac_config_files="$ac_config_files Modules/ld_so_aix"
13830
Martin v. Löwis11437992002-04-12 09:54:03 +000013831cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013832# This file is a shell script that caches the results of configure
13833# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013834# scripts and configure runs, see configure's option --config-cache.
13835# It is not useful on other systems. If it contains results you don't
13836# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013837#
Martin v. Löwis11437992002-04-12 09:54:03 +000013838# config.status only pays attention to the cache file if you give it
13839# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013840#
Skip Montanaro6dead952003-09-25 14:50:04 +000013841# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013842# loading this file, other *unset* `ac_cv_foo' will be assigned the
13843# following values.
13844
13845_ACEOF
13846
Guido van Rossumf78abae1997-01-21 22:02:36 +000013847# The following way of writing the cache mishandles newlines in values,
13848# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013849# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013850# Ultrix sh set writes to stderr and can't be redirected directly,
13851# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013852(
13853 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13854 eval ac_val=\$$ac_var
13855 case $ac_val in #(
13856 *${as_nl}*)
13857 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013858 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13859$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013860 esac
13861 case $ac_var in #(
13862 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013863 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13864 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013865 esac ;;
13866 esac
13867 done
13868
Martin v. Löwis11437992002-04-12 09:54:03 +000013869 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013870 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13871 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013872 # `set' does not quote correctly, so add quotes: double-quote
13873 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013874 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013875 "s/'/'\\\\''/g;
13876 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013877 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013878 *)
13879 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013880 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013881 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013882 esac |
13883 sort
13884) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013885 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013886 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013887 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013888 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013889 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13890 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013891 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13892 :end' >>confcache
13893if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13894 if test -w "$cache_file"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013895 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013896 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13897$as_echo "$as_me: updating cache $cache_file" >&6;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013898 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013899 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013900 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13901$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013902 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013903fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013904rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013905
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013906test "x$prefix" = xNONE && prefix=$ac_default_prefix
13907# Let make expand exec_prefix.
13908test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013909
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013910DEFS=-DHAVE_CONFIG_H
13911
Skip Montanaro6dead952003-09-25 14:50:04 +000013912ac_libobjs=
13913ac_ltlibobjs=
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070013914U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013915for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13916 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013917 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013918 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013919 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13920 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013921 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13922 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013923done
13924LIBOBJS=$ac_libobjs
13925
13926LTLIBOBJS=$ac_ltlibobjs
13927
13928
Martin v. Löwis11437992002-04-12 09:54:03 +000013929
Matthias Kloseb9621712010-04-24 17:59:49 +000013930
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013931: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013932ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013933ac_clean_files_save=$ac_clean_files
13934ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013935{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13936$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13937as_write_fail=0
13938cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013939#! $SHELL
13940# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013941# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013942# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013943# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013944
Martin v. Löwis11437992002-04-12 09:54:03 +000013945debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013946ac_cs_recheck=false
13947ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013948
Matthias Kloseb9621712010-04-24 17:59:49 +000013949SHELL=\${CONFIG_SHELL-$SHELL}
13950export SHELL
13951_ASEOF
13952cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13953## -------------------- ##
13954## M4sh Initialization. ##
13955## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013956
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013957# Be more Bourne compatible
13958DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013959if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013960 emulate sh
13961 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013962 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013963 # is contrary to our usage. Disable this feature.
13964 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013965 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013966else
Matthias Kloseb9621712010-04-24 17:59:49 +000013967 case `(set -o) 2>/dev/null` in #(
13968 *posix*) :
13969 set -o posix ;; #(
13970 *) :
13971 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013972esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013973fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013974
13975
Matthias Kloseb9621712010-04-24 17:59:49 +000013976as_nl='
13977'
13978export as_nl
13979# Printing a long string crashes Solaris 7 /usr/bin/printf.
13980as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13981as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13982as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13983# Prefer a ksh shell builtin over an external printf program on Solaris,
13984# but without wasting forks for bash or zsh.
13985if test -z "$BASH_VERSION$ZSH_VERSION" \
13986 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13987 as_echo='print -r --'
13988 as_echo_n='print -rn --'
13989elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13990 as_echo='printf %s\n'
13991 as_echo_n='printf %s'
13992else
13993 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13994 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13995 as_echo_n='/usr/ucb/echo -n'
13996 else
13997 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13998 as_echo_n_body='eval
13999 arg=$1;
14000 case $arg in #(
14001 *"$as_nl"*)
14002 expr "X$arg" : "X\\(.*\\)$as_nl";
14003 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14004 esac;
14005 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14006 '
14007 export as_echo_n_body
14008 as_echo_n='sh -c $as_echo_n_body as_echo'
14009 fi
14010 export as_echo_body
14011 as_echo='sh -c $as_echo_body as_echo'
14012fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014013
14014# The user is always right.
14015if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014016 PATH_SEPARATOR=:
14017 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14018 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14019 PATH_SEPARATOR=';'
14020 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014021fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014023
14024# IFS
14025# We need space, tab and new line, in precisely that order. Quoting is
14026# there to prevent editors from complaining about space-tab.
14027# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14028# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014029IFS=" "" $as_nl"
14030
14031# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000014032case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014033 *[\\/]* ) as_myself=$0 ;;
14034 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014035for as_dir in $PATH
14036do
14037 IFS=$as_save_IFS
14038 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014039 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14040 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014041IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014043 ;;
14044esac
14045# We did not find ourselves, most probably we were run as `sh COMMAND'
14046# in which case we are not to be found in the path.
14047if test "x$as_myself" = x; then
14048 as_myself=$0
14049fi
14050if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014051 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14052 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014053fi
14054
Matthias Kloseb9621712010-04-24 17:59:49 +000014055# Unset variables that we do not need and which cause bugs (e.g. in
14056# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14057# suppresses any "Segmentation fault" message there. '((' could
14058# trigger a bug in pdksh 5.2.14.
14059for as_var in BASH_ENV ENV MAIL MAILPATH
14060do eval test x\${$as_var+set} = xset \
14061 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014062done
14063PS1='$ '
14064PS2='> '
14065PS4='+ '
14066
14067# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014068LC_ALL=C
14069export LC_ALL
14070LANGUAGE=C
14071export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014072
Matthias Kloseb9621712010-04-24 17:59:49 +000014073# CDPATH.
14074(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14075
14076
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014077# as_fn_error STATUS ERROR [LINENO LOG_FD]
14078# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014079# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14080# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014081# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014082as_fn_error ()
14083{
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014084 as_status=$1; test $as_status -eq 0 && as_status=1
14085 if test "$4"; then
14086 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14087 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014088 fi
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014089 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014090 as_fn_exit $as_status
14091} # as_fn_error
14092
14093
14094# as_fn_set_status STATUS
14095# -----------------------
14096# Set $? to STATUS, without forking.
14097as_fn_set_status ()
14098{
14099 return $1
14100} # as_fn_set_status
14101
14102# as_fn_exit STATUS
14103# -----------------
14104# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14105as_fn_exit ()
14106{
14107 set +e
14108 as_fn_set_status $1
14109 exit $1
14110} # as_fn_exit
14111
14112# as_fn_unset VAR
14113# ---------------
14114# Portably unset VAR.
14115as_fn_unset ()
14116{
14117 { eval $1=; unset $1;}
14118}
14119as_unset=as_fn_unset
14120# as_fn_append VAR VALUE
14121# ----------------------
14122# Append the text in VALUE to the end of the definition contained in VAR. Take
14123# advantage of any shell optimizations that allow amortized linear growth over
14124# repeated appends, instead of the typical quadratic growth present in naive
14125# implementations.
14126if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14127 eval 'as_fn_append ()
14128 {
14129 eval $1+=\$2
14130 }'
14131else
14132 as_fn_append ()
14133 {
14134 eval $1=\$$1\$2
14135 }
14136fi # as_fn_append
14137
14138# as_fn_arith ARG...
14139# ------------------
14140# Perform arithmetic evaluation on the ARGs, and store the result in the
14141# global $as_val. Take advantage of shells that can avoid forks. The arguments
14142# must be portable across $(()) and expr.
14143if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14144 eval 'as_fn_arith ()
14145 {
14146 as_val=$(( $* ))
14147 }'
14148else
14149 as_fn_arith ()
14150 {
14151 as_val=`expr "$@" || test $? -eq 1`
14152 }
14153fi # as_fn_arith
14154
14155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014156if expr a : '\(a\)' >/dev/null 2>&1 &&
14157 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14158 as_expr=expr
14159else
14160 as_expr=false
14161fi
14162
14163if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14164 as_basename=basename
14165else
14166 as_basename=false
14167fi
14168
Matthias Kloseb9621712010-04-24 17:59:49 +000014169if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14170 as_dirname=dirname
14171else
14172 as_dirname=false
14173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014175as_me=`$as_basename -- "$0" ||
14176$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14177 X"$0" : 'X\(//\)$' \| \
14178 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014179$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014180 sed '/^.*\/\([^/][^/]*\)\/*$/{
14181 s//\1/
14182 q
14183 }
14184 /^X\/\(\/\/\)$/{
14185 s//\1/
14186 q
14187 }
14188 /^X\/\(\/\).*/{
14189 s//\1/
14190 q
14191 }
14192 s/.*/./; q'`
14193
Matthias Kloseb9621712010-04-24 17:59:49 +000014194# Avoid depending upon Character Ranges.
14195as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14196as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14197as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14198as_cr_digits='0123456789'
14199as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014200
14201ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014202case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014203-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014204 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014205 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014206 xy) ECHO_C='\c';;
14207 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14208 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014209 esac;;
14210*)
14211 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014212esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014213
Martin v. Löwis11437992002-04-12 09:54:03 +000014214rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014215if test -d conf$$.dir; then
14216 rm -f conf$$.dir/conf$$.file
14217else
14218 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014219 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014220fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014221if (echo >conf$$.file) 2>/dev/null; then
14222 if ln -s conf$$.file conf$$ 2>/dev/null; then
14223 as_ln_s='ln -s'
14224 # ... but there are two gotchas:
14225 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14226 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14227 # In both cases, we have to default to `cp -p'.
14228 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14229 as_ln_s='cp -p'
14230 elif ln conf$$.file conf$$ 2>/dev/null; then
14231 as_ln_s=ln
14232 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014233 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014234 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014235else
14236 as_ln_s='cp -p'
14237fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014238rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14239rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014240
Matthias Kloseb9621712010-04-24 17:59:49 +000014241
14242# as_fn_mkdir_p
14243# -------------
14244# Create "$as_dir" as a directory, including parents if necessary.
14245as_fn_mkdir_p ()
14246{
14247
14248 case $as_dir in #(
14249 -*) as_dir=./$as_dir;;
14250 esac
14251 test -d "$as_dir" || eval $as_mkdir_p || {
14252 as_dirs=
14253 while :; do
14254 case $as_dir in #(
14255 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14256 *) as_qdir=$as_dir;;
14257 esac
14258 as_dirs="'$as_qdir' $as_dirs"
14259 as_dir=`$as_dirname -- "$as_dir" ||
14260$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14261 X"$as_dir" : 'X\(//\)[^/]' \| \
14262 X"$as_dir" : 'X\(//\)$' \| \
14263 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14264$as_echo X"$as_dir" |
14265 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14266 s//\1/
14267 q
14268 }
14269 /^X\(\/\/\)[^/].*/{
14270 s//\1/
14271 q
14272 }
14273 /^X\(\/\/\)$/{
14274 s//\1/
14275 q
14276 }
14277 /^X\(\/\).*/{
14278 s//\1/
14279 q
14280 }
14281 s/.*/./; q'`
14282 test -d "$as_dir" && break
14283 done
14284 test -z "$as_dirs" || eval "mkdir $as_dirs"
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014285 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014286
14287
14288} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014289if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014290 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014291else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014292 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014293 as_mkdir_p=false
14294fi
14295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014296if test -x / >/dev/null 2>&1; then
14297 as_test_x='test -x'
14298else
14299 if ls -dL / >/dev/null 2>&1; then
14300 as_ls_L_option=L
14301 else
14302 as_ls_L_option=
14303 fi
14304 as_test_x='
14305 eval sh -c '\''
14306 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014307 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014308 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014309 case $1 in #(
14310 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014311 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014312 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014313 ???[sx]*):;;*)false;;esac;fi
14314 '\'' sh
14315 '
14316fi
14317as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014318
14319# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014320as_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 +000014321
14322# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014323as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014324
14325
Martin v. Löwis11437992002-04-12 09:54:03 +000014326exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014327## ----------------------------------- ##
14328## Main body of $CONFIG_STATUS script. ##
14329## ----------------------------------- ##
14330_ASEOF
14331test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014332
Matthias Kloseb9621712010-04-24 17:59:49 +000014333cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14334# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014335# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014336# values after options handling.
14337ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014338This file was extended by python $as_me 3.3, which was
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014339generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014340
14341 CONFIG_FILES = $CONFIG_FILES
14342 CONFIG_HEADERS = $CONFIG_HEADERS
14343 CONFIG_LINKS = $CONFIG_LINKS
14344 CONFIG_COMMANDS = $CONFIG_COMMANDS
14345 $ $0 $@
14346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014347on `(hostname || uname -n) 2>/dev/null | sed 1q`
14348"
14349
Martin v. Löwis11437992002-04-12 09:54:03 +000014350_ACEOF
14351
Matthias Kloseb9621712010-04-24 17:59:49 +000014352case $ac_config_files in *"
14353"*) set x $ac_config_files; shift; ac_config_files=$*;;
14354esac
14355
14356case $ac_config_headers in *"
14357"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14358esac
14359
14360
14361cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014362# Files that config.status was made for.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014363config_files="$ac_config_files"
14364config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014365
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014366_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014367
Matthias Kloseb9621712010-04-24 17:59:49 +000014368cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014369ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014370\`$as_me' instantiates files and other configuration actions
14371from templates according to the current configuration. Unless the files
14372and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014373
Matthias Kloseb9621712010-04-24 17:59:49 +000014374Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014375
14376 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014377 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014378 --config print configuration, then exit
14379 -q, --quiet, --silent
14380 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014381 -d, --debug don't remove temporary files
14382 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014383 --file=FILE[:TEMPLATE]
14384 instantiate the configuration file FILE
14385 --header=FILE[:TEMPLATE]
14386 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014387
14388Configuration files:
14389$config_files
14390
14391Configuration headers:
14392$config_headers
14393
Matthias Kloseb9621712010-04-24 17:59:49 +000014394Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014395
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014397cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14398ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014399ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014400python config.status 3.3
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014401configured by $0, generated by GNU Autoconf 2.67,
Matthias Kloseb9621712010-04-24 17:59:49 +000014402 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014403
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014404Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014405This config.status script is free software; the Free Software Foundation
14406gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014407
14408ac_pwd='$ac_pwd'
14409srcdir='$srcdir'
14410INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014411test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014412_ACEOF
14413
Matthias Kloseb9621712010-04-24 17:59:49 +000014414cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14415# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014416ac_need_defaults=:
14417while test $# != 0
14418do
14419 case $1 in
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014420 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014421 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14422 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014423 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014424 ;;
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014425 --*=)
14426 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14427 ac_optarg=
14428 ac_shift=:
14429 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014430 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014431 ac_option=$1
14432 ac_optarg=$2
14433 ac_shift=shift
14434 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014435 esac
14436
Skip Montanaro6dead952003-09-25 14:50:04 +000014437 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014438 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014439 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14440 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014441 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014442 $as_echo "$ac_cs_version"; exit ;;
14443 --config | --confi | --conf | --con | --co | --c )
14444 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014445 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014446 debug=: ;;
14447 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014448 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014449 case $ac_optarg in
14450 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014451 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014452 esac
14453 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014454 ac_need_defaults=false;;
14455 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014456 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014457 case $ac_optarg in
14458 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14459 esac
14460 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014461 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014462 --he | --h)
14463 # Conflict between --help and --header
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014464 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014465Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014466 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014467 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014468 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14469 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14470 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014471
14472 # This is an error.
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014473 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014474Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014475
Matthias Kloseb9621712010-04-24 17:59:49 +000014476 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014477 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014478
14479 esac
14480 shift
14481done
14482
Skip Montanaro6dead952003-09-25 14:50:04 +000014483ac_configure_extra_args=
14484
14485if $ac_cs_silent; then
14486 exec 6>/dev/null
14487 ac_configure_extra_args="$ac_configure_extra_args --silent"
14488fi
14489
14490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014491cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014492if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014493 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14494 shift
14495 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14496 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014497 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014498 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014499fi
14500
Martin v. Löwis11437992002-04-12 09:54:03 +000014501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014502cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014503exec 5>>config.log
14504{
14505 echo
14506 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14507## Running $as_me. ##
14508_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014509 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014510} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014513cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014514_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014515
Matthias Kloseb9621712010-04-24 17:59:49 +000014516cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014517
14518# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014519for ac_config_target in $ac_config_targets
14520do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014521 case $ac_config_target in
14522 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14523 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14524 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014525 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14526 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014527 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14528 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014529 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014530 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014531
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014532 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014533 esac
14534done
14535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014536
Martin v. Löwis11437992002-04-12 09:54:03 +000014537# If the user did not use the arguments to specify the items to instantiate,
14538# then the envvar interface is used. Set only those that are not.
14539# We use the long form for the default assignment because of an extremely
14540# bizarre bug on SunOS 4.1.3.
14541if $ac_need_defaults; then
14542 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14543 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14544fi
14545
Skip Montanaro6dead952003-09-25 14:50:04 +000014546# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014547# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014548# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014549# Hook for its removal unless debugging.
14550# Note that there is a small window in which the directory will not be cleaned:
14551# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014552$debug ||
14553{
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014554 tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014555 trap 'exit_status=$?
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014556 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014557' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014558 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014559}
Martin v. Löwis11437992002-04-12 09:54:03 +000014560# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014561
Martin v. Löwis11437992002-04-12 09:54:03 +000014562{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014563 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014564 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014565} ||
14566{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014567 tmp=./conf$$-$RANDOM
14568 (umask 077 && mkdir "$tmp")
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014569} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014570
Matthias Kloseb9621712010-04-24 17:59:49 +000014571# Set up the scripts for CONFIG_FILES section.
14572# No need to generate them if there are no CONFIG_FILES.
14573# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014574if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014575
Matthias Kloseb9621712010-04-24 17:59:49 +000014576
14577ac_cr=`echo X | tr X '\015'`
14578# On cygwin, bash can eat \r inside `` if the user requested igncr.
14579# But we know of no other shell where ac_cr would be empty at this
14580# point, so we can use a bashism as a fallback.
14581if test "x$ac_cr" = x; then
14582 eval ac_cr=\$\'\\r\'
14583fi
14584ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14585if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014586 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014587else
14588 ac_cs_awk_cr=$ac_cr
14589fi
14590
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014591echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014592_ACEOF
14593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014594
Matthias Kloseb9621712010-04-24 17:59:49 +000014595{
14596 echo "cat >conf$$subs.awk <<_ACEOF" &&
14597 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14598 echo "_ACEOF"
14599} >conf$$subs.sh ||
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014600 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14601ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014602ac_delim='%!_!# '
14603for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014604 . ./conf$$subs.sh ||
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014605 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014606
Matthias Kloseb9621712010-04-24 17:59:49 +000014607 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14608 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014609 break
14610 elif $ac_last_try; then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014611 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014612 else
14613 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014614 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014615done
Matthias Kloseb9621712010-04-24 17:59:49 +000014616rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014617
Matthias Kloseb9621712010-04-24 17:59:49 +000014618cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014619cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014621sed -n '
14622h
14623s/^/S["/; s/!.*/"]=/
14624p
14625g
14626s/^[^!]*!//
14627:repl
14628t repl
14629s/'"$ac_delim"'$//
14630t delim
14631:nl
14632h
14633s/\(.\{148\}\)..*/\1/
14634t more1
14635s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14636p
14637n
14638b repl
14639:more1
14640s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14641p
14642g
14643s/.\{148\}//
14644t nl
14645:delim
14646h
14647s/\(.\{148\}\)..*/\1/
14648t more2
14649s/["\\]/\\&/g; s/^/"/; s/$/"/
14650p
14651b
14652:more2
14653s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14654p
14655g
14656s/.\{148\}//
14657t delim
14658' <conf$$subs.awk | sed '
14659/^[^""]/{
14660 N
14661 s/\n//
14662}
14663' >>$CONFIG_STATUS || ac_write_fail=1
14664rm -f conf$$subs.awk
14665cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14666_ACAWK
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014667cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014668 for (key in S) S_is_set[key] = 1
14669 FS = ""
14670
14671}
14672{
14673 line = $ 0
14674 nfields = split(line, field, "@")
14675 substed = 0
14676 len = length(field[1])
14677 for (i = 2; i < nfields; i++) {
14678 key = field[i]
14679 keylen = length(key)
14680 if (S_is_set[key]) {
14681 value = S[key]
14682 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14683 len += length(value) + length(field[++i])
14684 substed = 1
14685 } else
14686 len += 1 + keylen
14687 }
14688
14689 print line
14690}
14691
14692_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014694cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14695if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14696 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14697else
14698 cat
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014699fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014700 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014701_ACEOF
14702
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014703# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14704# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014705# trailing colons and then remove the whole line if VPATH becomes empty
14706# (actually we leave an empty line to preserve line numbers).
14707if test "x$srcdir" = x.; then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014708 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14709h
14710s///
14711s/^/:/
14712s/[ ]*$/:/
14713s/:\$(srcdir):/:/g
14714s/:\${srcdir}:/:/g
14715s/:@srcdir@:/:/g
14716s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014717s/:*$//
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014718x
14719s/\(=[ ]*\).*/\1/
14720G
14721s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014722s/^[^=]*=[ ]*$//
14723}'
14724fi
14725
Matthias Kloseb9621712010-04-24 17:59:49 +000014726cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014727fi # test -n "$CONFIG_FILES"
14728
Matthias Kloseb9621712010-04-24 17:59:49 +000014729# Set up the scripts for CONFIG_HEADERS section.
14730# No need to generate them if there are no CONFIG_HEADERS.
14731# This happens for instance with `./config.status Makefile'.
14732if test -n "$CONFIG_HEADERS"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014733cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014734BEGIN {
14735_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014736
Matthias Kloseb9621712010-04-24 17:59:49 +000014737# Transform confdefs.h into an awk script `defines.awk', embedded as
14738# here-document in config.status, that substitutes the proper values into
14739# config.h.in to produce config.h.
14740
14741# Create a delimiter string that does not exist in confdefs.h, to ease
14742# handling of long lines.
14743ac_delim='%!_!# '
14744for ac_last_try in false false :; do
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014745 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14746 if test -z "$ac_t"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014747 break
14748 elif $ac_last_try; then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014749 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014750 else
14751 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14752 fi
14753done
14754
14755# For the awk script, D is an array of macro values keyed by name,
14756# likewise P contains macro parameters if any. Preserve backslash
14757# newline sequences.
14758
14759ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14760sed -n '
14761s/.\{148\}/&'"$ac_delim"'/g
14762t rset
14763:rset
14764s/^[ ]*#[ ]*define[ ][ ]*/ /
14765t def
14766d
14767:def
14768s/\\$//
14769t bsnl
14770s/["\\]/\\&/g
14771s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14772D["\1"]=" \3"/p
14773s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14774d
14775:bsnl
14776s/["\\]/\\&/g
14777s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14778D["\1"]=" \3\\\\\\n"\\/p
14779t cont
14780s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14781t cont
14782d
14783:cont
14784n
14785s/.\{148\}/&'"$ac_delim"'/g
14786t clear
14787:clear
14788s/\\$//
14789t bsnlc
14790s/["\\]/\\&/g; s/^/"/; s/$/"/p
14791d
14792:bsnlc
14793s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14794b cont
14795' <confdefs.h | sed '
14796s/'"$ac_delim"'/"\\\
14797"/g' >>$CONFIG_STATUS || ac_write_fail=1
14798
14799cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14800 for (key in D) D_is_set[key] = 1
14801 FS = ""
14802}
14803/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14804 line = \$ 0
14805 split(line, arg, " ")
14806 if (arg[1] == "#") {
14807 defundef = arg[2]
14808 mac1 = arg[3]
14809 } else {
14810 defundef = substr(arg[1], 2)
14811 mac1 = arg[2]
14812 }
14813 split(mac1, mac2, "(") #)
14814 macro = mac2[1]
14815 prefix = substr(line, 1, index(line, defundef) - 1)
14816 if (D_is_set[macro]) {
14817 # Preserve the white space surrounding the "#".
14818 print prefix "define", macro P[macro] D[macro]
14819 next
14820 } else {
14821 # Replace #undef with comments. This is necessary, for example,
14822 # in the case of _POSIX_SOURCE, which is predefined and required
14823 # on some systems where configure will not decide to define it.
14824 if (defundef == "undef") {
14825 print "/*", prefix defundef, macro, "*/"
14826 next
14827 }
14828 }
14829}
14830{ print }
14831_ACAWK
14832_ACEOF
14833cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014834 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014835fi # test -n "$CONFIG_HEADERS"
14836
14837
14838eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14839shift
14840for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014841do
14842 case $ac_tag in
14843 :[FHLC]) ac_mode=$ac_tag; continue;;
14844 esac
14845 case $ac_mode$ac_tag in
14846 :[FHL]*:*);;
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014847 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014848 :[FH]-) ac_tag=-:-;;
14849 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14850 esac
14851 ac_save_IFS=$IFS
14852 IFS=:
14853 set x $ac_tag
14854 IFS=$ac_save_IFS
14855 shift
14856 ac_file=$1
14857 shift
14858
14859 case $ac_mode in
14860 :L) ac_source=$1;;
14861 :[FH])
14862 ac_file_inputs=
14863 for ac_f
14864 do
14865 case $ac_f in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014866 -) ac_f="$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014867 *) # Look for the file first in the build tree, then in the source tree
14868 # (if the path is not absolute). The absolute path cannot be DOS-style,
14869 # because $ac_f cannot contain `:'.
14870 test -f "$ac_f" ||
14871 case $ac_f in
14872 [\\/$]*) false;;
14873 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14874 esac ||
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014875 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014876 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014877 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14878 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014879 done
14880
14881 # Let's still pretend it is `configure' which instantiates (i.e., don't
14882 # use $as_me), people would be surprised to read:
14883 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014884 configure_input='Generated from '`
14885 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14886 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014887 if test x"$ac_file" != x-; then
14888 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014889 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14890$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014891 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014892 # Neutralize special characters interpreted by sed in replacement strings.
14893 case $configure_input in #(
14894 *\&* | *\|* | *\\* )
14895 ac_sed_conf_input=`$as_echo "$configure_input" |
14896 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14897 *) ac_sed_conf_input=$configure_input;;
14898 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014899
14900 case $ac_tag in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014901 *:-:* | *:-) cat >"$tmp/stdin" \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014902 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014903 esac
14904 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014905 esac
14906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014907 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014908$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014909 X"$ac_file" : 'X\(//\)[^/]' \| \
14910 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014911 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014912$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14914 s//\1/
14915 q
14916 }
14917 /^X\(\/\/\)[^/].*/{
14918 s//\1/
14919 q
14920 }
14921 /^X\(\/\/\)$/{
14922 s//\1/
14923 q
14924 }
14925 /^X\(\/\).*/{
14926 s//\1/
14927 q
14928 }
14929 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014930 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014931 ac_builddir=.
14932
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014933case "$ac_dir" in
14934.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14935*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014936 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014937 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014938 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014939 case $ac_top_builddir_sub in
14940 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14941 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14942 esac ;;
14943esac
14944ac_abs_top_builddir=$ac_pwd
14945ac_abs_builddir=$ac_pwd$ac_dir_suffix
14946# for backward compatibility:
14947ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014948
14949case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014950 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014951 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014952 ac_top_srcdir=$ac_top_builddir_sub
14953 ac_abs_top_srcdir=$ac_pwd ;;
14954 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014955 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014956 ac_top_srcdir=$srcdir
14957 ac_abs_top_srcdir=$srcdir ;;
14958 *) # Relative name.
14959 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14960 ac_top_srcdir=$ac_top_build_prefix$srcdir
14961 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014962esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014963ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014964
Martin v. Löwis11437992002-04-12 09:54:03 +000014965
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014966 case $ac_mode in
14967 :F)
14968 #
14969 # CONFIG_FILE
14970 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014971
14972 case $INSTALL in
14973 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014974 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014975 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014976_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014977
Matthias Kloseb9621712010-04-24 17:59:49 +000014978cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014979# If the template does not know about datarootdir, expand it.
14980# FIXME: This hack should be removed a few years after 2.60.
14981ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014982ac_sed_dataroot='
14983/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014984 p
14985 q
14986}
14987/@datadir@/p
14988/@docdir@/p
14989/@infodir@/p
14990/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014991/@mandir@/p'
14992case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014993*datarootdir*) ac_datarootdir_seen=yes;;
14994*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014995 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14996$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014998cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014999 ac_datarootdir_hack='
15000 s&@datadir@&$datadir&g
15001 s&@docdir@&$docdir&g
15002 s&@infodir@&$infodir&g
15003 s&@localedir@&$localedir&g
15004 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015005 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015006esac
15007_ACEOF
15008
15009# Neutralize VPATH when `$srcdir' = `.'.
15010# Shell code in configure.ac might set extrasub.
15011# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015012cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15013ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015014$extrasub
15015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015016cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015017:t
15018/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015019s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015020s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015021s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015022s&@srcdir@&$ac_srcdir&;t t
15023s&@abs_srcdir@&$ac_abs_srcdir&;t t
15024s&@top_srcdir@&$ac_top_srcdir&;t t
15025s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15026s&@builddir@&$ac_builddir&;t t
15027s&@abs_builddir@&$ac_abs_builddir&;t t
15028s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15029s&@INSTALL@&$ac_INSTALL&;t t
15030$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015031"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015032eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070015033 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015035test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015036 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15037 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015038 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070015039which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015040$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070015041which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015042
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015043 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015044 case $ac_file in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015045 -) cat "$tmp/out" && rm -f "$tmp/out";;
15046 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015047 esac \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070015048 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015049 ;;
15050 :H)
15051 #
15052 # CONFIG_HEADER
15053 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015054 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015055 {
15056 $as_echo "/* $configure_input */" \
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015057 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15058 } >"$tmp/config.h" \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070015059 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015060 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015061 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15062$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015063 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015064 rm -f "$ac_file"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015065 mv "$tmp/config.h" "$ac_file" \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070015066 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015067 fi
15068 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015069 $as_echo "/* $configure_input */" \
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015070 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070015071 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015072 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015073 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015074
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015075
15076 esac
15077
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015078
15079 case $ac_file$ac_mode in
15080 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15081
15082 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015083done # for ac_tag
15084
Guido van Rossum627b2d71993-12-24 10:39:16 +000015085
Matthias Kloseb9621712010-04-24 17:59:49 +000015086as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015087_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015088ac_clean_files=$ac_clean_files_save
15089
Matthias Kloseb9621712010-04-24 17:59:49 +000015090test $ac_write_fail = 0 ||
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070015091 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015092
Martin v. Löwis11437992002-04-12 09:54:03 +000015093
15094# configure is writing to config.log, and then calls config.status.
15095# config.status does its own redirection, appending to config.log.
15096# Unfortunately, on DOS this fails, as config.log is still kept open
15097# by configure, so config.status won't be able to write to it; its
15098# output is simply discarded. So we exec the FD to /dev/null,
15099# effectively closing config.log, so it can be properly (re)opened and
15100# appended to by config.status. When coming back to configure, we
15101# need to make the FD available again.
15102if test "$no_create" != yes; then
15103 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015104 ac_config_status_args=
15105 test "$silent" = yes &&
15106 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015107 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015108 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015109 exec 5>>config.log
15110 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15111 # would make configure fail if this is the last instruction.
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070015112 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015113fi
15114if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15115 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15116$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015117fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015118
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015119
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015120echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015121if test ! -f Modules/Setup
15122then
15123 cp $srcdir/Modules/Setup.dist Modules/Setup
15124fi
15125
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015126echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015127if test ! -f Modules/Setup.local
15128then
15129 echo "# Edit this file for local setup changes" >Modules/Setup.local
15130fi
15131
15132echo "creating Makefile"
15133$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15134 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015135 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015136mv config.c Modules