blob: 6b4e83b889ccdc43fec49d2340e61164dd2e00d9 [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.
Antoine Pitrou6f26be02011-05-03 18:18:59 +02004# Generated by GNU Autoconf 2.65 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,
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
11# 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
Antoine Pitrou6f26be02011-05-03 18:18:59 +0200224 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"
Antoine Pitrou6f26be02011-05-03 18:18:59 +0200323 } || 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
Antoine Pitrou6f26be02011-05-03 18:18:59 +0200363# as_fn_error 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
Antoine Pitrou6f26be02011-05-03 18:18:59 +0200367# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000368as_fn_error ()
369{
Antoine Pitrou6f26be02011-05-03 18:18:59 +0200370 as_status=$?; test $as_status -eq 0 && as_status=1
371 if test "$3"; then
372 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
373 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +0000374 fi
Antoine Pitrou6f26be02011-05-03 18:18:59 +0200375 $as_echo "$as_me: error: $1" >&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.
Antoine Pitrou6f26be02011-05-03 18:18:59 +0200537# hostname on some systems (SVR3.2, 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
662MAINCC
663CXX
664OBJEXT
665EXEEXT
666ac_ct_CC
667CPPFLAGS
668LDFLAGS
669CFLAGS
670CC
671EXPORT_MACOSX_DEPLOYMENT_TARGET
672CONFIGURE_MACOSX_DEPLOYMENT_TARGET
673SGI_ABI
674MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000675FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000676FRAMEWORKUNIXTOOLSPREFIX
677FRAMEWORKALTINSTALLLAST
678FRAMEWORKALTINSTALLFIRST
679FRAMEWORKINSTALLLAST
680FRAMEWORKINSTALLFIRST
681PYTHONFRAMEWORKINSTALLDIR
682PYTHONFRAMEWORKPREFIX
683PYTHONFRAMEWORKDIR
684PYTHONFRAMEWORKIDENTIFIER
685PYTHONFRAMEWORK
686LIPO_32BIT_FLAGS
687ARCH_RUN_32BIT
688UNIVERSALSDK
689CONFIG_ARGS
690SOVERSION
691VERSION
692target_alias
693host_alias
694build_alias
695LIBS
696ECHO_T
697ECHO_N
698ECHO_C
699DEFS
700mandir
701localedir
702libdir
703psdir
704pdfdir
705dvidir
706htmldir
707infodir
708docdir
709oldincludedir
710includedir
711localstatedir
712sharedstatedir
713sysconfdir
714datadir
715datarootdir
716libexecdir
717sbindir
718bindir
719program_transform_name
720prefix
721exec_prefix
722PACKAGE_URL
723PACKAGE_BUGREPORT
724PACKAGE_STRING
725PACKAGE_VERSION
726PACKAGE_TARNAME
727PACKAGE_NAME
728PATH_SEPARATOR
729SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000730ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000731ac_user_opts='
732enable_option_checking
733enable_universalsdk
734with_universal_archs
735with_framework_name
736enable_framework
737with_gcc
738with_cxx_main
739with_suffix
740enable_shared
741enable_profiling
742with_pydebug
743with_libs
744with_system_expat
745with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000746enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000747with_dbmliborder
748with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000749with_threads
750with_thread
751enable_ipv6
752with_doc_strings
753with_tsc
754with_pymalloc
755with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000756with_fpectl
757with_libm
758with_libc
759enable_big_digits
760with_wide_unicode
761with_computed_gotos
762'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000763 ac_precious_vars='build_alias
764host_alias
765target_alias
766CC
767CFLAGS
768LDFLAGS
769LIBS
770CPPFLAGS
Ross Lagerwall7807c352011-03-17 20:20:30 +0200771CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000772
Guido van Rossum627b2d71993-12-24 10:39:16 +0000773
Guido van Rossum7f43da71994-08-01 12:15:30 +0000774# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000775ac_init_help=
776ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000777ac_unrecognized_opts=
778ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000779# The variables have the same names as the options, with
780# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000781cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000782exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000783no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000784no_recursion=
785prefix=NONE
786program_prefix=NONE
787program_suffix=NONE
788program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000789silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000790site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000791srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000792verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000793x_includes=NONE
794x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000795
796# Installation directory options.
797# These are left unexpanded so users can "make install exec_prefix=/foo"
798# and all the variables that are supposed to be based on exec_prefix
799# by default will actually change.
800# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000801# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000802bindir='${exec_prefix}/bin'
803sbindir='${exec_prefix}/sbin'
804libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000805datarootdir='${prefix}/share'
806datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000807sysconfdir='${prefix}/etc'
808sharedstatedir='${prefix}/com'
809localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000810includedir='${prefix}/include'
811oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000812docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
813infodir='${datarootdir}/info'
814htmldir='${docdir}'
815dvidir='${docdir}'
816pdfdir='${docdir}'
817psdir='${docdir}'
818libdir='${exec_prefix}/lib'
819localedir='${datarootdir}/locale'
820mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000821
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000823ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000825do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826 # If the previous option needs an argument, assign it.
827 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000828 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829 ac_prev=
830 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000831 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833 case $ac_option in
Antoine Pitrou6f26be02011-05-03 18:18:59 +0200834 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
835 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000836 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000838 # Accept the important Cygnus configure options, so we can diagnose typos.
839
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840 case $ac_dashdash$ac_option in
841 --)
842 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000843
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844 -bindir | --bindir | --bindi | --bind | --bin | --bi)
845 ac_prev=bindir ;;
846 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000847 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000848
849 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000850 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000851 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000852 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854 -cache-file | --cache-file | --cache-fil | --cache-fi \
855 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
856 ac_prev=cache_file ;;
857 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
858 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000859 cache_file=$ac_optarg ;;
860
861 --config-cache | -C)
862 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000863
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000864 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000865 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000866 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000867 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000868
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000869 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
870 | --dataroo | --dataro | --datar)
871 ac_prev=datarootdir ;;
872 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
873 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
874 datarootdir=$ac_optarg ;;
875
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000877 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000879 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Antoine Pitrou6f26be02011-05-03 18:18:59 +0200880 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000881 ac_useropt_orig=$ac_useropt
882 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
883 case $ac_user_opts in
884 *"
885"enable_$ac_useropt"
886"*) ;;
887 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
888 ac_unrecognized_sep=', ';;
889 esac
890 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891
892 -docdir | --docdir | --docdi | --doc | --do)
893 ac_prev=docdir ;;
894 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
895 docdir=$ac_optarg ;;
896
897 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
898 ac_prev=dvidir ;;
899 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
900 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
902 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000903 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000904 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000905 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Antoine Pitrou6f26be02011-05-03 18:18:59 +0200906 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000907 ac_useropt_orig=$ac_useropt
908 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
909 case $ac_user_opts in
910 *"
911"enable_$ac_useropt"
912"*) ;;
913 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
914 ac_unrecognized_sep=', ';;
915 esac
916 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
919 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
920 | --exec | --exe | --ex)
921 ac_prev=exec_prefix ;;
922 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
923 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
924 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000925 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926
927 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000928 # Obsolete; use --with-gas.
929 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 -help | --help | --hel | --he | -h)
932 ac_init_help=long ;;
933 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
934 ac_init_help=recursive ;;
935 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
936 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937
938 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000943 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
944 ac_prev=htmldir ;;
945 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
946 | --ht=*)
947 htmldir=$ac_optarg ;;
948
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949 -includedir | --includedir | --includedi | --included | --include \
950 | --includ | --inclu | --incl | --inc)
951 ac_prev=includedir ;;
952 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
953 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955
956 -infodir | --infodir | --infodi | --infod | --info | --inf)
957 ac_prev=infodir ;;
958 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000959 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960
961 -libdir | --libdir | --libdi | --libd)
962 ac_prev=libdir ;;
963 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000964 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000965
966 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
967 | --libexe | --libex | --libe)
968 ac_prev=libexecdir ;;
969 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
970 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000973 -localedir | --localedir | --localedi | --localed | --locale)
974 ac_prev=localedir ;;
975 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
976 localedir=$ac_optarg ;;
977
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000978 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000979 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000980 ac_prev=localstatedir ;;
981 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000982 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000984
985 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
986 ac_prev=mandir ;;
987 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000989
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000991 # Obsolete; use --without-fp.
992 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
994 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996 no_create=yes ;;
997
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000998 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
999 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1000 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001002 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1003 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1004 | --oldin | --oldi | --old | --ol | --o)
1005 ac_prev=oldincludedir ;;
1006 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1007 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1008 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001010
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1012 ac_prev=prefix ;;
1013 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
1016 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1017 | --program-pre | --program-pr | --program-p)
1018 ac_prev=program_prefix ;;
1019 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1020 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
1023 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1024 | --program-suf | --program-su | --program-s)
1025 ac_prev=program_suffix ;;
1026 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1027 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029
1030 -program-transform-name | --program-transform-name \
1031 | --program-transform-nam | --program-transform-na \
1032 | --program-transform-n | --program-transform- \
1033 | --program-transform | --program-transfor \
1034 | --program-transfo | --program-transf \
1035 | --program-trans | --program-tran \
1036 | --progr-tra | --program-tr | --program-t)
1037 ac_prev=program_transform_name ;;
1038 -program-transform-name=* | --program-transform-name=* \
1039 | --program-transform-nam=* | --program-transform-na=* \
1040 | --program-transform-n=* | --program-transform-=* \
1041 | --program-transform=* | --program-transfor=* \
1042 | --program-transfo=* | --program-transf=* \
1043 | --program-trans=* | --program-tran=* \
1044 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001047 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1048 ac_prev=pdfdir ;;
1049 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1050 pdfdir=$ac_optarg ;;
1051
1052 -psdir | --psdir | --psdi | --psd | --ps)
1053 ac_prev=psdir ;;
1054 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1055 psdir=$ac_optarg ;;
1056
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1058 | -silent | --silent | --silen | --sile | --sil)
1059 silent=yes ;;
1060
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1062 ac_prev=sbindir ;;
1063 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1064 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066
1067 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1068 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1069 | --sharedst | --shareds | --shared | --share | --shar \
1070 | --sha | --sh)
1071 ac_prev=sharedstatedir ;;
1072 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1073 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1074 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1075 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001078 -site | --site | --sit)
1079 ac_prev=site ;;
1080 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1084 ac_prev=srcdir ;;
1085 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1089 | --syscon | --sysco | --sysc | --sys | --sy)
1090 ac_prev=sysconfdir ;;
1091 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1092 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001094
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 ac_prev=target_alias ;;
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 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
1100 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1101 verbose=yes ;;
1102
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 -version | --version | --versio | --versi | --vers | -V)
1104 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105
1106 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001107 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001108 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001109 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001110 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001111 ac_useropt_orig=$ac_useropt
1112 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1113 case $ac_user_opts in
1114 *"
1115"with_$ac_useropt"
1116"*) ;;
1117 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1118 ac_unrecognized_sep=', ';;
1119 esac
1120 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121
1122 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001123 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001124 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001125 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001126 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001127 ac_useropt_orig=$ac_useropt
1128 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1129 case $ac_user_opts in
1130 *"
1131"with_$ac_useropt"
1132"*) ;;
1133 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1134 ac_unrecognized_sep=', ';;
1135 esac
1136 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138 --x)
1139 # Obsolete; use --with-x.
1140 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001141
1142 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1143 | --x-incl | --x-inc | --x-in | --x-i)
1144 ac_prev=x_includes ;;
1145 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1146 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001147 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
1149 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1150 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1151 ac_prev=x_libraries ;;
1152 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1153 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001156 -*) as_fn_error "unrecognized option: \`$ac_option'
1157Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158 ;;
1159
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 *=*)
1161 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1162 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001163 case $ac_envvar in #(
1164 '' | [0-9]* | *[!_$as_cr_alnum]* )
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001165 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001166 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001167 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 export $ac_envvar ;;
1169
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001170 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001172 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001174 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001175 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176 ;;
1177
1178 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001179done
1180
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001183 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184fi
1185
Matthias Kloseb9621712010-04-24 17:59:49 +00001186if test -n "$ac_unrecognized_opts"; then
1187 case $enable_option_checking in
1188 no) ;;
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001189 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001190 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1191 esac
1192fi
1193
1194# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001195for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1196 datadir sysconfdir sharedstatedir localstatedir includedir \
1197 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1198 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001199do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001200 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 # Remove trailing slashes.
1202 case $ac_val in
1203 */ )
1204 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1205 eval $ac_var=\$ac_val;;
1206 esac
1207 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001208 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001209 [\\/$]* | ?:[\\/]* ) continue;;
1210 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211 esac
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001212 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001213done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214
Martin v. Löwis11437992002-04-12 09:54:03 +00001215# There might be people who depend on the old broken behavior: `$host'
1216# used to hold the argument of --host etc.
1217# FIXME: To remove some day.
1218build=$build_alias
1219host=$host_alias
1220target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001221
Martin v. Löwis11437992002-04-12 09:54:03 +00001222# FIXME: To remove some day.
1223if test "x$host_alias" != x; then
1224 if test "x$build_alias" = x; then
1225 cross_compiling=maybe
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001226 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1227 If a cross compiler is detected then cross compile mode will be used." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001228 elif test "x$build_alias" != "x$host_alias"; then
1229 cross_compiling=yes
1230 fi
1231fi
1232
1233ac_tool_prefix=
1234test -n "$host_alias" && ac_tool_prefix=$host_alias-
1235
1236test "$silent" = yes && exec 6>/dev/null
1237
Guido van Rossum627b2d71993-12-24 10:39:16 +00001238
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001239ac_pwd=`pwd` && test -n "$ac_pwd" &&
1240ac_ls_di=`ls -di .` &&
1241ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001242 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001243test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001244 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001245
1246
Guido van Rossum627b2d71993-12-24 10:39:16 +00001247# Find the source files, if location was not specified.
1248if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001250 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001251 ac_confdir=`$as_dirname -- "$as_myself" ||
1252$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1253 X"$as_myself" : 'X\(//\)[^/]' \| \
1254 X"$as_myself" : 'X\(//\)$' \| \
1255 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1256$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001257 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1258 s//\1/
1259 q
1260 }
1261 /^X\(\/\/\)[^/].*/{
1262 s//\1/
1263 q
1264 }
1265 /^X\(\/\/\)$/{
1266 s//\1/
1267 q
1268 }
1269 /^X\(\/\).*/{
1270 s//\1/
1271 q
1272 }
1273 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001275 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001276 srcdir=..
1277 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001278else
1279 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001281if test ! -r "$srcdir/$ac_unique_file"; then
1282 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001283 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1286ac_abs_confdir=`(
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001287 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288 pwd)`
1289# When building in place, set srcdir=.
1290if test "$ac_abs_confdir" = "$ac_pwd"; then
1291 srcdir=.
1292fi
1293# Remove unnecessary trailing slashes from srcdir.
1294# Double slashes in file names in object file debugging info
1295# mess up M-x gdb in Emacs.
1296case $srcdir in
1297*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1298esac
1299for ac_var in $ac_precious_vars; do
1300 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1301 eval ac_env_${ac_var}_value=\$${ac_var}
1302 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1303 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1304done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305
Martin v. Löwis11437992002-04-12 09:54:03 +00001306#
1307# Report the --help message.
1308#
1309if test "$ac_init_help" = "long"; then
1310 # Omit some internal or obsolete options to make the list less imposing.
1311 # This message is too long to be a string in the A/UX 3.1 sh.
1312 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001313\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001314
1315Usage: $0 [OPTION]... [VAR=VALUE]...
1316
1317To assign environment variables (e.g., CC, CFLAGS...), specify them as
1318VAR=VALUE. See below for descriptions of some of the useful variables.
1319
1320Defaults for the options are specified in brackets.
1321
1322Configuration:
1323 -h, --help display this help and exit
1324 --help=short display options specific to this package
1325 --help=recursive display the short help of all the included packages
1326 -V, --version display version information and exit
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001327 -q, --quiet, --silent do not print \`checking...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001328 --cache-file=FILE cache test results in FILE [disabled]
1329 -C, --config-cache alias for \`--cache-file=config.cache'
1330 -n, --no-create do not create output files
1331 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1332
Martin v. Löwis11437992002-04-12 09:54:03 +00001333Installation directories:
1334 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001335 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001336 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001337 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001338
1339By default, \`make install' will install all the files in
1340\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1341an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1342for instance \`--prefix=\$HOME'.
1343
1344For better control, use the options below.
1345
1346Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001347 --bindir=DIR user executables [EPREFIX/bin]
1348 --sbindir=DIR system admin executables [EPREFIX/sbin]
1349 --libexecdir=DIR program executables [EPREFIX/libexec]
1350 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1351 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1352 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1353 --libdir=DIR object code libraries [EPREFIX/lib]
1354 --includedir=DIR C header files [PREFIX/include]
1355 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1356 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1357 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1358 --infodir=DIR info documentation [DATAROOTDIR/info]
1359 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1360 --mandir=DIR man documentation [DATAROOTDIR/man]
1361 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1362 --htmldir=DIR html documentation [DOCDIR]
1363 --dvidir=DIR dvi documentation [DOCDIR]
1364 --pdfdir=DIR pdf documentation [DOCDIR]
1365 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001366_ACEOF
1367
1368 cat <<\_ACEOF
1369_ACEOF
1370fi
1371
1372if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001373 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001374 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001375 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001376 cat <<\_ACEOF
1377
1378Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001379 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001380 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1381 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001382 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001383 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001384 --enable-framework[=INSTALLDIR]
1385 Build (MacOSX|Darwin) framework
1386 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001387 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001388 --enable-loadable-sqlite-extensions
1389 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001390 --enable-ipv6 Enable ipv6 (with ipv4) support
1391 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001392 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001393 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001394
1395Optional Packages:
1396 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1397 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001398 --with-universal-archs=ARCH
1399 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001400 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001401 --with-framework-name=FRAMEWORK
1402 specify an alternate name of the framework built
1403 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001404 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001405 --with-cxx-main=<compiler>
1406 compile main() and link python executable with C++
1407 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001408 --with-suffix=.exe set executable suffix
1409 --with-pydebug build with Py_DEBUG defined
1410 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001411 --with-system-expat build pyexpat module using an installed expat
1412 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001413 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001414 --with-dbmliborder=db1:db2:...
1415 order to check db backends for dbm. Valid value is a
1416 colon separated string with the backend names
1417 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001418 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --with(out)-threads[=DIRECTORY]
1420 disable/enable thread support
1421 --with(out)-thread[=DIRECTORY]
1422 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001423 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001424 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001425 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001426 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001427 --with-fpectl enable SIGFPE catching
1428 --with-libm=STRING math library
1429 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001430 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001431 --with(out)-computed-gotos
1432 Use computed gotos in evaluation loop (enabled by
1433 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001434
1435Some influential environment variables:
1436 CC C compiler command
1437 CFLAGS C compiler flags
1438 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1439 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001440 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001441 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001442 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001443 CPP C preprocessor
1444
1445Use these variables to override the choices made by `configure' or to help
1446it to find libraries and programs with nonstandard names/locations.
1447
Georg Brandle2e15612009-05-20 18:25:10 +00001448Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001449_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001450ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001451fi
1452
1453if test "$ac_init_help" = "recursive"; then
1454 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001455 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001456 test -d "$ac_dir" ||
1457 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1458 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001459 ac_builddir=.
1460
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001461case "$ac_dir" in
1462.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1463*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001464 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001465 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001466 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001467 case $ac_top_builddir_sub in
1468 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1469 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1470 esac ;;
1471esac
1472ac_abs_top_builddir=$ac_pwd
1473ac_abs_builddir=$ac_pwd$ac_dir_suffix
1474# for backward compatibility:
1475ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001476
1477case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001478 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001480 ac_top_srcdir=$ac_top_builddir_sub
1481 ac_abs_top_srcdir=$ac_pwd ;;
1482 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001483 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001484 ac_top_srcdir=$srcdir
1485 ac_abs_top_srcdir=$srcdir ;;
1486 *) # Relative name.
1487 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1488 ac_top_srcdir=$ac_top_build_prefix$srcdir
1489 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001490esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001491ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001492
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001493 cd "$ac_dir" || { ac_status=$?; continue; }
1494 # Check for guested configure.
1495 if test -f "$ac_srcdir/configure.gnu"; then
1496 echo &&
1497 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1498 elif test -f "$ac_srcdir/configure"; then
1499 echo &&
1500 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001501 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001502 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001503 fi || ac_status=$?
1504 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001505 done
1506fi
1507
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001508test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001509if $ac_init_version; then
1510 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001511python configure 3.3
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001512generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001513
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001514Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001515This configure script is free software; the Free Software Foundation
1516gives unlimited permission to copy, distribute and modify it.
1517_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001518 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001519fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001520
1521## ------------------------ ##
1522## Autoconf initialization. ##
1523## ------------------------ ##
1524
1525# ac_fn_c_try_compile LINENO
1526# --------------------------
1527# Try to compile conftest.$ac_ext, and return whether this succeeded.
1528ac_fn_c_try_compile ()
1529{
1530 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1531 rm -f conftest.$ac_objext
1532 if { { ac_try="$ac_compile"
1533case "(($ac_try" in
1534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1535 *) ac_try_echo=$ac_try;;
1536esac
1537eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1538$as_echo "$ac_try_echo"; } >&5
1539 (eval "$ac_compile") 2>conftest.err
1540 ac_status=$?
1541 if test -s conftest.err; then
1542 grep -v '^ *+' conftest.err >conftest.er1
1543 cat conftest.er1 >&5
1544 mv -f conftest.er1 conftest.err
1545 fi
1546 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1547 test $ac_status = 0; } && {
1548 test -z "$ac_c_werror_flag" ||
1549 test ! -s conftest.err
1550 } && test -s conftest.$ac_objext; then :
1551 ac_retval=0
1552else
1553 $as_echo "$as_me: failed program was:" >&5
1554sed 's/^/| /' conftest.$ac_ext >&5
1555
1556 ac_retval=1
1557fi
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001558 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001559 as_fn_set_status $ac_retval
1560
1561} # ac_fn_c_try_compile
1562
1563# ac_fn_c_try_cpp LINENO
1564# ----------------------
1565# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1566ac_fn_c_try_cpp ()
1567{
1568 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1569 if { { ac_try="$ac_cpp conftest.$ac_ext"
1570case "(($ac_try" in
1571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1572 *) ac_try_echo=$ac_try;;
1573esac
1574eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1575$as_echo "$ac_try_echo"; } >&5
1576 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1577 ac_status=$?
1578 if test -s conftest.err; then
1579 grep -v '^ *+' conftest.err >conftest.er1
1580 cat conftest.er1 >&5
1581 mv -f conftest.er1 conftest.err
1582 fi
1583 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001584 test $ac_status = 0; } >/dev/null && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001585 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1586 test ! -s conftest.err
1587 }; then :
1588 ac_retval=0
1589else
1590 $as_echo "$as_me: failed program was:" >&5
1591sed 's/^/| /' conftest.$ac_ext >&5
1592
1593 ac_retval=1
1594fi
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001595 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001596 as_fn_set_status $ac_retval
1597
1598} # ac_fn_c_try_cpp
1599
1600# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1601# -------------------------------------------------------
1602# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1603# the include files in INCLUDES and setting the cache variable VAR
1604# accordingly.
1605ac_fn_c_check_header_mongrel ()
1606{
1607 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001608 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1610$as_echo_n "checking for $2... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001611if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001612 $as_echo_n "(cached) " >&6
1613fi
1614eval ac_res=\$$3
1615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1616$as_echo "$ac_res" >&6; }
1617else
1618 # Is the header compilable?
1619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1620$as_echo_n "checking $2 usability... " >&6; }
1621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1622/* end confdefs.h. */
1623$4
1624#include <$2>
1625_ACEOF
1626if ac_fn_c_try_compile "$LINENO"; then :
1627 ac_header_compiler=yes
1628else
1629 ac_header_compiler=no
1630fi
1631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1633$as_echo "$ac_header_compiler" >&6; }
1634
1635# Is the header present?
1636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1637$as_echo_n "checking $2 presence... " >&6; }
1638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1639/* end confdefs.h. */
1640#include <$2>
1641_ACEOF
1642if ac_fn_c_try_cpp "$LINENO"; then :
1643 ac_header_preproc=yes
1644else
1645 ac_header_preproc=no
1646fi
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001647rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1649$as_echo "$ac_header_preproc" >&6; }
1650
1651# So? What about this header?
1652case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1653 yes:no: )
1654 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1655$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1656 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1657$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1658 ;;
1659 no:yes:* )
1660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1661$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1663$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1665$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1667$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1668 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1669$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001670( cat <<\_ASBOX
1671## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001672## Report this to http://bugs.python.org/ ##
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001673## -------------------------------------- ##
1674_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +00001675 ) | sed "s/^/$as_me: WARNING: /" >&2
1676 ;;
1677esac
1678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1679$as_echo_n "checking for $2... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001680if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001681 $as_echo_n "(cached) " >&6
1682else
1683 eval "$3=\$ac_header_compiler"
1684fi
1685eval ac_res=\$$3
1686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1687$as_echo "$ac_res" >&6; }
1688fi
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001689 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001690
1691} # ac_fn_c_check_header_mongrel
1692
1693# ac_fn_c_try_run LINENO
1694# ----------------------
1695# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1696# that executables *can* be run.
1697ac_fn_c_try_run ()
1698{
1699 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1700 if { { ac_try="$ac_link"
1701case "(($ac_try" in
1702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1703 *) ac_try_echo=$ac_try;;
1704esac
1705eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1706$as_echo "$ac_try_echo"; } >&5
1707 (eval "$ac_link") 2>&5
1708 ac_status=$?
1709 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1710 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1711 { { case "(($ac_try" in
1712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1713 *) ac_try_echo=$ac_try;;
1714esac
1715eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1716$as_echo "$ac_try_echo"; } >&5
1717 (eval "$ac_try") 2>&5
1718 ac_status=$?
1719 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1720 test $ac_status = 0; }; }; then :
1721 ac_retval=0
1722else
1723 $as_echo "$as_me: program exited with status $ac_status" >&5
1724 $as_echo "$as_me: failed program was:" >&5
1725sed 's/^/| /' conftest.$ac_ext >&5
1726
1727 ac_retval=$ac_status
1728fi
1729 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001730 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001731 as_fn_set_status $ac_retval
1732
1733} # ac_fn_c_try_run
1734
1735# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1736# -------------------------------------------------------
1737# Tests whether HEADER exists and can be compiled using the include files in
1738# INCLUDES, setting the cache variable VAR accordingly.
1739ac_fn_c_check_header_compile ()
1740{
1741 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1743$as_echo_n "checking for $2... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001744if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001745 $as_echo_n "(cached) " >&6
1746else
1747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1748/* end confdefs.h. */
1749$4
1750#include <$2>
1751_ACEOF
1752if ac_fn_c_try_compile "$LINENO"; then :
1753 eval "$3=yes"
1754else
1755 eval "$3=no"
1756fi
1757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1758fi
1759eval ac_res=\$$3
1760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1761$as_echo "$ac_res" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001762 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001763
1764} # ac_fn_c_check_header_compile
1765
1766# ac_fn_c_try_link LINENO
1767# -----------------------
1768# Try to link conftest.$ac_ext, and return whether this succeeded.
1769ac_fn_c_try_link ()
1770{
1771 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1772 rm -f conftest.$ac_objext conftest$ac_exeext
1773 if { { ac_try="$ac_link"
1774case "(($ac_try" in
1775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1776 *) ac_try_echo=$ac_try;;
1777esac
1778eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1779$as_echo "$ac_try_echo"; } >&5
1780 (eval "$ac_link") 2>conftest.err
1781 ac_status=$?
1782 if test -s conftest.err; then
1783 grep -v '^ *+' conftest.err >conftest.er1
1784 cat conftest.er1 >&5
1785 mv -f conftest.er1 conftest.err
1786 fi
1787 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1788 test $ac_status = 0; } && {
1789 test -z "$ac_c_werror_flag" ||
1790 test ! -s conftest.err
1791 } && test -s conftest$ac_exeext && {
1792 test "$cross_compiling" = yes ||
1793 $as_test_x conftest$ac_exeext
1794 }; then :
1795 ac_retval=0
1796else
1797 $as_echo "$as_me: failed program was:" >&5
1798sed 's/^/| /' conftest.$ac_ext >&5
1799
1800 ac_retval=1
1801fi
1802 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1803 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1804 # interfere with the next link command; also delete a directory that is
1805 # left behind by Apple's compiler. We do this before executing the actions.
1806 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001807 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001808 as_fn_set_status $ac_retval
1809
1810} # ac_fn_c_try_link
1811
1812# 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; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001821if { as_var=$3; eval "test \"\${$as_var+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; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001862 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; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001875if { as_var=$3; eval "test \"\${$as_var+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
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001905 eval as_val=\$$3
1906 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001907
1908else
1909 break
1910fi
1911 done
1912fi
1913eval ac_res=\$$3
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1915$as_echo "$ac_res" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001916 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001917
1918} # ac_fn_c_find_uintX_t
1919
1920# ac_fn_c_find_intX_t LINENO BITS VAR
1921# -----------------------------------
1922# Finds a signed integer type with width BITS, setting cache variable VAR
1923# accordingly.
1924ac_fn_c_find_intX_t ()
1925{
1926 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1928$as_echo_n "checking for int$2_t... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001929if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001930 $as_echo_n "(cached) " >&6
1931else
1932 eval "$3=no"
1933 # Order is important - never check a type that is potentially smaller
1934 # than half of the expected target width.
1935 for ac_type in int$2_t 'int' 'long int' \
1936 'long long int' 'short int' 'signed char'; do
1937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1938/* end confdefs.h. */
1939$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001940int
1941main ()
1942{
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001943static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1944 0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001945test_array [0] = 0
1946
1947 ;
1948 return 0;
1949}
1950_ACEOF
1951if ac_fn_c_try_compile "$LINENO"; then :
1952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953/* end confdefs.h. */
1954$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001955int
1956main ()
1957{
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001958static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1959 ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001960 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1961test_array [0] = 0
1962
1963 ;
1964 return 0;
1965}
1966_ACEOF
1967if ac_fn_c_try_compile "$LINENO"; then :
1968
1969else
1970 case $ac_type in #(
1971 int$2_t) :
1972 eval "$3=yes" ;; #(
1973 *) :
1974 eval "$3=\$ac_type" ;;
1975esac
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1978fi
1979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001980 eval as_val=\$$3
1981 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001982
1983else
1984 break
1985fi
1986 done
1987fi
1988eval ac_res=\$$3
1989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1990$as_echo "$ac_res" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02001991 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001992
1993} # ac_fn_c_find_intX_t
1994
1995# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1996# --------------------------------------------
1997# Tries to find the compile-time value of EXPR in a program that includes
1998# INCLUDES, setting VAR accordingly. Returns whether the value could be
1999# computed
2000ac_fn_c_compute_int ()
2001{
2002 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2003 if test "$cross_compiling" = yes; then
2004 # Depending upon the size, compute the lo and hi bounds.
2005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2006/* end confdefs.h. */
2007$4
2008int
2009main ()
2010{
2011static int test_array [1 - 2 * !(($2) >= 0)];
2012test_array [0] = 0
2013
2014 ;
2015 return 0;
2016}
2017_ACEOF
2018if ac_fn_c_try_compile "$LINENO"; then :
2019 ac_lo=0 ac_mid=0
2020 while :; do
2021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2022/* end confdefs.h. */
2023$4
2024int
2025main ()
2026{
2027static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2028test_array [0] = 0
2029
2030 ;
2031 return 0;
2032}
2033_ACEOF
2034if ac_fn_c_try_compile "$LINENO"; then :
2035 ac_hi=$ac_mid; break
2036else
2037 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2038 if test $ac_lo -le $ac_mid; then
2039 ac_lo= ac_hi=
2040 break
2041 fi
2042 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2043fi
2044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2045 done
2046else
2047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2048/* end confdefs.h. */
2049$4
2050int
2051main ()
2052{
2053static int test_array [1 - 2 * !(($2) < 0)];
2054test_array [0] = 0
2055
2056 ;
2057 return 0;
2058}
2059_ACEOF
2060if ac_fn_c_try_compile "$LINENO"; then :
2061 ac_hi=-1 ac_mid=-1
2062 while :; do
2063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2064/* end confdefs.h. */
2065$4
2066int
2067main ()
2068{
2069static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2070test_array [0] = 0
2071
2072 ;
2073 return 0;
2074}
2075_ACEOF
2076if ac_fn_c_try_compile "$LINENO"; then :
2077 ac_lo=$ac_mid; break
2078else
2079 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2080 if test $ac_mid -le $ac_hi; then
2081 ac_lo= ac_hi=
2082 break
2083 fi
2084 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087 done
2088else
2089 ac_lo= ac_hi=
2090fi
2091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2092fi
2093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2094# Binary search between lo and hi bounds.
2095while test "x$ac_lo" != "x$ac_hi"; do
2096 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2098/* end confdefs.h. */
2099$4
2100int
2101main ()
2102{
2103static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2104test_array [0] = 0
2105
2106 ;
2107 return 0;
2108}
2109_ACEOF
2110if ac_fn_c_try_compile "$LINENO"; then :
2111 ac_hi=$ac_mid
2112else
2113 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2114fi
2115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2116done
2117case $ac_lo in #((
2118?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2119'') ac_retval=1 ;;
2120esac
2121 else
2122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123/* end confdefs.h. */
2124$4
2125static long int longval () { return $2; }
2126static unsigned long int ulongval () { return $2; }
2127#include <stdio.h>
2128#include <stdlib.h>
2129int
2130main ()
2131{
2132
2133 FILE *f = fopen ("conftest.val", "w");
2134 if (! f)
2135 return 1;
2136 if (($2) < 0)
2137 {
2138 long int i = longval ();
2139 if (i != ($2))
2140 return 1;
2141 fprintf (f, "%ld", i);
2142 }
2143 else
2144 {
2145 unsigned long int i = ulongval ();
2146 if (i != ($2))
2147 return 1;
2148 fprintf (f, "%lu", i);
2149 }
2150 /* Do not output a trailing newline, as this causes \r\n confusion
2151 on some platforms. */
2152 return ferror (f) || fclose (f) != 0;
2153
2154 ;
2155 return 0;
2156}
2157_ACEOF
2158if ac_fn_c_try_run "$LINENO"; then :
2159 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2160else
2161 ac_retval=1
2162fi
2163rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2164 conftest.$ac_objext conftest.beam conftest.$ac_ext
2165rm -f conftest.val
2166
2167 fi
Antoine Pitrou6f26be02011-05-03 18:18:59 +02002168 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002169 as_fn_set_status $ac_retval
2170
2171} # ac_fn_c_compute_int
2172
2173# ac_fn_c_check_func LINENO FUNC VAR
2174# ----------------------------------
2175# Tests whether FUNC exists, setting the cache variable VAR accordingly
2176ac_fn_c_check_func ()
2177{
2178 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2180$as_echo_n "checking for $2... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02002181if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002182 $as_echo_n "(cached) " >&6
2183else
2184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2185/* end confdefs.h. */
2186/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2187 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2188#define $2 innocuous_$2
2189
2190/* System header to define __stub macros and hopefully few prototypes,
2191 which can conflict with char $2 (); below.
2192 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2193 <limits.h> exists even on freestanding compilers. */
2194
2195#ifdef __STDC__
2196# include <limits.h>
2197#else
2198# include <assert.h>
2199#endif
2200
2201#undef $2
2202
2203/* Override any GCC internal prototype to avoid an error.
2204 Use char because int might match the return type of a GCC
2205 builtin and then its argument prototype would still apply. */
2206#ifdef __cplusplus
2207extern "C"
2208#endif
2209char $2 ();
2210/* The GNU C library defines this for functions which it implements
2211 to always fail with ENOSYS. Some functions are actually named
2212 something starting with __ and the normal name is an alias. */
2213#if defined __stub_$2 || defined __stub___$2
2214choke me
2215#endif
2216
2217int
2218main ()
2219{
2220return $2 ();
2221 ;
2222 return 0;
2223}
2224_ACEOF
2225if ac_fn_c_try_link "$LINENO"; then :
2226 eval "$3=yes"
2227else
2228 eval "$3=no"
2229fi
2230rm -f core conftest.err conftest.$ac_objext \
2231 conftest$ac_exeext conftest.$ac_ext
2232fi
2233eval ac_res=\$$3
2234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2235$as_echo "$ac_res" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02002236 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002237
2238} # ac_fn_c_check_func
2239
2240# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2241# ----------------------------------------------------
2242# Tries to find if the field MEMBER exists in type AGGR, after including
2243# INCLUDES, setting cache variable VAR accordingly.
2244ac_fn_c_check_member ()
2245{
2246 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2248$as_echo_n "checking for $2.$3... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02002249if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002250 $as_echo_n "(cached) " >&6
2251else
2252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253/* end confdefs.h. */
2254$5
2255int
2256main ()
2257{
2258static $2 ac_aggr;
2259if (ac_aggr.$3)
2260return 0;
2261 ;
2262 return 0;
2263}
2264_ACEOF
2265if ac_fn_c_try_compile "$LINENO"; then :
2266 eval "$4=yes"
2267else
2268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2269/* end confdefs.h. */
2270$5
2271int
2272main ()
2273{
2274static $2 ac_aggr;
2275if (sizeof ac_aggr.$3)
2276return 0;
2277 ;
2278 return 0;
2279}
2280_ACEOF
2281if ac_fn_c_try_compile "$LINENO"; then :
2282 eval "$4=yes"
2283else
2284 eval "$4=no"
2285fi
2286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2287fi
2288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2289fi
2290eval ac_res=\$$4
2291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2292$as_echo "$ac_res" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02002293 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002294
2295} # ac_fn_c_check_member
2296
Antoine Pitrou6f26be02011-05-03 18:18:59 +02002297# ac_fn_c_check_decl LINENO SYMBOL VAR
2298# ------------------------------------
2299# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002300ac_fn_c_check_decl ()
2301{
2302 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Antoine Pitrou6f26be02011-05-03 18:18:59 +02002303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2304$as_echo_n "checking whether $2 is declared... " >&6; }
2305if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002306 $as_echo_n "(cached) " >&6
2307else
2308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2309/* end confdefs.h. */
2310$4
2311int
2312main ()
2313{
Antoine Pitrou6f26be02011-05-03 18:18:59 +02002314#ifndef $2
2315 (void) $2;
Matthias Kloseb9621712010-04-24 17:59:49 +00002316#endif
2317
2318 ;
2319 return 0;
2320}
2321_ACEOF
2322if ac_fn_c_try_compile "$LINENO"; then :
2323 eval "$3=yes"
2324else
2325 eval "$3=no"
2326fi
2327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2328fi
2329eval ac_res=\$$3
2330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2331$as_echo "$ac_res" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02002332 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002333
2334} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002335cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002336This file contains any messages produced by compilers while
2337running configure, to aid debugging if configure makes a mistake.
2338
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002339It was created by python $as_me 3.3, which was
Antoine Pitrou6f26be02011-05-03 18:18:59 +02002340generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002341
2342 $ $0 $@
2343
2344_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002345exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002346{
2347cat <<_ASUNAME
2348## --------- ##
2349## Platform. ##
2350## --------- ##
2351
2352hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2353uname -m = `(uname -m) 2>/dev/null || echo unknown`
2354uname -r = `(uname -r) 2>/dev/null || echo unknown`
2355uname -s = `(uname -s) 2>/dev/null || echo unknown`
2356uname -v = `(uname -v) 2>/dev/null || echo unknown`
2357
2358/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2359/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2360
2361/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2362/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2363/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002364/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002365/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2366/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2367/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2368
2369_ASUNAME
2370
2371as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2372for as_dir in $PATH
2373do
2374 IFS=$as_save_IFS
2375 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002376 $as_echo "PATH: $as_dir"
2377 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002378IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002379
2380} >&5
2381
2382cat >&5 <<_ACEOF
2383
2384
2385## ----------- ##
2386## Core tests. ##
2387## ----------- ##
2388
2389_ACEOF
2390
2391
2392# Keep a trace of the command line.
2393# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002394# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002395# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002396# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002397ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002398ac_configure_args0=
2399ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002400ac_must_keep_next=false
2401for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002402do
Skip Montanaro6dead952003-09-25 14:50:04 +00002403 for ac_arg
2404 do
2405 case $ac_arg in
2406 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2407 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2408 | -silent | --silent | --silen | --sile | --sil)
2409 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002410 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002411 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 esac
2413 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002414 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002415 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002416 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002418 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002420 case $ac_arg in
2421 *=* | --config-cache | -C | -disable-* | --disable-* \
2422 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2423 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2424 | -with-* | --with-* | -without-* | --without-* | --x)
2425 case "$ac_configure_args0 " in
2426 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2427 esac
2428 ;;
2429 -* ) ac_must_keep_next=true ;;
2430 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002432 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 ;;
2434 esac
2435 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002436done
Matthias Kloseb9621712010-04-24 17:59:49 +00002437{ ac_configure_args0=; unset ac_configure_args0;}
2438{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002439
2440# When interrupted or exit'd, cleanup temporary files, and complete
2441# config.log. We remove comments because anyway the quotes in there
2442# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002443# WARNING: Use '\'' to represent an apostrophe within the trap.
2444# 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 +00002445trap 'exit_status=$?
2446 # Save into config.log some information that might help in debugging.
2447 {
2448 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002449
Antoine Pitrou6f26be02011-05-03 18:18:59 +02002450 cat <<\_ASBOX
2451## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002452## Cache variables. ##
Antoine Pitrou6f26be02011-05-03 18:18:59 +02002453## ---------------- ##
2454_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002455 echo
2456 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457(
2458 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2459 eval ac_val=\$$ac_var
2460 case $ac_val in #(
2461 *${as_nl}*)
2462 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002463 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2464$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465 esac
2466 case $ac_var in #(
2467 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002468 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2469 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470 esac ;;
2471 esac
2472 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002473 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2475 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002476 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 "s/'\''/'\''\\\\'\'''\''/g;
2478 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2479 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002480 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002482 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 esac |
2484 sort
2485)
Martin v. Löwis11437992002-04-12 09:54:03 +00002486 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002487
Antoine Pitrou6f26be02011-05-03 18:18:59 +02002488 cat <<\_ASBOX
2489## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002490## Output variables. ##
Antoine Pitrou6f26be02011-05-03 18:18:59 +02002491## ----------------- ##
2492_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002493 echo
2494 for ac_var in $ac_subst_vars
2495 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 eval ac_val=\$$ac_var
2497 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 done | sort
2502 echo
2503
2504 if test -n "$ac_subst_files"; then
Antoine Pitrou6f26be02011-05-03 18:18:59 +02002505 cat <<\_ASBOX
2506## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507## File substitutions. ##
Antoine Pitrou6f26be02011-05-03 18:18:59 +02002508## ------------------- ##
2509_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 echo
2511 for ac_var in $ac_subst_files
2512 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 eval ac_val=\$$ac_var
2514 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002517 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 done | sort
2519 echo
2520 fi
2521
Martin v. Löwis11437992002-04-12 09:54:03 +00002522 if test -s confdefs.h; then
Antoine Pitrou6f26be02011-05-03 18:18:59 +02002523 cat <<\_ASBOX
2524## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002525## confdefs.h. ##
Antoine Pitrou6f26be02011-05-03 18:18:59 +02002526## ----------- ##
2527_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 echo
2531 fi
2532 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002533 $as_echo "$as_me: caught signal $ac_signal"
2534 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 rm -f core *.core core.conftest.* &&
2537 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002540for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002541 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002542done
2543ac_signal=0
2544
2545# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002547
Matthias Kloseb9621712010-04-24 17:59:49 +00002548$as_echo "/* confdefs.h */" > confdefs.h
2549
Martin v. Löwis11437992002-04-12 09:54:03 +00002550# Predefined preprocessor variables.
2551
2552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_NAME "$PACKAGE_NAME"
2554_ACEOF
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_VERSION "$PACKAGE_VERSION"
2562_ACEOF
2563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_STRING "$PACKAGE_STRING"
2566_ACEOF
2567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2570_ACEOF
2571
Matthias Kloseb9621712010-04-24 17:59:49 +00002572cat >>confdefs.h <<_ACEOF
2573#define PACKAGE_URL "$PACKAGE_URL"
2574_ACEOF
2575
Martin v. Löwis11437992002-04-12 09:54:03 +00002576
2577# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002578# Prefer an explicitly selected file to automatically selected ones.
2579ac_site_file1=NONE
2580ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581if test -n "$CONFIG_SITE"; then
Antoine Pitrou6f26be02011-05-03 18:18:59 +02002582 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 ac_site_file1=$prefix/share/config.site
2585 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586else
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 ac_site_file1=$ac_default_prefix/share/config.site
2588 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002590for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591do
Matthias Kloseb9621712010-04-24 17:59:49 +00002592 test "x$ac_site_file" = xNONE && continue
2593 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2594 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2595$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 sed 's/^/| /' "$ac_site_file" >&5
Antoine Pitrou6f26be02011-05-03 18:18:59 +02002597 . "$ac_site_file"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002598 fi
2599done
2600
2601if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002602 # Some versions of bash will fail to source /dev/null (special files
2603 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2604 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2606$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2609 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 esac
2611 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002612else
Matthias Kloseb9621712010-04-24 17:59:49 +00002613 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2614$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 >$cache_file
2616fi
2617
2618# Check that the precious variables saved in the cache have kept the same
2619# value.
2620ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2623 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2625 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 case $ac_old_set,$ac_new_set in
2627 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2629$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 +00002630 ac_cache_corrupted=: ;;
2631 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2633$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 ac_cache_corrupted=: ;;
2635 ,);;
2636 *)
2637 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 # differences in whitespace do not lead to failure.
2639 ac_old_val_w=`echo x $ac_old_val`
2640 ac_new_val_w=`echo x $ac_new_val`
2641 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2643$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2644 ac_cache_corrupted=:
2645 else
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2647$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2648 eval $ac_var=\$ac_old_val
2649 fi
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2651$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2653$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 fi;;
2655 esac
2656 # Pass precious variables to config.status.
2657 if test "$ac_new_set" = set; then
2658 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 *) ac_arg=$ac_var=$ac_new_val ;;
2661 esac
2662 case " $ac_configure_args " in
2663 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 esac
2666 fi
2667done
2668if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2670$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2672$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02002673 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002675## -------------------- ##
2676## Main body of script. ##
2677## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002678
Guido van Rossum7f43da71994-08-01 12:15:30 +00002679ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002681ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2682ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2683ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684
Guido van Rossum627b2d71993-12-24 10:39:16 +00002685
Michael W. Hudson54241132001-12-07 15:38:26 +00002686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002687ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002688
2689
Martin v. Löwis11437992002-04-12 09:54:03 +00002690
Benjamin Petersond23f8222009-04-05 19:13:16 +00002691if test "$prefix" != "/"; then
2692 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2693fi
2694
2695
Martin v. Löwis11437992002-04-12 09:54:03 +00002696
2697
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002698# We don't use PACKAGE_ variables, and they cause conflicts
2699# with other autoconf-based packages that include Python.h
2700grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2701rm confdefs.h
2702mv confdefs.h.new confdefs.h
2703
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002704
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002705VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002706
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002707# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002708
2709SOVERSION=1.0
2710
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002711# The later defininition of _XOPEN_SOURCE disables certain features
2712# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2713
Matthias Kloseb9621712010-04-24 17:59:49 +00002714$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002715
2716
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002717# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2718# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2719# them.
2720
Matthias Kloseb9621712010-04-24 17:59:49 +00002721$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002722
2723
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002724# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2725# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2726# them.
2727
Matthias Kloseb9621712010-04-24 17:59:49 +00002728$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002729
2730
Martin v. Löwisd6320502004-08-12 13:45:08 +00002731# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2732# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2733
Matthias Kloseb9621712010-04-24 17:59:49 +00002734$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002735
2736
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002737# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2738# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2739# them.
2740
Matthias Kloseb9621712010-04-24 17:59:49 +00002741$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002742
2743
2744
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002745define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002746
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002747# Arguments passed to configure.
2748
2749CONFIG_ARGS="$ac_configure_args"
2750
Matthias Kloseb9621712010-04-24 17:59:49 +00002751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2752$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002753# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002754if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002755 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002756 case $enableval in
2757 yes)
2758 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002759 if test ! -d "${enableval}"
2760 then
2761 enableval=/
2762 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002763 ;;
2764 esac
2765 case $enableval in
2766 no)
2767 UNIVERSALSDK=
2768 enable_universalsdk=
2769 ;;
2770 *)
2771 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002772 if test ! -d "${UNIVERSALSDK}"
2773 then
Antoine Pitrou6f26be02011-05-03 18:18:59 +02002774 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002775 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002776 ;;
2777 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002778
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002779
Thomas Wouters477c8d52006-05-27 19:21:47 +00002780else
2781
2782 UNIVERSALSDK=
2783 enable_universalsdk=
2784
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002785fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002786
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002787if test -n "${UNIVERSALSDK}"
2788then
Matthias Kloseb9621712010-04-24 17:59:49 +00002789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2790$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002791else
Matthias Kloseb9621712010-04-24 17:59:49 +00002792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2793$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002794fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002796
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002797
2798
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002799UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002800
Matthias Kloseb9621712010-04-24 17:59:49 +00002801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2802$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002803
2804# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002805if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002806 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2808$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002809 UNIVERSAL_ARCHS="$withval"
2810
2811else
2812
Matthias Kloseb9621712010-04-24 17:59:49 +00002813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2814$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002815
2816fi
2817
2818
2819
2820
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002821
2822# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002823if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002824 withval=$with_framework_name;
2825 PYTHONFRAMEWORK=${withval}
2826 PYTHONFRAMEWORKDIR=${withval}.framework
2827 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2828
2829else
2830
2831 PYTHONFRAMEWORK=Python
2832 PYTHONFRAMEWORKDIR=Python.framework
2833 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2834
2835fi
2836
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002837# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002838if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002839 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002840 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002841 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002842 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002843 esac
2844 case $enableval in
2845 no)
2846 PYTHONFRAMEWORK=
2847 PYTHONFRAMEWORKDIR=no-framework
2848 PYTHONFRAMEWORKPREFIX=
2849 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002850 FRAMEWORKINSTALLFIRST=
2851 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002852 FRAMEWORKALTINSTALLFIRST=
2853 FRAMEWORKALTINSTALLLAST=
2854 if test "x${prefix}" = "xNONE"; then
2855 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2856 else
2857 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2858 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002859 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002860 ;;
2861 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002862 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002863 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002864 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002865 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002866 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2867 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002868 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002869
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002870 if test "x${prefix}" = "xNONE" ; then
2871 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002872
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002873 else
2874 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2875 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002876
2877 case "${enableval}" in
2878 /System*)
2879 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2880 if test "${prefix}" = "NONE" ; then
2881 # See below
2882 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2883 fi
2884 ;;
2885
2886 /Library*)
2887 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2888 ;;
2889
2890 */Library/Frameworks)
2891 MDIR="`dirname "${enableval}"`"
2892 MDIR="`dirname "${MDIR}"`"
2893 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2894
2895 if test "${prefix}" = "NONE"; then
2896 # User hasn't specified the
2897 # --prefix option, but wants to install
2898 # the framework in a non-default location,
2899 # ensure that the compatibility links get
2900 # installed relative to that prefix as well
2901 # instead of in /usr/local.
2902 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2903 fi
2904 ;;
2905
2906 *)
2907 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2908 ;;
2909 esac
2910
Jack Jansen127e56e2001-09-11 14:41:54 +00002911 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002912
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002913 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002914 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002915 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002917 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002918
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002919 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2920
2921 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2922
Jack Jansene578a632001-08-15 01:27:14 +00002923 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002924
Guido van Rossum563e7081996-09-10 18:20:48 +00002925else
Martin v. Löwis11437992002-04-12 09:54:03 +00002926
Jack Jansene578a632001-08-15 01:27:14 +00002927 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002928 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002929 PYTHONFRAMEWORKPREFIX=
2930 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002931 FRAMEWORKINSTALLFIRST=
2932 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002933 FRAMEWORKALTINSTALLFIRST=
2934 FRAMEWORKALTINSTALLLAST=
2935 if test "x${prefix}" = "xNONE" ; then
2936 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2937 else
2938 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2939 fi
Jack Jansene578a632001-08-15 01:27:14 +00002940 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002941
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002943fi
2944
Thomas Wouters477c8d52006-05-27 19:21:47 +00002945
2946
Michael W. Hudson54241132001-12-07 15:38:26 +00002947
2948
2949
2950
Jack Jansene578a632001-08-15 01:27:14 +00002951
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002952
2953
2954
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002955
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002956
Jack Jansene578a632001-08-15 01:27:14 +00002957##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002958## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002959## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002960##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002961# Set name for machine-dependent library files
2962
Matthias Kloseb9621712010-04-24 17:59:49 +00002963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2964$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002965if test -z "$MACHDEP"
2966then
Guido van Rossum563e7081996-09-10 18:20:48 +00002967 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002968 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002969 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002970 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002971 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002972 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002973 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002974 ac_md_system=`echo $ac_sys_system |
2975 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2976 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002977 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002978 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002979
Guido van Rossum07397971997-04-29 21:49:50 +00002980 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002981 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002982 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002983 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002984 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002985 esac
2986fi
Guido van Rossum91922671997-10-09 20:24:13 +00002987
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002988# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2989# disable features if it is defined, without any means to access these
2990# features as extensions. For these systems, we skip the definition of
2991# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2992# some feature, make sure there is no alternative way to access this
2993# feature. Also, when using wildcards, make sure you have verified the
2994# need for not defining _XOPEN_SOURCE on all systems matching the
2995# wildcard, and that the wildcard does not include future systems
2996# (which may remove their limitations).
2997case $ac_sys_system/$ac_sys_release in
2998 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2999 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003000 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003001 # In addition, Stefan Krah confirms that issue #1244610 exists through
3002 # OpenBSD 4.6, but is fixed in 4.7.
3003 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003004 define_xopen_source=no
3005 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3006 # also defined. This can be overridden by defining _BSD_SOURCE
3007 # As this has a different meaning on Linux, only define it on OpenBSD
3008
Matthias Kloseb9621712010-04-24 17:59:49 +00003009$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003010
3011 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003012 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003013 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3014 # also defined. This can be overridden by defining _BSD_SOURCE
3015 # As this has a different meaning on Linux, only define it on OpenBSD
3016
Matthias Kloseb9621712010-04-24 17:59:49 +00003017$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003018
3019 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003020 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3021 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3022 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003023 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 +00003024 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003025 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3026 # request to enable features supported by the standard as a request
3027 # to disable features not supported by the standard. The best way
3028 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3029 # entirely and define __EXTENSIONS__ instead.
3030 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003031 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003032 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3033 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003034 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003035 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003036 define_xopen_source=no;;
3037 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003038 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003039 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003040 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003041 # On FreeBSD 4, the math functions C89 does not cover are never defined
3042 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3043 FreeBSD/4.*)
3044 define_xopen_source=no;;
3045 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3046 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3047 # identifies itself as Darwin/7.*
3048 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3049 # disables platform specific features beyond repair.
3050 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3051 # has no effect, don't bother defining them
3052 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003053 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003054 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003055 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003056 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3057 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3058 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003059 AIX/4)
3060 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003061 AIX/5)
3062 if test `uname -r` -eq 1; then
3063 define_xopen_source=no
3064 fi
3065 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003066 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3067 # defining NI_NUMERICHOST.
3068 QNX/6.3.2)
3069 define_xopen_source=no
3070 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003071
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003072esac
3073
3074if test $define_xopen_source = yes
3075then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003076
Matthias Kloseb9621712010-04-24 17:59:49 +00003077$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003078
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003079
3080 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3081 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3082 # several APIs are not declared. Since this is also needed in some
3083 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003084
Matthias Kloseb9621712010-04-24 17:59:49 +00003085$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003086
3087
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003088
Matthias Kloseb9621712010-04-24 17:59:49 +00003089$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003090
3091
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003092fi
3093
Guido van Rossum91922671997-10-09 20:24:13 +00003094#
3095# SGI compilers allow the specification of the both the ABI and the
3096# ISA on the command line. Depending on the values of these switches,
3097# different and often incompatable code will be generated.
3098#
3099# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3100# thus supply support for various ABI/ISA combinations. The MACHDEP
3101# variable is also adjusted.
3102#
3103
3104if test ! -z "$SGI_ABI"
3105then
3106 CC="cc $SGI_ABI"
3107 LDFLAGS="$SGI_ABI $LDFLAGS"
3108 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3109fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3111$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003112
Jack Jansen6b08a402004-06-03 12:41:45 +00003113# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3114# it may influence the way we can build extensions, so distutils
3115# needs to check it
3116
Thomas Wouters477c8d52006-05-27 19:21:47 +00003117
Jack Jansen6b08a402004-06-03 12:41:45 +00003118CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003119EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003120
Matthias Kloseb9621712010-04-24 17:59:49 +00003121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3122$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003123ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3125$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003126
Guido van Rossum627b2d71993-12-24 10:39:16 +00003127# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003128
3129# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3130# for debug/optimization stuff. BASECFLAGS is for flags that are required
3131# just to get things to compile and link. Users are free to override OPT
3132# when running configure or make. The build should not break if they do.
3133# BASECFLAGS should generally not be messed with, however.
3134
3135# XXX shouldn't some/most/all of this code be merged with the stuff later
3136# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3138$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003139
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003140# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003141if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003142 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003143 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003144 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003145 without_gcc=yes;;
3146 yes) CC=gcc
3147 without_gcc=no;;
3148 *) CC=$withval
3149 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003150 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003151else
Martin v. Löwis11437992002-04-12 09:54:03 +00003152
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003153 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003154 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003155 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003156 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003157 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003158fi
3159
Matthias Kloseb9621712010-04-24 17:59:49 +00003160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3161$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003162
Guido van Rossum8b131c51995-03-09 14:10:13 +00003163# If the user switches compilers, we can't believe the cache
3164if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3165then
Antoine Pitrou6f26be02011-05-03 18:18:59 +02003166 as_fn_error "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003167(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003168fi
3169
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003170# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3171# when the compiler supports them, but we don't always want -O2, and
3172# we set -g later.
3173if test -z "$CFLAGS"; then
3174 CFLAGS=
3175fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003176ac_ext=c
3177ac_cpp='$CPP $CPPFLAGS'
3178ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3179ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3180ac_compiler_gnu=$ac_cv_c_compiler_gnu
3181if test -n "$ac_tool_prefix"; then
3182 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3183set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02003186if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003187 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003188else
3189 if test -n "$CC"; then
3190 ac_cv_prog_CC="$CC" # Let the user override the test.
3191else
Martin v. Löwis11437992002-04-12 09:54:03 +00003192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3193for as_dir in $PATH
3194do
3195 IFS=$as_save_IFS
3196 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003197 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003198 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 +00003199 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003200 $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 +00003201 break 2
3202 fi
3203done
Matthias Kloseb9621712010-04-24 17:59:49 +00003204 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003205IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003206
Jack Jansendd19cf82001-12-06 22:36:17 +00003207fi
3208fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003209CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003210if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3212$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003213else
Matthias Kloseb9621712010-04-24 17:59:49 +00003214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3215$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003216fi
3217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003218
Martin v. Löwis11437992002-04-12 09:54:03 +00003219fi
3220if test -z "$ac_cv_prog_CC"; then
3221 ac_ct_CC=$CC
3222 # Extract the first word of "gcc", so it can be a program name with args.
3223set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3225$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02003226if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003227 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003228else
3229 if test -n "$ac_ct_CC"; then
3230 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3231else
3232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3233for as_dir in $PATH
3234do
3235 IFS=$as_save_IFS
3236 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003237 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003238 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 +00003239 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003240 $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 +00003241 break 2
3242 fi
3243done
Matthias Kloseb9621712010-04-24 17:59:49 +00003244 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003245IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003246
3247fi
3248fi
3249ac_ct_CC=$ac_cv_prog_ac_ct_CC
3250if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3252$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003253else
Matthias Kloseb9621712010-04-24 17:59:49 +00003254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3255$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003256fi
3257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003258 if test "x$ac_ct_CC" = x; then
3259 CC=""
3260 else
3261 case $cross_compiling:$ac_tool_warned in
3262yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003263{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3264$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003265ac_tool_warned=yes ;;
3266esac
3267 CC=$ac_ct_CC
3268 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003269else
3270 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003271fi
3272
Jack Jansendd19cf82001-12-06 22:36:17 +00003273if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003274 if test -n "$ac_tool_prefix"; then
3275 # 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 +00003276set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3278$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02003279if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003280 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003281else
3282 if test -n "$CC"; then
3283 ac_cv_prog_CC="$CC" # Let the user override the test.
3284else
Martin v. Löwis11437992002-04-12 09:54:03 +00003285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3286for as_dir in $PATH
3287do
3288 IFS=$as_save_IFS
3289 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003290 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003291 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 +00003292 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003293 $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 +00003294 break 2
3295 fi
3296done
Matthias Kloseb9621712010-04-24 17:59:49 +00003297 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003298IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003299
3300fi
3301fi
3302CC=$ac_cv_prog_CC
3303if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3305$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003306else
Matthias Kloseb9621712010-04-24 17:59:49 +00003307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3308$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003309fi
3310
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003311
Martin v. Löwis11437992002-04-12 09:54:03 +00003312 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003313fi
3314if test -z "$CC"; then
3315 # Extract the first word of "cc", so it can be a program name with args.
3316set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3318$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02003319if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003320 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003321else
3322 if test -n "$CC"; then
3323 ac_cv_prog_CC="$CC" # Let the user override the test.
3324else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003325 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3327for as_dir in $PATH
3328do
3329 IFS=$as_save_IFS
3330 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003331 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003332 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 +00003333 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3334 ac_prog_rejected=yes
3335 continue
3336 fi
3337 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003338 $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 +00003339 break 2
3340 fi
3341done
Matthias Kloseb9621712010-04-24 17:59:49 +00003342 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003343IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003344
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003345if test $ac_prog_rejected = yes; then
3346 # We found a bogon in the path, so make sure we never use it.
3347 set dummy $ac_cv_prog_CC
3348 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003349 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003350 # We chose a different compiler from the bogus one.
3351 # However, it has the same basename, so the bogon will be chosen
3352 # first if we set CC to just the basename; use the full file name.
3353 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003354 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003355 fi
3356fi
3357fi
3358fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003359CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003360if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3362$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003363else
Matthias Kloseb9621712010-04-24 17:59:49 +00003364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3365$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003366fi
3367
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003368
Martin v. Löwis11437992002-04-12 09:54:03 +00003369fi
3370if test -z "$CC"; then
3371 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003372 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003373 do
3374 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3375set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3377$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02003378if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003379 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003380else
3381 if test -n "$CC"; then
3382 ac_cv_prog_CC="$CC" # Let the user override the test.
3383else
Martin v. Löwis11437992002-04-12 09:54:03 +00003384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3385for as_dir in $PATH
3386do
3387 IFS=$as_save_IFS
3388 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003389 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003390 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 +00003391 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003392 $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 +00003393 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003394 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003395done
Matthias Kloseb9621712010-04-24 17:59:49 +00003396 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003397IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003398
3399fi
3400fi
3401CC=$ac_cv_prog_CC
3402if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3404$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003405else
Matthias Kloseb9621712010-04-24 17:59:49 +00003406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3407$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003408fi
3409
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003410
Martin v. Löwis11437992002-04-12 09:54:03 +00003411 test -n "$CC" && break
3412 done
3413fi
3414if test -z "$CC"; then
3415 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003416 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003417do
3418 # Extract the first word of "$ac_prog", so it can be a program name with args.
3419set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3421$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02003422if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003423 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003424else
3425 if test -n "$ac_ct_CC"; then
3426 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3427else
3428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3429for as_dir in $PATH
3430do
3431 IFS=$as_save_IFS
3432 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003433 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003434 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 +00003435 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003436 $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 +00003437 break 2
3438 fi
3439done
Matthias Kloseb9621712010-04-24 17:59:49 +00003440 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003441IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003442
Martin v. Löwis11437992002-04-12 09:54:03 +00003443fi
3444fi
3445ac_ct_CC=$ac_cv_prog_ac_ct_CC
3446if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3448$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003449else
Matthias Kloseb9621712010-04-24 17:59:49 +00003450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3451$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003452fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003454
Martin v. Löwis11437992002-04-12 09:54:03 +00003455 test -n "$ac_ct_CC" && break
3456done
Michael W. Hudson54241132001-12-07 15:38:26 +00003457
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003458 if test "x$ac_ct_CC" = x; then
3459 CC=""
3460 else
3461 case $cross_compiling:$ac_tool_warned in
3462yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003463{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3464$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003465ac_tool_warned=yes ;;
3466esac
3467 CC=$ac_ct_CC
3468 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003469fi
3470
3471fi
3472
3473
Matthias Kloseb9621712010-04-24 17:59:49 +00003474test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3475$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02003476as_fn_error "no acceptable C compiler found in \$PATH
3477See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003478
3479# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003480$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3481set X $ac_compile
3482ac_compiler=$2
3483for ac_option in --version -v -V -qversion; do
3484 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003485case "(($ac_try" in
3486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3487 *) ac_try_echo=$ac_try;;
3488esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003489eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3490$as_echo "$ac_try_echo"; } >&5
3491 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003492 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003493 if test -s conftest.err; then
3494 sed '10a\
3495... rest of stderr output deleted ...
3496 10q' conftest.err >conftest.er1
3497 cat conftest.er1 >&5
3498 fi
3499 rm -f conftest.er1 conftest.err
3500 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3501 test $ac_status = 0; }
3502done
Martin v. Löwis11437992002-04-12 09:54:03 +00003503
Matthias Kloseb9621712010-04-24 17:59:49 +00003504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003505/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003506
Martin v. Löwis11437992002-04-12 09:54:03 +00003507int
3508main ()
3509{
3510
3511 ;
3512 return 0;
3513}
3514_ACEOF
3515ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003516ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003517# Try to create an executable without -o first, disregard a.out.
3518# It will help us diagnose broken compilers, and finding out an intuition
3519# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3521$as_echo_n "checking whether the C compiler works... " >&6; }
3522ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3523
3524# The possible output files:
3525ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3526
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003527ac_rmfiles=
3528for ac_file in $ac_files
3529do
3530 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003531 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003532 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3533 esac
3534done
3535rm -f $ac_rmfiles
3536
Matthias Kloseb9621712010-04-24 17:59:49 +00003537if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003538case "(($ac_try" in
3539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3540 *) ac_try_echo=$ac_try;;
3541esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003542eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3543$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003544 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003545 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003546 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3547 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003548 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3549# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3550# in a Makefile. We should not override ac_cv_exeext if it was cached,
3551# so that the user can short-circuit this test for compilers unknown to
3552# Autoconf.
3553for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003554do
3555 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003556 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003557 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003558 ;;
3559 [ab].out )
3560 # We found the default executable, but exeext='' is most
3561 # certainly right.
3562 break;;
3563 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003564 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003565 then :; else
3566 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3567 fi
3568 # We set ac_cv_exeext here because the later test for it is not
3569 # safe: cross compilers may not add the suffix if given an `-o'
3570 # argument, so we may need to know it at that point already.
3571 # Even if this section looks crufty: it has the advantage of
3572 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003573 break;;
3574 * )
3575 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 esac
3577done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003578test "$ac_cv_exeext" = no && ac_cv_exeext=
3579
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003580else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003581 ac_file=''
3582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003583if test -z "$ac_file"; then :
3584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3585$as_echo "no" >&6; }
3586$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003587sed 's/^/| /' conftest.$ac_ext >&5
3588
Matthias Kloseb9621712010-04-24 17:59:49 +00003589{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3590$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02003591{ as_fn_set_status 77
3592as_fn_error "C compiler cannot create executables
3593See \`config.log' for more details." "$LINENO" 5; }; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003594else
3595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3596$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3599$as_echo_n "checking for C compiler default output file name... " >&6; }
3600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3601$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003602ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003603
Matthias Kloseb9621712010-04-24 17:59:49 +00003604rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003605ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3607$as_echo_n "checking for suffix of executables... " >&6; }
3608if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003609case "(($ac_try" in
3610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3611 *) ac_try_echo=$ac_try;;
3612esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003613eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3614$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003615 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003616 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003617 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3618 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003619 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3620# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3621# work properly (i.e., refer to `conftest.exe'), while it won't with
3622# `rm'.
3623for ac_file in conftest.exe conftest conftest.*; do
3624 test -f "$ac_file" || continue
3625 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003626 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003627 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3628 break;;
3629 * ) break;;
3630 esac
3631done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003632else
Matthias Kloseb9621712010-04-24 17:59:49 +00003633 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3634$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02003635as_fn_error "cannot compute suffix of executables: cannot compile and link
3636See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003638rm -f conftest conftest$ac_cv_exeext
3639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3640$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003641
3642rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003643EXEEXT=$ac_cv_exeext
3644ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3646/* end confdefs.h. */
3647#include <stdio.h>
3648int
3649main ()
3650{
3651FILE *f = fopen ("conftest.out", "w");
3652 return ferror (f) || fclose (f) != 0;
3653
3654 ;
3655 return 0;
3656}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003657_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003658ac_clean_files="$ac_clean_files conftest.out"
3659# Check that the compiler produces executables we can run. If not, either
3660# the compiler is broken, or we cross compile.
3661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3662$as_echo_n "checking whether we are cross compiling... " >&6; }
3663if test "$cross_compiling" != yes; then
3664 { { ac_try="$ac_link"
3665case "(($ac_try" in
3666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3667 *) ac_try_echo=$ac_try;;
3668esac
3669eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3670$as_echo "$ac_try_echo"; } >&5
3671 (eval "$ac_link") 2>&5
3672 ac_status=$?
3673 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3674 test $ac_status = 0; }
3675 if { ac_try='./conftest$ac_cv_exeext'
3676 { { case "(($ac_try" in
3677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3678 *) ac_try_echo=$ac_try;;
3679esac
3680eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3681$as_echo "$ac_try_echo"; } >&5
3682 (eval "$ac_try") 2>&5
3683 ac_status=$?
3684 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3685 test $ac_status = 0; }; }; then
3686 cross_compiling=no
3687 else
3688 if test "$cross_compiling" = maybe; then
3689 cross_compiling=yes
3690 else
3691 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3692$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02003693as_fn_error "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003694If you meant to cross compile, use \`--host'.
Antoine Pitrou6f26be02011-05-03 18:18:59 +02003695See \`config.log' for more details." "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003696 fi
3697 fi
3698fi
3699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3700$as_echo "$cross_compiling" >&6; }
3701
3702rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3703ac_clean_files=$ac_clean_files_save
3704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3705$as_echo_n "checking for suffix of object files... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02003706if test "${ac_cv_objext+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 $as_echo_n "(cached) " >&6
3708else
3709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003710/* end confdefs.h. */
3711
3712int
3713main ()
3714{
3715
3716 ;
3717 return 0;
3718}
3719_ACEOF
3720rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003721if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003722case "(($ac_try" in
3723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3724 *) ac_try_echo=$ac_try;;
3725esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003726eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3727$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003728 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003730 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3731 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003732 for ac_file in conftest.o conftest.obj conftest.*; do
3733 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003734 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003736 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3737 break;;
3738 esac
3739done
3740else
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003742sed 's/^/| /' conftest.$ac_ext >&5
3743
Matthias Kloseb9621712010-04-24 17:59:49 +00003744{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3745$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02003746as_fn_error "cannot compute suffix of object files: cannot compile
3747See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003748fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003749rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3752$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003753OBJEXT=$ac_cv_objext
3754ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3756$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02003757if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003759else
Matthias Kloseb9621712010-04-24 17:59:49 +00003760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003762
Martin v. Löwis11437992002-04-12 09:54:03 +00003763int
3764main ()
3765{
3766#ifndef __GNUC__
3767 choke me
3768#endif
3769
3770 ;
3771 return 0;
3772}
3773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003774if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003775 ac_compiler_gnu=yes
3776else
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003780ac_cv_c_compiler_gnu=$ac_compiler_gnu
3781
3782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3784$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3785if test $ac_compiler_gnu = yes; then
3786 GCC=yes
3787else
3788 GCC=
3789fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003790ac_test_CFLAGS=${CFLAGS+set}
3791ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3793$as_echo_n "checking whether $CC accepts -g... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02003794if test "${ac_cv_prog_cc_g+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003796else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003797 ac_save_c_werror_flag=$ac_c_werror_flag
3798 ac_c_werror_flag=yes
3799 ac_cv_prog_cc_g=no
3800 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003803
Martin v. Löwis11437992002-04-12 09:54:03 +00003804int
3805main ()
3806{
3807
3808 ;
3809 return 0;
3810}
3811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003812if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003813 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003814else
Matthias Kloseb9621712010-04-24 17:59:49 +00003815 CFLAGS=""
3816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817/* end confdefs.h. */
3818
3819int
3820main ()
3821{
3822
3823 ;
3824 return 0;
3825}
3826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003827if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003828
Matthias Kloseb9621712010-04-24 17:59:49 +00003829else
3830 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003831 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003833/* end confdefs.h. */
3834
3835int
3836main ()
3837{
3838
3839 ;
3840 return 0;
3841}
3842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003843if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3851 ac_c_werror_flag=$ac_save_c_werror_flag
3852fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3854$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003855if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003856 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003857elif test $ac_cv_prog_cc_g = yes; then
3858 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003859 CFLAGS="-g -O2"
3860 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003861 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003862 fi
3863else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003864 if test "$GCC" = yes; then
3865 CFLAGS="-O2"
3866 else
3867 CFLAGS=
3868 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3871$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02003872if test "${ac_cv_prog_cc_c89+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003873 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003874else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003875 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003876ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003878/* end confdefs.h. */
3879#include <stdarg.h>
3880#include <stdio.h>
3881#include <sys/types.h>
3882#include <sys/stat.h>
3883/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3884struct buf { int x; };
3885FILE * (*rcsopen) (struct buf *, struct stat *, int);
3886static char *e (p, i)
3887 char **p;
3888 int i;
3889{
3890 return p[i];
3891}
3892static char *f (char * (*g) (char **, int), char **p, ...)
3893{
3894 char *s;
3895 va_list v;
3896 va_start (v,p);
3897 s = g (p, va_arg (v,int));
3898 va_end (v);
3899 return s;
3900}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003901
3902/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3903 function prototypes and stuff, but not '\xHH' hex character constants.
3904 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003905 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003906 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3907 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003908 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003909int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3910
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003911/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3912 inside strings and character constants. */
3913#define FOO(x) 'x'
3914int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3915
Skip Montanaro6dead952003-09-25 14:50:04 +00003916int test (int i, double x);
3917struct s1 {int (*f) (int a);};
3918struct s2 {int (*f) (double a);};
3919int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3920int argc;
3921char **argv;
3922int
3923main ()
3924{
3925return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3926 ;
3927 return 0;
3928}
3929_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3931 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003932do
3933 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003934 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003937rm -f core conftest.err conftest.$ac_objext
3938 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003939done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003941CC=$ac_save_CC
3942
3943fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003944# AC_CACHE_VAL
3945case "x$ac_cv_prog_cc_c89" in
3946 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3948$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003949 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3951$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003952 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003953 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3955$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003956esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003957if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003958
Matthias Kloseb9621712010-04-24 17:59:49 +00003959fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003960
Martin v. Löwis11437992002-04-12 09:54:03 +00003961ac_ext=c
3962ac_cpp='$CPP $CPPFLAGS'
3963ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3964ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3965ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003966
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003967
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003968
3969
Matthias Kloseb9621712010-04-24 17:59:49 +00003970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3971$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003972
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003974if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003976
3977 case $withval in
3978 no) with_cxx_main=no
3979 MAINCC='$(CC)';;
3980 yes) with_cxx_main=yes
3981 MAINCC='$(CXX)';;
3982 *) with_cxx_main=yes
3983 MAINCC=$withval
3984 if test -z "$CXX"
3985 then
3986 CXX=$withval
3987 fi;;
3988 esac
3989else
3990
3991 with_cxx_main=no
3992 MAINCC='$(CC)'
3993
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994fi
3995
Matthias Kloseb9621712010-04-24 17:59:49 +00003996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
3997$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003998
3999preset_cxx="$CXX"
4000if test -z "$CXX"
4001then
4002 case "$CC" in
4003 gcc) # Extract the first word of "g++", so it can be a program name with args.
4004set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4006$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02004007if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004008 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004009else
4010 case $CXX in
4011 [\\/]* | ?:[\\/]*)
4012 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4013 ;;
4014 *)
4015 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4016for as_dir in notfound
4017do
4018 IFS=$as_save_IFS
4019 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004020 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004021 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 +00004022 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004023 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004024 break 2
4025 fi
4026done
Matthias Kloseb9621712010-04-24 17:59:49 +00004027 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004028IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004029
4030 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4031 ;;
4032esac
4033fi
4034CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004035if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4037$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004038else
Matthias Kloseb9621712010-04-24 17:59:49 +00004039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4040$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004042
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004043 ;;
4044 cc) # Extract the first word of "c++", so it can be a program name with args.
4045set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4047$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02004048if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004049 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004050else
4051 case $CXX in
4052 [\\/]* | ?:[\\/]*)
4053 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4054 ;;
4055 *)
4056 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4057for as_dir in notfound
4058do
4059 IFS=$as_save_IFS
4060 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004061 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004062 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 +00004063 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004064 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004065 break 2
4066 fi
4067done
Matthias Kloseb9621712010-04-24 17:59:49 +00004068 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004069IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004070
4071 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4072 ;;
4073esac
4074fi
4075CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004076if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4078$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004079else
Matthias Kloseb9621712010-04-24 17:59:49 +00004080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4081$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004083
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004084 ;;
4085 esac
4086 if test "$CXX" = "notfound"
4087 then
4088 CXX=""
4089 fi
4090fi
4091if test -z "$CXX"
4092then
4093 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4094do
4095 # Extract the first word of "$ac_prog", so it can be a program name with args.
4096set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4098$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02004099if test "${ac_cv_prog_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004100 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004101else
4102 if test -n "$CXX"; then
4103 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4104else
4105as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4106for as_dir in $PATH
4107do
4108 IFS=$as_save_IFS
4109 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004111 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 +00004112 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004113 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004114 break 2
4115 fi
4116done
Matthias Kloseb9621712010-04-24 17:59:49 +00004117 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004118IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004119
4120fi
4121fi
4122CXX=$ac_cv_prog_CXX
4123if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4125$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004126else
Matthias Kloseb9621712010-04-24 17:59:49 +00004127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4128$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004129fi
4130
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004131
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004132 test -n "$CXX" && break
4133done
4134test -n "$CXX" || CXX="notfound"
4135
4136 if test "$CXX" = "notfound"
4137 then
4138 CXX=""
4139 fi
4140fi
4141if test "$preset_cxx" != "$CXX"
4142then
Matthias Kloseb9621712010-04-24 17:59:49 +00004143 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004144
4145 By default, distutils will build C++ extension modules with \"$CXX\".
4146 If this is not intended, then set CXX on the configure command line.
4147 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004148$as_echo "$as_me: 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 " >&2;}
4153fi
4154
4155
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004156# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004157
4158ac_ext=c
4159ac_cpp='$CPP $CPPFLAGS'
4160ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4161ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4162ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4164$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004165# On Suns, sometimes $CPP names a directory.
4166if test -n "$CPP" && test -d "$CPP"; then
4167 CPP=
4168fi
4169if test -z "$CPP"; then
Antoine Pitrou6f26be02011-05-03 18:18:59 +02004170 if test "${ac_cv_prog_CPP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004171 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004172else
Martin v. Löwis11437992002-04-12 09:54:03 +00004173 # Double quotes because CPP needs to be expanded
4174 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4175 do
4176 ac_preproc_ok=false
4177for ac_c_preproc_warn_flag in '' yes
4178do
4179 # Use a header file that comes with gcc, so configuring glibc
4180 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004181 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4182 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004183 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004184 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004186/* end confdefs.h. */
4187#ifdef __STDC__
4188# include <limits.h>
4189#else
4190# include <assert.h>
4191#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004192 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004194if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004195
Matthias Kloseb9621712010-04-24 17:59:49 +00004196else
Martin v. Löwis11437992002-04-12 09:54:03 +00004197 # Broken: fails on valid input.
4198continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004199fi
Antoine Pitrou6f26be02011-05-03 18:18:59 +02004200rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004201
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004203 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004205/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004206#include <ac_nonexistent.h>
4207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004208if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004209 # Broken: success on invalid input.
4210continue
4211else
Martin v. Löwis11437992002-04-12 09:54:03 +00004212 # Passes both tests.
4213ac_preproc_ok=:
4214break
4215fi
Antoine Pitrou6f26be02011-05-03 18:18:59 +02004216rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004217
4218done
4219# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Antoine Pitrou6f26be02011-05-03 18:18:59 +02004220rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004221if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004222 break
4223fi
4224
4225 done
4226 ac_cv_prog_CPP=$CPP
4227
4228fi
4229 CPP=$ac_cv_prog_CPP
4230else
4231 ac_cv_prog_CPP=$CPP
4232fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4234$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004235ac_preproc_ok=false
4236for ac_c_preproc_warn_flag in '' yes
4237do
4238 # Use a header file that comes with gcc, so configuring glibc
4239 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004240 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4241 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004242 # On the NeXT, cc -E runs the code through the compiler's parser,
4243 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004245/* end confdefs.h. */
4246#ifdef __STDC__
4247# include <limits.h>
4248#else
4249# include <assert.h>
4250#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004251 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004253if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004254
Matthias Kloseb9621712010-04-24 17:59:49 +00004255else
Martin v. Löwis11437992002-04-12 09:54:03 +00004256 # Broken: fails on valid input.
4257continue
4258fi
Antoine Pitrou6f26be02011-05-03 18:18:59 +02004259rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004260
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004262 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004264/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004265#include <ac_nonexistent.h>
4266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004267if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004268 # Broken: success on invalid input.
4269continue
4270else
Martin v. Löwis11437992002-04-12 09:54:03 +00004271 # Passes both tests.
4272ac_preproc_ok=:
4273break
4274fi
Antoine Pitrou6f26be02011-05-03 18:18:59 +02004275rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004276
4277done
4278# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Antoine Pitrou6f26be02011-05-03 18:18:59 +02004279rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004280if $ac_preproc_ok; then :
4281
Martin v. Löwis11437992002-04-12 09:54:03 +00004282else
Matthias Kloseb9621712010-04-24 17:59:49 +00004283 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4284$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02004285as_fn_error "C preprocessor \"$CPP\" fails sanity check
4286See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004287fi
4288
4289ac_ext=c
4290ac_cpp='$CPP $CPPFLAGS'
4291ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4292ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4293ac_compiler_gnu=$ac_cv_c_compiler_gnu
4294
4295
Matthias Kloseb9621712010-04-24 17:59:49 +00004296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4297$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02004298if test "${ac_cv_path_GREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004299 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004300else
Matthias Kloseb9621712010-04-24 17:59:49 +00004301 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004302 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004303 # Loop through the user's path and test for each of PROGNAME-LIST
4304 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4306do
4307 IFS=$as_save_IFS
4308 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004309 for ac_prog in grep ggrep; do
4310 for ac_exec_ext in '' $ac_executable_extensions; do
4311 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4312 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4313# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004314 # Check for GNU $ac_path_GREP
4315case `"$ac_path_GREP" --version 2>&1` in
4316*GNU*)
4317 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4318*)
4319 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004320 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004321 while :
4322 do
4323 cat "conftest.in" "conftest.in" >"conftest.tmp"
4324 mv "conftest.tmp" "conftest.in"
4325 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004326 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4328 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004329 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4331 # Best one so far, save it but keep looking for a better one
4332 ac_cv_path_GREP="$ac_path_GREP"
4333 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004334 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004335 # 10*(2^10) chars as input seems more than enough
4336 test $ac_count -gt 10 && break
4337 done
4338 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4339esac
4340
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 $ac_path_GREP_found && break 3
4342 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004343 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004344 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 if test -z "$ac_cv_path_GREP"; then
Antoine Pitrou6f26be02011-05-03 18:18:59 +02004347 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 +00004348 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349else
4350 ac_cv_path_GREP=$GREP
4351fi
4352
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004353fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4355$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356 GREP="$ac_cv_path_GREP"
4357
4358
Matthias Kloseb9621712010-04-24 17:59:49 +00004359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4360$as_echo_n "checking for egrep... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02004361if test "${ac_cv_path_EGREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004362 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363else
4364 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4365 then ac_cv_path_EGREP="$GREP -E"
4366 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004367 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004368 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004369 # Loop through the user's path and test for each of PROGNAME-LIST
4370 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004371for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4372do
4373 IFS=$as_save_IFS
4374 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 for ac_prog in egrep; do
4376 for ac_exec_ext in '' $ac_executable_extensions; do
4377 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4378 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4379# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004380 # Check for GNU $ac_path_EGREP
4381case `"$ac_path_EGREP" --version 2>&1` in
4382*GNU*)
4383 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4384*)
4385 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004386 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004387 while :
4388 do
4389 cat "conftest.in" "conftest.in" >"conftest.tmp"
4390 mv "conftest.tmp" "conftest.in"
4391 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004392 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004393 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4394 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004395 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004396 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4397 # Best one so far, save it but keep looking for a better one
4398 ac_cv_path_EGREP="$ac_path_EGREP"
4399 ac_path_EGREP_max=$ac_count
4400 fi
4401 # 10*(2^10) chars as input seems more than enough
4402 test $ac_count -gt 10 && break
4403 done
4404 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4405esac
4406
Matthias Kloseb9621712010-04-24 17:59:49 +00004407 $ac_path_EGREP_found && break 3
4408 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004409 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004410 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004411IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004412 if test -z "$ac_cv_path_EGREP"; then
Antoine Pitrou6f26be02011-05-03 18:18:59 +02004413 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 +00004414 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004415else
4416 ac_cv_path_EGREP=$EGREP
4417fi
4418
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004419 fi
4420fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4422$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004423 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004424
4425
Matthias Kloseb9621712010-04-24 17:59:49 +00004426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4427$as_echo_n "checking for ANSI C header files... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02004428if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004429 $as_echo_n "(cached) " >&6
4430else
4431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004432/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004433#include <stdlib.h>
4434#include <stdarg.h>
4435#include <string.h>
4436#include <float.h>
4437
4438int
4439main ()
4440{
4441
4442 ;
4443 return 0;
4444}
4445_ACEOF
4446if ac_fn_c_try_compile "$LINENO"; then :
4447 ac_cv_header_stdc=yes
4448else
4449 ac_cv_header_stdc=no
4450fi
4451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4452
4453if test $ac_cv_header_stdc = yes; then
4454 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4456/* end confdefs.h. */
4457#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004458
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004459_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004460if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004461 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004462
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004463else
Matthias Kloseb9621712010-04-24 17:59:49 +00004464 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004465fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004466rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004467
Matthias Kloseb9621712010-04-24 17:59:49 +00004468fi
4469
4470if test $ac_cv_header_stdc = yes; then
4471 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4473/* end confdefs.h. */
4474#include <stdlib.h>
4475
4476_ACEOF
4477if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4478 $EGREP "free" >/dev/null 2>&1; then :
4479
4480else
4481 ac_cv_header_stdc=no
4482fi
4483rm -f conftest*
4484
4485fi
4486
4487if test $ac_cv_header_stdc = yes; then
4488 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4489 if test "$cross_compiling" = yes; then :
4490 :
4491else
4492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4493/* end confdefs.h. */
4494#include <ctype.h>
4495#include <stdlib.h>
4496#if ((' ' & 0x0FF) == 0x020)
4497# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4498# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4499#else
4500# define ISLOWER(c) \
4501 (('a' <= (c) && (c) <= 'i') \
4502 || ('j' <= (c) && (c) <= 'r') \
4503 || ('s' <= (c) && (c) <= 'z'))
4504# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4505#endif
4506
4507#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4508int
4509main ()
4510{
4511 int i;
4512 for (i = 0; i < 256; i++)
4513 if (XOR (islower (i), ISLOWER (i))
4514 || toupper (i) != TOUPPER (i))
4515 return 2;
4516 return 0;
4517}
4518_ACEOF
4519if ac_fn_c_try_run "$LINENO"; then :
4520
4521else
4522 ac_cv_header_stdc=no
4523fi
4524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4525 conftest.$ac_objext conftest.beam conftest.$ac_ext
4526fi
4527
4528fi
4529fi
4530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4531$as_echo "$ac_cv_header_stdc" >&6; }
4532if test $ac_cv_header_stdc = yes; then
4533
4534$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4535
4536fi
4537
4538# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4539for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4540 inttypes.h stdint.h unistd.h
4541do :
4542 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4543ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4544"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02004545eval as_val=\$$as_ac_Header
4546 if test "x$as_val" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004547 cat >>confdefs.h <<_ACEOF
4548#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4549_ACEOF
4550
4551fi
4552
4553done
4554
4555
4556
4557 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02004558if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004559 MINIX=yes
4560else
4561 MINIX=
4562fi
4563
4564
4565 if test "$MINIX" = yes; then
4566
4567$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4568
4569
4570$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4571
4572
4573$as_echo "#define _MINIX 1" >>confdefs.h
4574
4575 fi
4576
4577
4578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4579$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02004580if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004581 $as_echo_n "(cached) " >&6
4582else
4583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4584/* end confdefs.h. */
4585
4586# define __EXTENSIONS__ 1
4587 $ac_includes_default
4588int
4589main ()
4590{
4591
4592 ;
4593 return 0;
4594}
4595_ACEOF
4596if ac_fn_c_try_compile "$LINENO"; then :
4597 ac_cv_safe_to_define___extensions__=yes
4598else
4599 ac_cv_safe_to_define___extensions__=no
4600fi
4601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4602fi
4603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4604$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4605 test $ac_cv_safe_to_define___extensions__ = yes &&
4606 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4607
4608 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4609
4610 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4611
4612 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4613
4614 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4615
4616
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004617
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004618# Check for unsupported systems
4619case $ac_sys_system/$ac_sys_release in
4620atheos*|Linux*/1*)
4621 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4622 echo See README for details.
4623 exit 1;;
4624esac
4625
4626
Matthias Kloseb9621712010-04-24 17:59:49 +00004627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4628$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004629
4630# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004631if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004632 withval=$with_suffix;
4633 case $withval in
4634 no) EXEEXT=;;
4635 yes) EXEEXT=.exe;;
4636 *) EXEEXT=$withval;;
4637 esac
4638fi
4639
Matthias Kloseb9621712010-04-24 17:59:49 +00004640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4641$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004642
4643# Test whether we're running on a non-case-sensitive system, in which
4644# case we give a warning if no ext is given
4645
Matthias Kloseb9621712010-04-24 17:59:49 +00004646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4647$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004648if test ! -d CaseSensitiveTestDir; then
4649mkdir CaseSensitiveTestDir
4650fi
4651
4652if test -d casesensitivetestdir
4653then
Matthias Kloseb9621712010-04-24 17:59:49 +00004654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4655$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004656 BUILDEXEEXT=.exe
4657else
Matthias Kloseb9621712010-04-24 17:59:49 +00004658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4659$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004660 BUILDEXEEXT=$EXEEXT
4661fi
4662rmdir CaseSensitiveTestDir
4663
4664case $MACHDEP in
4665bsdos*)
4666 case $CC in
4667 gcc) CC="$CC -D_HAVE_BSDI";;
4668 esac;;
4669esac
4670
4671case $ac_sys_system in
4672hp*|HP*)
4673 case $CC in
4674 cc|*/cc) CC="$CC -Ae";;
4675 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004676esac
4677
4678
4679
Matthias Kloseb9621712010-04-24 17:59:49 +00004680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4681$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004682if test -z "$LIBRARY"
4683then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004684 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4687$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004688
4689# LDLIBRARY is the name of the library to link against (as opposed to the
4690# name of the library into which to insert object files). BLDLIBRARY is also
4691# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4692# is blank as the main program is not linked directly against LDLIBRARY.
4693# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4694# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4695# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4696# DLLLIBRARY is the shared (i.e., DLL) library.
4697#
4698# RUNSHARED is used to run shared python without installed libraries
4699#
4700# INSTSONAME is the name of the shared library that will be use to install
4701# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004702#
4703# LDVERSION is the shared library version number, normally the Python version
4704# with the ABI build flags appended.
4705
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004706
4707
4708
4709
4710
4711
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004712
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004713LDLIBRARY="$LIBRARY"
4714BLDLIBRARY='$(LDLIBRARY)'
4715INSTSONAME='$(LDLIBRARY)'
4716DLLLIBRARY=''
4717LDLIBRARYDIR=''
4718RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004719LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004720
4721# LINKCC is the command that links the python executable -- default is $(CC).
4722# If CXX is set, and if it is needed to link a main function that was
4723# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4724# python might then depend on the C++ runtime
4725# This is altered for AIX in order to build the export list before
4726# linking.
4727
Matthias Kloseb9621712010-04-24 17:59:49 +00004728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4729$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004730if test -z "$LINKCC"
4731then
4732 LINKCC='$(PURIFY) $(MAINCC)'
4733 case $ac_sys_system in
4734 AIX*)
4735 exp_extra="\"\""
4736 if test $ac_sys_release -ge 5 -o \
4737 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4738 exp_extra="."
4739 fi
4740 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004741 QNX*)
4742 # qcc must be used because the other compilers do not
4743 # support -N.
4744 LINKCC=qcc;;
4745 esac
4746fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4748$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004749
4750# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4751# make sure we default having it set to "no": this is used by
4752# distutils.unixccompiler to know if it should add --enable-new-dtags
4753# to linker command lines, and failing to detect GNU ld simply results
4754# in the same bahaviour as before.
4755
Matthias Kloseb9621712010-04-24 17:59:49 +00004756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4757$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004758ac_prog=ld
4759if test "$GCC" = yes; then
4760 ac_prog=`$CC -print-prog-name=ld`
4761fi
4762case `"$ac_prog" -V 2>&1 < /dev/null` in
4763 *GNU*)
4764 GNULD=yes;;
4765 *)
4766 GNULD=no;;
4767esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4769$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004770
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4772$as_echo_n "checking for inline... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02004773if test "${ac_cv_c_inline+set}" = set; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004774 $as_echo_n "(cached) " >&6
4775else
4776 ac_cv_c_inline=no
4777for ac_kw in inline __inline__ __inline; do
4778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4779/* end confdefs.h. */
4780#ifndef __cplusplus
4781typedef int foo_t;
4782static $ac_kw foo_t static_foo () {return 0; }
4783$ac_kw foo_t foo () {return 0; }
4784#endif
4785
4786_ACEOF
4787if ac_fn_c_try_compile "$LINENO"; then :
4788 ac_cv_c_inline=$ac_kw
4789fi
4790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4791 test "$ac_cv_c_inline" != no && break
4792done
4793
4794fi
4795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4796$as_echo "$ac_cv_c_inline" >&6; }
4797
4798case $ac_cv_c_inline in
4799 inline | yes) ;;
4800 *)
4801 case $ac_cv_c_inline in
4802 no) ac_val=;;
4803 *) ac_val=$ac_cv_c_inline;;
4804 esac
4805 cat >>confdefs.h <<_ACEOF
4806#ifndef __cplusplus
4807#define inline $ac_val
4808#endif
4809_ACEOF
4810 ;;
4811esac
4812
4813if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004814
4815$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004816
4817
4818fi
4819
4820
Matthias Kloseb9621712010-04-24 17:59:49 +00004821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4822$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004823# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004824if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004825 enableval=$enable_shared;
4826fi
4827
4828
4829if test -z "$enable_shared"
4830then
4831 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004832 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004833 enable_shared="yes";;
4834 *)
4835 enable_shared="no";;
4836 esac
4837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4839$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004840
Matthias Kloseb9621712010-04-24 17:59:49 +00004841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4842$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004843# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004844if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845 enableval=$enable_profiling; ac_save_cc="$CC"
4846 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004847 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004848 ac_enable_profiling="no"
4849else
Matthias Kloseb9621712010-04-24 17:59:49 +00004850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004851/* end confdefs.h. */
4852int main() { return 0; }
4853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004854if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004855 ac_enable_profiling="yes"
4856else
Matthias Kloseb9621712010-04-24 17:59:49 +00004857 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004859rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4860 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004861fi
4862
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004863 CC="$ac_save_cc"
4864fi
4865
Matthias Kloseb9621712010-04-24 17:59:49 +00004866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4867$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004868
4869case "$ac_enable_profiling" in
4870 "yes")
4871 BASECFLAGS="-pg $BASECFLAGS"
4872 LDFLAGS="-pg $LDFLAGS"
4873 ;;
4874esac
4875
Matthias Kloseb9621712010-04-24 17:59:49 +00004876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4877$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004878
4879# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4880# library that we build, but we do not want to link against it (we
4881# will find it with a -framework option). For this reason there is an
4882# extra variable BLDLIBRARY against which Python and the extension
4883# modules are linked, BLDLIBRARY. This is normally the same as
4884# LDLIBRARY, but empty for MacOSX framework builds.
4885if test "$enable_framework"
4886then
4887 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4888 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4889 BLDLIBRARY=''
4890else
4891 BLDLIBRARY='$(LDLIBRARY)'
4892fi
4893
4894# Other platforms follow
4895if test $enable_shared = "yes"; then
4896
Matthias Kloseb9621712010-04-24 17:59:49 +00004897$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004898
4899 case $ac_sys_system in
4900 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004901 LDLIBRARY='libpython$(LDVERSION).dll.a'
4902 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004903 ;;
4904 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004905 LDLIBRARY='libpython$(LDVERSION).so'
4906 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004907 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4908 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004909 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004910 then
4911 PY3LIBRARY=libpython3.so
4912 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004913 ;;
4914 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004915 LDLIBRARY='libpython$(LDVERSION).so'
4916 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004917 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4918 case $ac_sys_system in
4919 FreeBSD*)
4920 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4921 ;;
4922 esac
4923 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004924 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004925 then
4926 PY3LIBRARY=libpython3.so
4927 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928 ;;
4929 hp*|HP*)
4930 case `uname -m` in
4931 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004932 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004933 ;;
4934 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004935 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004936 ;;
4937 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004938 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004939 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4940 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004941 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004942 LDLIBRARY='libpython$(LDVERSION).dylib'
4943 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004944 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4945 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004946 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004947 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004948 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4949 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004950
4951 esac
4952else # shared is disabled
4953 case $ac_sys_system in
4954 CYGWIN*)
4955 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004956 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004957 ;;
4958 esac
4959fi
4960
Matthias Kloseb9621712010-04-24 17:59:49 +00004961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4962$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004963
4964if test -n "$ac_tool_prefix"; then
4965 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4966set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4968$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02004969if test "${ac_cv_prog_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004970 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004971else
4972 if test -n "$RANLIB"; then
4973 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4974else
4975as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4976for as_dir in $PATH
4977do
4978 IFS=$as_save_IFS
4979 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004980 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4982 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004983 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004984 break 2
4985 fi
4986done
Matthias Kloseb9621712010-04-24 17:59:49 +00004987 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004988IFS=$as_save_IFS
4989
4990fi
4991fi
4992RANLIB=$ac_cv_prog_RANLIB
4993if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4995$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004996else
Matthias Kloseb9621712010-04-24 17:59:49 +00004997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4998$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004999fi
5000
5001
5002fi
5003if test -z "$ac_cv_prog_RANLIB"; then
5004 ac_ct_RANLIB=$RANLIB
5005 # Extract the first word of "ranlib", so it can be a program name with args.
5006set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5008$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02005009if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005010 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005011else
5012 if test -n "$ac_ct_RANLIB"; then
5013 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5014else
5015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5016for as_dir in $PATH
5017do
5018 IFS=$as_save_IFS
5019 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005020 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005021 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5022 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005023 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005024 break 2
5025 fi
5026done
Matthias Kloseb9621712010-04-24 17:59:49 +00005027 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005028IFS=$as_save_IFS
5029
5030fi
5031fi
5032ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5033if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5035$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005036else
Matthias Kloseb9621712010-04-24 17:59:49 +00005037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5038$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005039fi
5040
5041 if test "x$ac_ct_RANLIB" = x; then
5042 RANLIB=":"
5043 else
5044 case $cross_compiling:$ac_tool_warned in
5045yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005046{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5047$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005048ac_tool_warned=yes ;;
5049esac
5050 RANLIB=$ac_ct_RANLIB
5051 fi
5052else
5053 RANLIB="$ac_cv_prog_RANLIB"
5054fi
5055
5056
5057for ac_prog in ar aal
5058do
5059 # Extract the first word of "$ac_prog", so it can be a program name with args.
5060set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5062$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02005063if test "${ac_cv_prog_AR+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005064 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005065else
5066 if test -n "$AR"; then
5067 ac_cv_prog_AR="$AR" # Let the user override the test.
5068else
5069as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5070for as_dir in $PATH
5071do
5072 IFS=$as_save_IFS
5073 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005074 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005075 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5076 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005077 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005078 break 2
5079 fi
5080done
Matthias Kloseb9621712010-04-24 17:59:49 +00005081 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005082IFS=$as_save_IFS
5083
5084fi
5085fi
5086AR=$ac_cv_prog_AR
5087if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5089$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005090else
Matthias Kloseb9621712010-04-24 17:59:49 +00005091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5092$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005093fi
5094
5095
5096 test -n "$AR" && break
5097done
5098test -n "$AR" || AR="ar"
5099
5100
5101# tweak ARFLAGS only if the user didn't set it on the command line
5102
5103if test -z "$ARFLAGS"
5104then
5105 ARFLAGS="rc"
5106fi
5107
5108
Georg Brandl1ca2e792011-03-05 20:51:24 +01005109
5110
5111# Extract the first word of "hg", so it can be a program name with args.
5112set dummy hg; ac_word=$2
5113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5114$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02005115if test "${ac_cv_prog_HAS_HG+set}" = set; then :
Georg Brandl1ca2e792011-03-05 20:51:24 +01005116 $as_echo_n "(cached) " >&6
5117else
5118 if test -n "$HAS_HG"; then
5119 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5120else
5121as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5122for as_dir in $PATH
5123do
5124 IFS=$as_save_IFS
5125 test -z "$as_dir" && as_dir=.
5126 for ac_exec_ext in '' $ac_executable_extensions; do
5127 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5128 ac_cv_prog_HAS_HG="found"
5129 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5130 break 2
5131 fi
5132done
5133 done
5134IFS=$as_save_IFS
5135
5136 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5137fi
5138fi
5139HAS_HG=$ac_cv_prog_HAS_HG
5140if test -n "$HAS_HG"; then
5141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5142$as_echo "$HAS_HG" >&6; }
5143else
5144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5145$as_echo "no" >&6; }
5146fi
5147
5148
5149if test $HAS_HG = found
5150then
5151 HGVERSION="hg id -i \$(srcdir)"
5152 HGTAG="hg id -t \$(srcdir)"
5153 HGBRANCH="hg id -b \$(srcdir)"
5154else
5155 HGVERSION=""
5156 HGTAG=""
5157 HGBRANCH=""
5158fi
5159
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005160case $MACHDEP in
5161bsdos*|hp*|HP*)
5162 # install -d does not work on BSDI or HP-UX
5163 if test -z "$INSTALL"
5164 then
5165 INSTALL="${srcdir}/install-sh -c"
5166 fi
5167esac
5168ac_aux_dir=
5169for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Antoine Pitrou6f26be02011-05-03 18:18:59 +02005170 for ac_t in install-sh install.sh shtool; do
5171 if test -f "$ac_dir/$ac_t"; then
5172 ac_aux_dir=$ac_dir
5173 ac_install_sh="$ac_aux_dir/$ac_t -c"
5174 break 2
5175 fi
5176 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005177done
5178if test -z "$ac_aux_dir"; then
Antoine Pitrou6f26be02011-05-03 18:18:59 +02005179 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005180fi
5181
5182# These three variables are undocumented and unsupported,
5183# and are intended to be withdrawn in a future Autoconf release.
5184# They can cause serious problems if a builder's source tree is in a directory
5185# whose full name contains unusual characters.
5186ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5187ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5188ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5189
5190
5191# Find a good install program. We prefer a C program (faster),
5192# so one script is as good as another. But avoid the broken or
5193# incompatible versions:
5194# SysV /etc/install, /usr/sbin/install
5195# SunOS /usr/etc/install
5196# IRIX /sbin/install
5197# AIX /bin/install
5198# AmigaOS /C/install, which installs bootblocks on floppy discs
5199# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5200# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5201# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5202# OS/2's system install, which has a completely different semantic
5203# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005204# Reject install programs that cannot install multiple files.
5205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5206$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005207if test -z "$INSTALL"; then
Antoine Pitrou6f26be02011-05-03 18:18:59 +02005208if test "${ac_cv_path_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005209 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005210else
5211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5212for as_dir in $PATH
5213do
5214 IFS=$as_save_IFS
5215 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005216 # Account for people who put trailing slashes in PATH elements.
5217case $as_dir/ in #((
5218 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005219 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005220 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005221 /usr/ucb/* ) ;;
5222 *)
5223 # OSF1 and SCO ODT 3.0 have their own names for install.
5224 # Don't use installbsd from OSF since it installs stuff as root
5225 # by default.
5226 for ac_prog in ginstall scoinst install; do
5227 for ac_exec_ext in '' $ac_executable_extensions; do
5228 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5229 if test $ac_prog = install &&
5230 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5231 # AIX install. It has an incompatible calling convention.
5232 :
5233 elif test $ac_prog = install &&
5234 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5235 # program-specific install script used by HP pwplus--don't use.
5236 :
5237 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005238 rm -rf conftest.one conftest.two conftest.dir
5239 echo one > conftest.one
5240 echo two > conftest.two
5241 mkdir conftest.dir
5242 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5243 test -s conftest.one && test -s conftest.two &&
5244 test -s conftest.dir/conftest.one &&
5245 test -s conftest.dir/conftest.two
5246 then
5247 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5248 break 3
5249 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005250 fi
5251 fi
5252 done
5253 done
5254 ;;
5255esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005256
5257 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005258IFS=$as_save_IFS
5259
Matthias Kloseb9621712010-04-24 17:59:49 +00005260rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005261
5262fi
5263 if test "${ac_cv_path_install+set}" = set; then
5264 INSTALL=$ac_cv_path_install
5265 else
5266 # As a last resort, use the slow shell script. Don't cache a
5267 # value for INSTALL within a source directory, because that will
5268 # break other packages using the cache if that directory is
5269 # removed, or if the value is a relative name.
5270 INSTALL=$ac_install_sh
5271 fi
5272fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5274$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005275
5276# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5277# It thinks the first close brace ends the variable substitution.
5278test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5279
5280test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5281
5282test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5283
5284
5285# Not every filesystem supports hard links
5286
5287if test -z "$LN" ; then
5288 case $ac_sys_system in
5289 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005290 *) LN=ln;;
5291 esac
5292fi
5293
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005294# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005295
5296ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005297
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005298# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5300$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005301
5302# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005303if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005304 withval=$with_pydebug;
5305if test "$withval" != no
5306then
5307
Matthias Kloseb9621712010-04-24 17:59:49 +00005308$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005309
Matthias Kloseb9621712010-04-24 17:59:49 +00005310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5311$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005312 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005313 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005314else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5315$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005316fi
5317else
Matthias Kloseb9621712010-04-24 17:59:49 +00005318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5319$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005320fi
5321
5322
5323# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5324# merged with this chunk of code?
5325
5326# Optimizer/debugger flags
5327# ------------------------
5328# (The following bit of code is complicated enough - please keep things
5329# indented properly. Just pretend you're editing Python code. ;-)
5330
5331# There are two parallel sets of case statements below, one that checks to
5332# see if OPT was set and one that does BASECFLAGS setting based upon
5333# compiler and platform. BASECFLAGS tweaks need to be made even if the
5334# user set OPT.
5335
5336# tweak OPT based on compiler and platform, only if the user didn't set
5337# it on the command line
5338
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005339if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005340then
5341 case $GCC in
5342 yes)
5343 if test "$CC" != 'g++' ; then
5344 STRICT_PROTO="-Wstrict-prototypes"
5345 fi
5346 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5347 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5348 WRAP="-fwrapv"
5349 fi
5350 case $ac_cv_prog_cc_g in
5351 yes)
5352 if test "$Py_DEBUG" = 'true' ; then
5353 # Optimization messes up debuggers, so turn it off for
5354 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005355 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005356 else
5357 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5358 fi
5359 ;;
5360 *)
5361 OPT="-O3 -Wall $STRICT_PROTO"
5362 ;;
5363 esac
5364 case $ac_sys_system in
5365 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5366 ;;
5367 esac
5368 ;;
5369
5370 *)
5371 OPT="-O"
5372 ;;
5373 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005374fi
5375
5376
5377
5378# The -arch flags for universal builds on OSX
5379UNIVERSAL_ARCH_FLAGS=
5380
5381
5382# tweak BASECFLAGS based on compiler and platform
5383case $GCC in
5384yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005385 # Python doesn't violate C99 aliasing rules, but older versions of
5386 # GCC produce warnings for legal Python code. Enable
5387 # -fno-strict-aliasing on versions of GCC that support but produce
5388 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5390$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005391 ac_save_cc="$CC"
5392 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005393 save_CFLAGS="$CFLAGS"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02005394 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005396else
Matthias Kloseb9621712010-04-24 17:59:49 +00005397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005398/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005399
Matthias Kloseb159a552010-04-25 21:00:44 +00005400
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005401int
5402main ()
5403{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005404
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005405 ;
5406 return 0;
5407}
Matthias Kloseb159a552010-04-25 21:00:44 +00005408
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005410if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005411
5412 CC="$ac_save_cc -fstrict-aliasing"
5413 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005415/* end confdefs.h. */
5416
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005417 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005418int
5419main ()
5420{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005421double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005422 ;
5423 return 0;
5424}
Matthias Kloseb159a552010-04-25 21:00:44 +00005425
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005427if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005428
5429 ac_cv_no_strict_aliasing=no
5430
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005431else
Matthias Kloseb159a552010-04-25 21:00:44 +00005432
5433 ac_cv_no_strict_aliasing=yes
5434
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005435fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005437
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005438else
Matthias Kloseb159a552010-04-25 21:00:44 +00005439
5440 ac_cv_no_strict_aliasing=no
5441
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005442fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005444fi
5445
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005446 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005447 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5449$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005450 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005451 then
5452 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5453 fi
5454
5455 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5456 # support. Without this, treatment of subnormals doesn't follow
5457 # the standard.
5458 case $ac_sys_machine in
5459 alpha*)
5460 BASECFLAGS="$BASECFLAGS -mieee"
5461 ;;
5462 esac
5463
5464 case $ac_sys_system in
5465 SCO_SV*)
5466 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5467 ;;
5468 # is there any other compiler on Darwin besides gcc?
5469 Darwin*)
5470 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5471 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005472 if test "${CC}" = gcc
5473 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5475$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005476 case "${UNIVERSALSDK}" in
5477 */MacOSX10.4u.sdk)
5478 # Build using 10.4 SDK, force usage of gcc when the
5479 # compiler is gcc, otherwise the user will get very
5480 # confusing error messages when building on OSX 10.6
5481 CC=gcc-4.0
5482 CPP=cpp-4.0
5483 ;;
5484 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5486$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005487 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005488
5489
5490 if test "${enable_universalsdk}"; then
5491 UNIVERSAL_ARCH_FLAGS=""
5492 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5493 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5494 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005495 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005496 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5497 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005498 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005499 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005500
5501 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5502 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005503 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005504 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005505
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005506 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5507 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005508 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005509 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005510
5511 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5512 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005513 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005514 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005515
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005516 else
Antoine Pitrou6f26be02011-05-03 18:18:59 +02005517 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 +00005518
5519 fi
5520
5521
Ronald Oussoren666028b2010-04-18 19:07:43 +00005522 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5523 if test "${UNIVERSALSDK}" != "/"
5524 then
5525 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5526 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005527 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005528 fi
5529 fi
5530
5531 # Calculate the right deployment target for this build.
5532 #
5533 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5534 if test ${cur_target} '>' 10.2; then
5535 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005536 if test ${enable_universalsdk}; then
5537 if test "${UNIVERSAL_ARCHS}" = "all"; then
5538 # Ensure that the default platform for a
5539 # 4-way universal build is OSX 10.5,
5540 # that's the first OS release where
5541 # 4-way builds make sense.
5542 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005543
5544 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5545 cur_target='10.5'
5546
5547 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5548 cur_target='10.5'
5549
5550 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5551 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005552 fi
5553 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005554 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005555 # On Intel macs default to a deployment
5556 # target of 10.4, that's the first OSX
5557 # release with Intel support.
5558 cur_target="10.4"
5559 fi
5560 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005561 fi
5562 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5563
5564 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5565 # environment with a value that is the same as what we'll use
5566 # in the Makefile to ensure that we'll get the same compiler
5567 # environment during configure and build time.
5568 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5569 export MACOSX_DEPLOYMENT_TARGET
5570 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5571
5572 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005573 esac
5574 ;;
5575
5576*)
5577 case $ac_sys_system in
5578 OpenUNIX*|UnixWare*)
5579 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5580 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005581 SCO_SV*)
5582 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5583 ;;
5584 esac
5585 ;;
5586esac
5587
5588if test "$Py_DEBUG" = 'true'; then
5589 :
5590else
5591 OPT="-DNDEBUG $OPT"
5592fi
5593
5594if test "$ac_arch_flags"
5595then
5596 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5597fi
5598
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599# Check whether GCC supports PyArg_ParseTuple format
5600if test "$GCC" = "yes"
5601then
Matthias Kloseb9621712010-04-24 17:59:49 +00005602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5603$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005604 save_CFLAGS=$CFLAGS
5605 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607/* end confdefs.h. */
5608
5609 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005610int
5611main ()
5612{
5613
5614 ;
5615 return 0;
5616}
Matthias Kloseb159a552010-04-25 21:00:44 +00005617
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005619if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005620
Matthias Kloseb159a552010-04-25 21:00:44 +00005621
Matthias Kloseb9621712010-04-24 17:59:49 +00005622$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005623
Matthias Kloseb159a552010-04-25 21:00:44 +00005624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005625$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005626
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627else
Matthias Kloseb159a552010-04-25 21:00:44 +00005628
5629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005630$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005631
5632fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5634 CFLAGS=$save_CFLAGS
5635fi
5636
5637# On some compilers, pthreads are available without further options
5638# (e.g. MacOS X). On some of these systems, the compiler will not
5639# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5640# So we have to see first whether pthreads are available without
5641# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5643$as_echo_n "checking whether pthreads are available without options... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02005644if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005645 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005646else
Matthias Kloseb9621712010-04-24 17:59:49 +00005647 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648 ac_cv_pthread_is_default=no
5649else
Matthias Kloseb9621712010-04-24 17:59:49 +00005650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651/* end confdefs.h. */
5652
5653#include <pthread.h>
5654
5655void* routine(void* p){return NULL;}
5656
5657int main(){
5658 pthread_t p;
5659 if(pthread_create(&p,NULL,routine,NULL)!=0)
5660 return 1;
5661 (void)pthread_detach(p);
5662 return 0;
5663}
5664
5665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005666if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667
5668 ac_cv_pthread_is_default=yes
5669 ac_cv_kthread=no
5670 ac_cv_pthread=no
5671
5672else
Matthias Kloseb9621712010-04-24 17:59:49 +00005673 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5676 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677fi
5678
5679
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680fi
5681
Matthias Kloseb9621712010-04-24 17:59:49 +00005682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5683$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684
5685
5686if test $ac_cv_pthread_is_default = yes
5687then
5688 ac_cv_kpthread=no
5689else
5690# -Kpthread, if available, provides the right #defines
5691# and linker options to make pthread_create available
5692# Some compilers won't report that they do not support -Kpthread,
5693# so we need to run a program to see whether it really made the
5694# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5696$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02005697if test "${ac_cv_kpthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005698 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699else
5700 ac_save_cc="$CC"
5701CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005702if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703 ac_cv_kpthread=no
5704else
Matthias Kloseb9621712010-04-24 17:59:49 +00005705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706/* end confdefs.h. */
5707
5708#include <pthread.h>
5709
5710void* routine(void* p){return NULL;}
5711
5712int main(){
5713 pthread_t p;
5714 if(pthread_create(&p,NULL,routine,NULL)!=0)
5715 return 1;
5716 (void)pthread_detach(p);
5717 return 0;
5718}
5719
5720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005721if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722 ac_cv_kpthread=yes
5723else
Matthias Kloseb9621712010-04-24 17:59:49 +00005724 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005726rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5727 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728fi
5729
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730CC="$ac_save_cc"
5731fi
5732
Matthias Kloseb9621712010-04-24 17:59:49 +00005733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5734$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735fi
5736
5737if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5738then
5739# -Kthread, if available, provides the right #defines
5740# and linker options to make pthread_create available
5741# Some compilers won't report that they do not support -Kthread,
5742# so we need to run a program to see whether it really made the
5743# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5745$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02005746if test "${ac_cv_kthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005747 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748else
5749 ac_save_cc="$CC"
5750CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005751if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752 ac_cv_kthread=no
5753else
Matthias Kloseb9621712010-04-24 17:59:49 +00005754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755/* end confdefs.h. */
5756
5757#include <pthread.h>
5758
5759void* routine(void* p){return NULL;}
5760
5761int main(){
5762 pthread_t p;
5763 if(pthread_create(&p,NULL,routine,NULL)!=0)
5764 return 1;
5765 (void)pthread_detach(p);
5766 return 0;
5767}
5768
5769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005770if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771 ac_cv_kthread=yes
5772else
Matthias Kloseb9621712010-04-24 17:59:49 +00005773 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005775rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5776 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777fi
5778
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779CC="$ac_save_cc"
5780fi
5781
Matthias Kloseb9621712010-04-24 17:59:49 +00005782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5783$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784fi
5785
5786if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5787then
5788# -pthread, if available, provides the right #defines
5789# and linker options to make pthread_create available
5790# Some compilers won't report that they do not support -pthread,
5791# so we need to run a program to see whether it really made the
5792# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5794$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02005795if test "${ac_cv_thread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005796 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797else
5798 ac_save_cc="$CC"
5799CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005800if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801 ac_cv_pthread=no
5802else
Matthias Kloseb9621712010-04-24 17:59:49 +00005803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804/* end confdefs.h. */
5805
5806#include <pthread.h>
5807
5808void* routine(void* p){return NULL;}
5809
5810int main(){
5811 pthread_t p;
5812 if(pthread_create(&p,NULL,routine,NULL)!=0)
5813 return 1;
5814 (void)pthread_detach(p);
5815 return 0;
5816}
5817
5818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005819if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820 ac_cv_pthread=yes
5821else
Matthias Kloseb9621712010-04-24 17:59:49 +00005822 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005824rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5825 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826fi
5827
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828CC="$ac_save_cc"
5829fi
5830
Matthias Kloseb9621712010-04-24 17:59:49 +00005831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5832$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833fi
5834
5835# If we have set a CC compiler flag for thread support then
5836# check if it works for CXX, too.
5837ac_cv_cxx_thread=no
5838if test ! -z "$CXX"
5839then
Matthias Kloseb9621712010-04-24 17:59:49 +00005840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5841$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842ac_save_cxx="$CXX"
5843
5844if test "$ac_cv_kpthread" = "yes"
5845then
5846 CXX="$CXX -Kpthread"
5847 ac_cv_cxx_thread=yes
5848elif test "$ac_cv_kthread" = "yes"
5849then
5850 CXX="$CXX -Kthread"
5851 ac_cv_cxx_thread=yes
5852elif test "$ac_cv_pthread" = "yes"
5853then
5854 CXX="$CXX -pthread"
5855 ac_cv_cxx_thread=yes
5856fi
5857
5858if test $ac_cv_cxx_thread = yes
5859then
5860 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5861 $CXX -c conftest.$ac_ext 2>&5
5862 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5863 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5864 then
5865 ac_cv_cxx_thread=yes
5866 else
5867 ac_cv_cxx_thread=no
5868 fi
5869 rm -fr conftest*
5870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5872$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873fi
5874CXX="$ac_save_cxx"
5875
5876
5877# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5879$as_echo_n "checking for ANSI C header files... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02005880if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005881 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882else
Matthias Kloseb9621712010-04-24 17:59:49 +00005883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884/* end confdefs.h. */
5885#include <stdlib.h>
5886#include <stdarg.h>
5887#include <string.h>
5888#include <float.h>
5889
5890int
5891main ()
5892{
5893
5894 ;
5895 return 0;
5896}
5897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005898if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899 ac_cv_header_stdc=yes
5900else
Matthias Kloseb9621712010-04-24 17:59:49 +00005901 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5904
5905if test $ac_cv_header_stdc = yes; then
5906 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908/* end confdefs.h. */
5909#include <string.h>
5910
5911_ACEOF
5912if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005913 $EGREP "memchr" >/dev/null 2>&1; then :
5914
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915else
5916 ac_cv_header_stdc=no
5917fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005918rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919
5920fi
5921
5922if test $ac_cv_header_stdc = yes; then
5923 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925/* end confdefs.h. */
5926#include <stdlib.h>
5927
5928_ACEOF
5929if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005930 $EGREP "free" >/dev/null 2>&1; then :
5931
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932else
5933 ac_cv_header_stdc=no
5934fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005935rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936
5937fi
5938
5939if test $ac_cv_header_stdc = yes; then
5940 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005941 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942 :
5943else
Matthias Kloseb9621712010-04-24 17:59:49 +00005944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945/* end confdefs.h. */
5946#include <ctype.h>
5947#include <stdlib.h>
5948#if ((' ' & 0x0FF) == 0x020)
5949# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5950# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5951#else
5952# define ISLOWER(c) \
5953 (('a' <= (c) && (c) <= 'i') \
5954 || ('j' <= (c) && (c) <= 'r') \
5955 || ('s' <= (c) && (c) <= 'z'))
5956# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5957#endif
5958
5959#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5960int
5961main ()
5962{
5963 int i;
5964 for (i = 0; i < 256; i++)
5965 if (XOR (islower (i), ISLOWER (i))
5966 || toupper (i) != TOUPPER (i))
5967 return 2;
5968 return 0;
5969}
5970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005971if ac_fn_c_try_run "$LINENO"; then :
5972
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973else
Matthias Kloseb9621712010-04-24 17:59:49 +00005974 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005976rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5977 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978fi
5979
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980fi
5981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5983$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984if test $ac_cv_header_stdc = yes; then
5985
Matthias Kloseb9621712010-04-24 17:59:49 +00005986$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987
5988fi
5989
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005990for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5991fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005992ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005993shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005994unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005995sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5996sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00005997sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
5998sys/stat.h sys/termio.h sys/time.h \
5999sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
6000libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006001bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006002do :
6003 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6004ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006005eval as_val=\$$as_ac_Header
6006 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006007 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006008#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006009_ACEOF
6010
6011fi
6012
Guido van Rossum627b2d71993-12-24 10:39:16 +00006013done
6014
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006015ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006016for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006017 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6019$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006020if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006021 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006022else
Matthias Kloseb9621712010-04-24 17:59:49 +00006023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006024/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006025#include <sys/types.h>
6026#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006027
Martin v. Löwis11437992002-04-12 09:54:03 +00006028int
6029main ()
6030{
6031if ((DIR *) 0)
6032return 0;
6033 ;
6034 return 0;
6035}
6036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006037if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006038 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006039else
Matthias Kloseb9621712010-04-24 17:59:49 +00006040 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006044eval ac_res=\$$as_ac_Header
6045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6046$as_echo "$ac_res" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006047eval as_val=\$$as_ac_Header
6048 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006049 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006050#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006051_ACEOF
6052
6053ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006054fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006055
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006056done
6057# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6058if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6060$as_echo_n "checking for library containing opendir... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006061if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006062 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006063else
Martin v. Löwis11437992002-04-12 09:54:03 +00006064 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006067
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006068/* Override any GCC internal prototype to avoid an error.
6069 Use char because int might match the return type of a GCC
6070 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006071#ifdef __cplusplus
6072extern "C"
6073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006074char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006075int
6076main ()
6077{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006078return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006079 ;
6080 return 0;
6081}
6082_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006083for ac_lib in '' dir; do
6084 if test -z "$ac_lib"; then
6085 ac_res="none required"
6086 else
6087 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006088 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006089 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006090 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006091 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006093rm -f core conftest.err conftest.$ac_objext \
6094 conftest$ac_exeext
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006095 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006096 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006098done
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006099if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006100
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006101else
6102 ac_cv_search_opendir=no
6103fi
6104rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006105LIBS=$ac_func_search_save_LIBS
6106fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6108$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006109ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006110if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006111 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006112
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006113fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006114
Michael W. Hudson54241132001-12-07 15:38:26 +00006115else
Matthias Kloseb9621712010-04-24 17:59:49 +00006116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6117$as_echo_n "checking for library containing opendir... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006118if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006119 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006120else
6121 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006125/* Override any GCC internal prototype to avoid an error.
6126 Use char because int might match the return type of a GCC
6127 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006128#ifdef __cplusplus
6129extern "C"
6130#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006131char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006132int
6133main ()
6134{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006135return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006136 ;
6137 return 0;
6138}
6139_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006140for ac_lib in '' x; do
6141 if test -z "$ac_lib"; then
6142 ac_res="none required"
6143 else
6144 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006145 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006146 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006147 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006148 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006149fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006150rm -f core conftest.err conftest.$ac_objext \
6151 conftest$ac_exeext
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006152 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006153 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006155done
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006156if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006157
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006158else
6159 ac_cv_search_opendir=no
6160fi
6161rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006162LIBS=$ac_func_search_save_LIBS
6163fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6165$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006166ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006167if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006168 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006169
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006170fi
6171
6172fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006173
Matthias Kloseb9621712010-04-24 17:59:49 +00006174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6175$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006176if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006177 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006178else
Matthias Kloseb9621712010-04-24 17:59:49 +00006179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006180/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006181#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006182int
6183main ()
6184{
6185return makedev(0, 0);
6186 ;
6187 return 0;
6188}
6189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006190if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006191 ac_cv_header_sys_types_h_makedev=yes
6192else
Matthias Kloseb9621712010-04-24 17:59:49 +00006193 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006194fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006195rm -f core conftest.err conftest.$ac_objext \
6196 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006197
6198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6200$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006201
6202if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006203ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006204if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006205
Matthias Kloseb9621712010-04-24 17:59:49 +00006206$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006207
6208fi
6209
6210
6211
6212 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006213 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006214if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006215
Matthias Kloseb9621712010-04-24 17:59:49 +00006216$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006217
6218fi
6219
6220
6221 fi
6222fi
6223
Michael W. Hudson54241132001-12-07 15:38:26 +00006224
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006225# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006226for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006227do :
6228 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006229#ifdef HAVE_CURSES_H
6230#include <curses.h>
6231#endif
6232
Matthias Kloseb9621712010-04-24 17:59:49 +00006233"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006234if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006235 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006236#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006237_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006238
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006239fi
6240
6241done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006242
6243
Martin v. Löwis11017b12006-01-14 18:12:57 +00006244# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006245for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006246do :
6247 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 +00006248#ifdef HAVE_ASM_TYPES_H
6249#include <asm/types.h>
6250#endif
6251#ifdef HAVE_SYS_SOCKET_H
6252#include <sys/socket.h>
6253#endif
6254
Matthias Kloseb9621712010-04-24 17:59:49 +00006255"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006256if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006257 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006258#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006259_ACEOF
6260
6261fi
6262
6263done
6264
6265
Guido van Rossum627b2d71993-12-24 10:39:16 +00006266# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006267was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6269$as_echo_n "checking for clock_t in time.h... " >&6; }
6270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006271/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006272#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006273
6274_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006275if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006276 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006277 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006278else
Martin v. Löwis11437992002-04-12 09:54:03 +00006279
6280
Matthias Kloseb9621712010-04-24 17:59:49 +00006281$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006282
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006283
Guido van Rossum627b2d71993-12-24 10:39:16 +00006284fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006285rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006286
Matthias Kloseb9621712010-04-24 17:59:49 +00006287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6288$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006289
Matthias Kloseb9621712010-04-24 17:59:49 +00006290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6291$as_echo_n "checking for makedev... " >&6; }
6292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006293/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006294
Jesus Cea740f53a2010-04-28 11:35:30 +00006295#if defined(MAJOR_IN_MKDEV)
6296#include <sys/mkdev.h>
6297#elif defined(MAJOR_IN_SYSMACROS)
6298#include <sys/sysmacros.h>
6299#else
6300#include <sys/types.h>
6301#endif
6302
Neal Norwitz11690112002-07-30 01:08:28 +00006303int
6304main ()
6305{
Jesus Cea740f53a2010-04-28 11:35:30 +00006306
6307 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006308 ;
6309 return 0;
6310}
Matthias Kloseb159a552010-04-25 21:00:44 +00006311
Neal Norwitz11690112002-07-30 01:08:28 +00006312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006313if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006314 ac_cv_has_makedev=yes
6315else
Matthias Kloseb9621712010-04-24 17:59:49 +00006316 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006318rm -f core conftest.err conftest.$ac_objext \
6319 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6321$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006322if test "$ac_cv_has_makedev" = "yes"; then
6323
Matthias Kloseb9621712010-04-24 17:59:49 +00006324$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006325
6326fi
6327
Martin v. Löwis399a6892002-10-04 10:22:02 +00006328# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6329# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6330# defined, but the compiler does not support pragma redefine_extname,
6331# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6332# structures (such as rlimit64) without declaring them. As a
6333# work-around, disable LFS on such configurations
6334
6335use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6337$as_echo_n "checking Solaris LFS bug... " >&6; }
6338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006339/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006340
6341#define _LARGEFILE_SOURCE 1
6342#define _FILE_OFFSET_BITS 64
6343#include <sys/resource.h>
6344
Martin v. Löwis399a6892002-10-04 10:22:02 +00006345int
6346main ()
6347{
6348struct rlimit foo;
6349 ;
6350 return 0;
6351}
6352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006353if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006354 sol_lfs_bug=no
6355else
Matthias Kloseb9621712010-04-24 17:59:49 +00006356 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6360$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006361if test "$sol_lfs_bug" = "yes"; then
6362 use_lfs=no
6363fi
6364
6365if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006366# Two defines needed to enable largefile support on various platforms
6367# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006368case $ac_sys_system/$ac_sys_release in
6369AIX*)
6370
6371$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6372
6373 ;;
6374esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006375
Matthias Kloseb9621712010-04-24 17:59:49 +00006376$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006377
6378
Matthias Kloseb9621712010-04-24 17:59:49 +00006379$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006380
Martin v. Löwis399a6892002-10-04 10:22:02 +00006381fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006382
Guido van Rossum84e7b241996-08-19 21:59:00 +00006383# Add some code to confdefs.h so that the test for off_t works on SCO
6384cat >> confdefs.h <<\EOF
6385#if defined(SCO_DS)
6386#undef _OFF_T
6387#endif
6388EOF
6389
Guido van Rossumef2255b2000-03-10 22:30:29 +00006390# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006391ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006392if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006393
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006394else
Martin v. Löwis11437992002-04-12 09:54:03 +00006395
6396cat >>confdefs.h <<_ACEOF
6397#define mode_t int
6398_ACEOF
6399
6400fi
6401
Matthias Kloseb9621712010-04-24 17:59:49 +00006402ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006403if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006404
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006405else
Martin v. Löwis11437992002-04-12 09:54:03 +00006406
6407cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006408#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006409_ACEOF
6410
6411fi
6412
Matthias Kloseb9621712010-04-24 17:59:49 +00006413ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006414if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006415
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006416else
Martin v. Löwis11437992002-04-12 09:54:03 +00006417
6418cat >>confdefs.h <<_ACEOF
6419#define pid_t int
6420_ACEOF
6421
6422fi
6423
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006424
Martin v. Löwis11437992002-04-12 09:54:03 +00006425cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006426#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006427_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006428
Matthias Kloseb9621712010-04-24 17:59:49 +00006429ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006430if test "x$ac_cv_type_size_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
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006435#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006436_ACEOF
6437
6438fi
6439
Matthias Kloseb9621712010-04-24 17:59:49 +00006440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6441$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006442if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006443 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006444else
Matthias Kloseb9621712010-04-24 17:59:49 +00006445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006446/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006447#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006448
6449_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006450if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006451 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006452 ac_cv_type_uid_t=yes
6453else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006454 ac_cv_type_uid_t=no
6455fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006456rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006457
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006458fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6460$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006461if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006462
Matthias Kloseb9621712010-04-24 17:59:49 +00006463$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006464
6465
Matthias Kloseb9621712010-04-24 17:59:49 +00006466$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006467
6468fi
6469
Matthias Kloseb9621712010-04-24 17:59:49 +00006470ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6471case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006472 no|yes) ;; #(
6473 *)
6474
Matthias Kloseb9621712010-04-24 17:59:49 +00006475$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006476
6477
6478cat >>confdefs.h <<_ACEOF
6479#define uint32_t $ac_cv_c_uint32_t
6480_ACEOF
6481;;
6482 esac
6483
Matthias Kloseb9621712010-04-24 17:59:49 +00006484ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6485case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006486 no|yes) ;; #(
6487 *)
6488
Matthias Kloseb9621712010-04-24 17:59:49 +00006489$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006490
6491
6492cat >>confdefs.h <<_ACEOF
6493#define uint64_t $ac_cv_c_uint64_t
6494_ACEOF
6495;;
6496 esac
6497
Matthias Kloseb9621712010-04-24 17:59:49 +00006498ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6499case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006500 no|yes) ;; #(
6501 *)
6502
6503cat >>confdefs.h <<_ACEOF
6504#define int32_t $ac_cv_c_int32_t
6505_ACEOF
6506;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006507esac
6508
Matthias Kloseb9621712010-04-24 17:59:49 +00006509ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6510case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006511 no|yes) ;; #(
6512 *)
6513
6514cat >>confdefs.h <<_ACEOF
6515#define int64_t $ac_cv_c_int64_t
6516_ACEOF
6517;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006518esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006519
Matthias Kloseb9621712010-04-24 17:59:49 +00006520ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006521if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006522
Matthias Kloseb9621712010-04-24 17:59:49 +00006523$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006524
6525fi
6526
Jack Jansendd19cf82001-12-06 22:36:17 +00006527
Michael W. Hudson54241132001-12-07 15:38:26 +00006528# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006529# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006530# The cast to long int works around a bug in the HP C Compiler
6531# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6532# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6533# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6535$as_echo_n "checking size of int... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006536if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006537 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006538else
Matthias Kloseb9621712010-04-24 17:59:49 +00006539 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 +00006540
Martin v. Löwis11437992002-04-12 09:54:03 +00006541else
Matthias Kloseb9621712010-04-24 17:59:49 +00006542 if test "$ac_cv_type_int" = yes; then
6543 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6544$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006545{ as_fn_set_status 77
6546as_fn_error "cannot compute sizeof (int)
6547See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006548 else
6549 ac_cv_sizeof_int=0
6550 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006551fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006552
Martin v. Löwis11437992002-04-12 09:54:03 +00006553fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6555$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006556
6557
6558
Martin v. Löwis11437992002-04-12 09:54:03 +00006559cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006560#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006561_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006562
6563
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006564# The cast to long int works around a bug in the HP C Compiler
6565# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6566# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6567# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6569$as_echo_n "checking size of long... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006570if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006571 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006572else
Matthias Kloseb9621712010-04-24 17:59:49 +00006573 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 +00006574
Martin v. Löwis11437992002-04-12 09:54:03 +00006575else
Matthias Kloseb9621712010-04-24 17:59:49 +00006576 if test "$ac_cv_type_long" = yes; then
6577 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6578$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006579{ as_fn_set_status 77
6580as_fn_error "cannot compute sizeof (long)
6581See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006582 else
6583 ac_cv_sizeof_long=0
6584 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006586
Martin v. Löwis11437992002-04-12 09:54:03 +00006587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6589$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006590
6591
6592
Martin v. Löwis11437992002-04-12 09:54:03 +00006593cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006594#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006595_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006596
6597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006598# The cast to long int works around a bug in the HP C Compiler
6599# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6600# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6601# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6603$as_echo_n "checking size of void *... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006604if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006605 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006606else
Matthias Kloseb9621712010-04-24 17:59:49 +00006607 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 +00006608
Martin v. Löwis11437992002-04-12 09:54:03 +00006609else
Matthias Kloseb9621712010-04-24 17:59:49 +00006610 if test "$ac_cv_type_void_p" = yes; then
6611 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6612$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006613{ as_fn_set_status 77
6614as_fn_error "cannot compute sizeof (void *)
6615See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006616 else
6617 ac_cv_sizeof_void_p=0
6618 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006620
Martin v. Löwis11437992002-04-12 09:54:03 +00006621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6623$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006624
6625
6626
Martin v. Löwis11437992002-04-12 09:54:03 +00006627cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006628#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006629_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006630
6631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006632# The cast to long int works around a bug in the HP C Compiler
6633# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6634# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6635# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6637$as_echo_n "checking size of short... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006638if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006639 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006640else
Matthias Kloseb9621712010-04-24 17:59:49 +00006641 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 +00006642
Martin v. Löwis11437992002-04-12 09:54:03 +00006643else
Matthias Kloseb9621712010-04-24 17:59:49 +00006644 if test "$ac_cv_type_short" = yes; then
6645 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6646$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006647{ as_fn_set_status 77
6648as_fn_error "cannot compute sizeof (short)
6649See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006650 else
6651 ac_cv_sizeof_short=0
6652 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006654
Martin v. Löwis11437992002-04-12 09:54:03 +00006655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6657$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006658
6659
6660
Martin v. Löwis11437992002-04-12 09:54:03 +00006661cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006662#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006663_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006664
6665
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006666# The cast to long int works around a bug in the HP C Compiler
6667# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6668# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6669# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6671$as_echo_n "checking size of float... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006672if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006673 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006674else
Matthias Kloseb9621712010-04-24 17:59:49 +00006675 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 +00006676
Martin v. Löwis11437992002-04-12 09:54:03 +00006677else
Matthias Kloseb9621712010-04-24 17:59:49 +00006678 if test "$ac_cv_type_float" = yes; then
6679 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6680$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006681{ as_fn_set_status 77
6682as_fn_error "cannot compute sizeof (float)
6683See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006684 else
6685 ac_cv_sizeof_float=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_float" >&5
6691$as_echo "$ac_cv_sizeof_float" >&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_FLOAT $ac_cv_sizeof_float
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 double" >&5
6705$as_echo_n "checking size of double... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006706if test "${ac_cv_sizeof_double+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 (double))" "ac_cv_sizeof_double" "$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_double" = 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;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006715{ as_fn_set_status 77
6716as_fn_error "cannot compute sizeof (double)
6717See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006718 else
6719 ac_cv_sizeof_double=0
6720 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006722
Martin v. Löwis11437992002-04-12 09:54:03 +00006723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6725$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006726
6727
6728
Martin v. Löwis11437992002-04-12 09:54:03 +00006729cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006730#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006731_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006732
6733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006734# The cast to long int works around a bug in the HP C Compiler
6735# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6736# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6737# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6739$as_echo_n "checking size of fpos_t... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006740if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006741 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006742else
Matthias Kloseb9621712010-04-24 17:59:49 +00006743 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 +00006744
Martin v. Löwis11437992002-04-12 09:54:03 +00006745else
Matthias Kloseb9621712010-04-24 17:59:49 +00006746 if test "$ac_cv_type_fpos_t" = yes; then
6747 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006749{ as_fn_set_status 77
6750as_fn_error "cannot compute sizeof (fpos_t)
6751See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006752 else
6753 ac_cv_sizeof_fpos_t=0
6754 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006756
Martin v. Löwis11437992002-04-12 09:54:03 +00006757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6759$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006760
6761
6762
Martin v. Löwis11437992002-04-12 09:54:03 +00006763cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006764#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006765_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006766
Michael W. Hudson54241132001-12-07 15:38:26 +00006767
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006768# The cast to long int works around a bug in the HP C Compiler
6769# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6770# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6771# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6773$as_echo_n "checking size of size_t... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006774if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006775 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006776else
Matthias Kloseb9621712010-04-24 17:59:49 +00006777 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 +00006778
Martin v. Löwis18e16552006-02-15 17:27:45 +00006779else
Matthias Kloseb9621712010-04-24 17:59:49 +00006780 if test "$ac_cv_type_size_t" = yes; then
6781 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6782$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006783{ as_fn_set_status 77
6784as_fn_error "cannot compute sizeof (size_t)
6785See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006786 else
6787 ac_cv_sizeof_size_t=0
6788 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006790
Martin v. Löwis18e16552006-02-15 17:27:45 +00006791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6793$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006794
6795
6796
Martin v. Löwis18e16552006-02-15 17:27:45 +00006797cat >>confdefs.h <<_ACEOF
6798#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6799_ACEOF
6800
6801
Christian Heimes400adb02008-02-01 08:12:03 +00006802# The cast to long int works around a bug in the HP C Compiler
6803# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6804# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6805# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6807$as_echo_n "checking size of pid_t... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006808if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006809 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006810else
Matthias Kloseb9621712010-04-24 17:59:49 +00006811 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 +00006812
Christian Heimes400adb02008-02-01 08:12:03 +00006813else
Matthias Kloseb9621712010-04-24 17:59:49 +00006814 if test "$ac_cv_type_pid_t" = yes; then
6815 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6816$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006817{ as_fn_set_status 77
6818as_fn_error "cannot compute sizeof (pid_t)
6819See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006820 else
6821 ac_cv_sizeof_pid_t=0
6822 fi
6823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006824
Christian Heimes400adb02008-02-01 08:12:03 +00006825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6827$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006828
6829
6830
6831cat >>confdefs.h <<_ACEOF
6832#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6833_ACEOF
6834
6835
Michael W. Hudson54241132001-12-07 15:38:26 +00006836
Matthias Kloseb9621712010-04-24 17:59:49 +00006837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6838$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006839have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006841/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006842
Martin v. Löwis11437992002-04-12 09:54:03 +00006843int
6844main ()
6845{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006846long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006847 ;
6848 return 0;
6849}
6850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006851if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006852
6853
Matthias Kloseb9621712010-04-24 17:59:49 +00006854$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006855
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006856 have_long_long=yes
6857
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6861$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006862if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006863# The cast to long int works around a bug in the HP C Compiler
6864# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6865# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6866# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6868$as_echo_n "checking size of long long... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006869if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006870 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006871else
Matthias Kloseb9621712010-04-24 17:59:49 +00006872 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 +00006873
Martin v. Löwis11437992002-04-12 09:54:03 +00006874else
Matthias Kloseb9621712010-04-24 17:59:49 +00006875 if test "$ac_cv_type_long_long" = yes; then
6876 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6877$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006878{ as_fn_set_status 77
6879as_fn_error "cannot compute sizeof (long long)
6880See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006881 else
6882 ac_cv_sizeof_long_long=0
6883 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006885
Martin v. Löwis11437992002-04-12 09:54:03 +00006886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6888$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006889
6890
6891
Martin v. Löwis11437992002-04-12 09:54:03 +00006892cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006893#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006894_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006895
Michael W. Hudson54241132001-12-07 15:38:26 +00006896
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006897fi
6898
Matthias Kloseb9621712010-04-24 17:59:49 +00006899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6900$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006901have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006903/* end confdefs.h. */
6904
6905int
6906main ()
6907{
6908long double x; x = (long double)0;
6909 ;
6910 return 0;
6911}
6912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006913if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006914
6915
Matthias Kloseb9621712010-04-24 17:59:49 +00006916$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006917
6918 have_long_double=yes
6919
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006920fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6923$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006924if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006925# The cast to long int works around a bug in the HP C Compiler
6926# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6927# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6928# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6930$as_echo_n "checking size of long double... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006931if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006932 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006933else
Matthias Kloseb9621712010-04-24 17:59:49 +00006934 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 +00006935
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006936else
Matthias Kloseb9621712010-04-24 17:59:49 +00006937 if test "$ac_cv_type_long_double" = yes; then
6938 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6939$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006940{ as_fn_set_status 77
6941as_fn_error "cannot compute sizeof (long double)
6942See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006943 else
6944 ac_cv_sizeof_long_double=0
6945 fi
6946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006947
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6950$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006951
6952
6953
6954cat >>confdefs.h <<_ACEOF
6955#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6956_ACEOF
6957
6958
6959fi
6960
6961
Matthias Kloseb9621712010-04-24 17:59:49 +00006962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6963$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006964have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00006966/* end confdefs.h. */
6967
6968int
6969main ()
6970{
6971_Bool x; x = (_Bool)0;
6972 ;
6973 return 0;
6974}
6975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006976if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00006977
6978
Matthias Kloseb9621712010-04-24 17:59:49 +00006979$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00006980
6981 have_c99_bool=yes
6982
Thomas Woutersb2137042007-02-01 18:02:27 +00006983fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
6986$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006987if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006988# The cast to long int works around a bug in the HP C Compiler
6989# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6990# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6991# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
6993$as_echo_n "checking size of _Bool... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02006994if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006995 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00006996else
Matthias Kloseb9621712010-04-24 17:59:49 +00006997 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 +00006998
Thomas Woutersb2137042007-02-01 18:02:27 +00006999else
Matthias Kloseb9621712010-04-24 17:59:49 +00007000 if test "$ac_cv_type__Bool" = yes; then
7001 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7002$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007003{ as_fn_set_status 77
7004as_fn_error "cannot compute sizeof (_Bool)
7005See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007006 else
7007 ac_cv_sizeof__Bool=0
7008 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007010
Thomas Woutersb2137042007-02-01 18:02:27 +00007011fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7013$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007014
7015
7016
Thomas Woutersb2137042007-02-01 18:02:27 +00007017cat >>confdefs.h <<_ACEOF
7018#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7019_ACEOF
7020
7021
7022fi
7023
Matthias Kloseb9621712010-04-24 17:59:49 +00007024ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007025 #include <stdint.h>
7026 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007027 #ifdef HAVE_INTTYPES_H
7028 #include <inttypes.h>
7029 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007030"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007031if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007032
7033cat >>confdefs.h <<_ACEOF
7034#define HAVE_UINTPTR_T 1
7035_ACEOF
7036
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007037# The cast to long int works around a bug in the HP C Compiler
7038# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7039# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7040# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7042$as_echo_n "checking size of uintptr_t... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007043if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007044 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007045else
Matthias Kloseb9621712010-04-24 17:59:49 +00007046 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 +00007047
Martin v. Löwis11437992002-04-12 09:54:03 +00007048else
Matthias Kloseb9621712010-04-24 17:59:49 +00007049 if test "$ac_cv_type_uintptr_t" = yes; then
7050 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7051$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007052{ as_fn_set_status 77
7053as_fn_error "cannot compute sizeof (uintptr_t)
7054See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007055 else
7056 ac_cv_sizeof_uintptr_t=0
7057 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007058fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007059
Martin v. Löwis11437992002-04-12 09:54:03 +00007060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7062$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007063
7064
7065
Martin v. Löwis11437992002-04-12 09:54:03 +00007066cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007067#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007068_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007069
Michael W. Hudson54241132001-12-07 15:38:26 +00007070
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007071fi
7072
Thomas Wouters89f507f2006-12-13 04:49:30 +00007073
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007074# The cast to long int works around a bug in the HP C Compiler
7075# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7076# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7077# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7079$as_echo_n "checking size of off_t... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007080if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007081 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007082else
Matthias Kloseb9621712010-04-24 17:59:49 +00007083 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007084#ifdef HAVE_SYS_TYPES_H
7085#include <sys/types.h>
7086#endif
7087
Matthias Kloseb9621712010-04-24 17:59:49 +00007088"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007089
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007090else
Matthias Kloseb9621712010-04-24 17:59:49 +00007091 if test "$ac_cv_type_off_t" = yes; then
7092 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7093$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007094{ as_fn_set_status 77
7095as_fn_error "cannot compute sizeof (off_t)
7096See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007097 else
7098 ac_cv_sizeof_off_t=0
7099 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007101
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7104$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007105
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007106
7107
Martin v. Löwis11437992002-04-12 09:54:03 +00007108cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007109#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007110_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007111
Michael W. Hudson54241132001-12-07 15:38:26 +00007112
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007113
Matthias Kloseb9621712010-04-24 17:59:49 +00007114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7115$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007116if test "$have_long_long" = yes
7117then
7118if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007119 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007120
Matthias Kloseb9621712010-04-24 17:59:49 +00007121$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007122
Matthias Kloseb9621712010-04-24 17:59:49 +00007123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7124$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007125else
Matthias Kloseb9621712010-04-24 17:59:49 +00007126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7127$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007128fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007129else
Matthias Kloseb9621712010-04-24 17:59:49 +00007130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7131$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007132fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007133
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007134# The cast to long int works around a bug in the HP C Compiler
7135# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7136# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7137# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7139$as_echo_n "checking size of time_t... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007140if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007141 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007142else
Matthias Kloseb9621712010-04-24 17:59:49 +00007143 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007144#ifdef HAVE_SYS_TYPES_H
7145#include <sys/types.h>
7146#endif
7147#ifdef HAVE_TIME_H
7148#include <time.h>
7149#endif
7150
Matthias Kloseb9621712010-04-24 17:59:49 +00007151"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007152
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007153else
Matthias Kloseb9621712010-04-24 17:59:49 +00007154 if test "$ac_cv_type_time_t" = yes; then
7155 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7156$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007157{ as_fn_set_status 77
7158as_fn_error "cannot compute sizeof (time_t)
7159See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007160 else
7161 ac_cv_sizeof_time_t=0
7162 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007163fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007164
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7167$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007168
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007169
7170
Martin v. Löwis11437992002-04-12 09:54:03 +00007171cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007172#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007173_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007174
Michael W. Hudson54241132001-12-07 15:38:26 +00007175
7176
Trent Mick635f6fb2000-08-23 21:33:05 +00007177# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007178ac_save_cc="$CC"
7179if test "$ac_cv_kpthread" = "yes"
7180then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007181elif test "$ac_cv_kthread" = "yes"
7182then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007183elif test "$ac_cv_pthread" = "yes"
7184then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007185fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007186
Matthias Kloseb9621712010-04-24 17:59:49 +00007187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7188$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007189have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007191/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007192
7193 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007194int
7195main ()
7196{
Guido van Rossum12580492000-09-24 16:47:19 +00007197pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007198 ;
7199 return 0;
7200}
Matthias Kloseb159a552010-04-25 21:00:44 +00007201
Martin v. Löwis11437992002-04-12 09:54:03 +00007202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007203if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007204 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7208$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007209if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007210 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007211# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7212# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7213# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7215$as_echo_n "checking size of pthread_t... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007216if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007217 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007218else
Matthias Kloseb9621712010-04-24 17:59:49 +00007219 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007220#ifdef HAVE_PTHREAD_H
7221#include <pthread.h>
7222#endif
7223
Matthias Kloseb9621712010-04-24 17:59:49 +00007224"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007225
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007226else
Matthias Kloseb9621712010-04-24 17:59:49 +00007227 if test "$ac_cv_type_pthread_t" = yes; then
7228 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7229$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007230{ as_fn_set_status 77
7231as_fn_error "cannot compute sizeof (pthread_t)
7232See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007233 else
7234 ac_cv_sizeof_pthread_t=0
7235 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007236fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007237
Trent Mick635f6fb2000-08-23 21:33:05 +00007238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7240$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007241
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007242
7243
Martin v. Löwis11437992002-04-12 09:54:03 +00007244cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007245#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007246_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007247
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007248
Trent Mick635f6fb2000-08-23 21:33:05 +00007249fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007250CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007251
Michael W. Hudson54241132001-12-07 15:38:26 +00007252
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007253case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007254 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007255 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7256 ;;
7257 Darwin/*)
7258 OTHER_LIBTOOL_OPT=""
7259 ;;
7260esac
7261
7262
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007263ARCH_RUN_32BIT=""
7264
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007265case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007266 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007267 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7268 if test "${enable_universalsdk}"; then
7269 :
7270 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007271 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007272 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007273 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007274 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007275 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007276 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007277 if test ${gcc_version} '<' 4.0
7278 then
7279 LIBTOOL_CRUFT="-lcc_dynamic"
7280 else
7281 LIBTOOL_CRUFT=""
7282 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007283 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007284 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007285else
Matthias Kloseb9621712010-04-24 17:59:49 +00007286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007287/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007288
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007289 #include <unistd.h>
7290 int main(int argc, char*argv[])
7291 {
7292 if (sizeof(long) == 4) {
7293 return 0;
7294 } else {
7295 return 1;
7296 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007297 }
7298
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007300if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007301 ac_osx_32bit=yes
7302else
Matthias Kloseb9621712010-04-24 17:59:49 +00007303 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007304fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007305rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7306 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007307fi
7308
7309
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007310 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007311 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007312 i386)
7313 MACOSX_DEFAULT_ARCH="i386"
7314 ;;
7315 ppc)
7316 MACOSX_DEFAULT_ARCH="ppc"
7317 ;;
7318 *)
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007319 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007320 ;;
7321 esac
7322 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007323 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007324 i386)
7325 MACOSX_DEFAULT_ARCH="x86_64"
7326 ;;
7327 ppc)
7328 MACOSX_DEFAULT_ARCH="ppc64"
7329 ;;
7330 *)
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007331 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007332 ;;
7333 esac
7334
7335 #ARCH_RUN_32BIT="true"
7336 fi
7337
7338 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007339 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007340 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007341esac
7342
Matthias Kloseb9621712010-04-24 17:59:49 +00007343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7344$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007345if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007346then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007347 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007348 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007349 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007350
Matthias Kloseb9621712010-04-24 17:59:49 +00007351$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007352
Matthias Kloseb9621712010-04-24 17:59:49 +00007353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7354$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007355 if test $enable_shared = "yes"
7356 then
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007357 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 +00007358 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007359else
Matthias Kloseb9621712010-04-24 17:59:49 +00007360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7361$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007362fi
7363
Matthias Kloseb9621712010-04-24 17:59:49 +00007364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7365$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007366case $ac_sys_system/$ac_sys_release in
7367 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007368
Matthias Kloseb9621712010-04-24 17:59:49 +00007369$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007370
Matthias Kloseb9621712010-04-24 17:59:49 +00007371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7372$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007373 ;;
7374 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7376$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007377 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007378esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007379
Guido van Rossum0a516c91994-09-12 10:58:40 +00007380# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007381
Michael W. Hudson54241132001-12-07 15:38:26 +00007382
7383
7384
7385
Benjamin Peterson99f03762010-04-11 22:15:28 +00007386
Thomas Wouters477c8d52006-05-27 19:21:47 +00007387
Georg Brandlb1441c72009-01-03 22:33:39 +00007388
Thomas Wouters477c8d52006-05-27 19:21:47 +00007389cat >>confdefs.h <<_ACEOF
7390#define SHLIB_EXT "$SO"
7391_ACEOF
7392
Guido van Rossum0a516c91994-09-12 10:58:40 +00007393# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007394# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007395# (Shared libraries in this instance are shared modules to be loaded into
7396# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7398$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007399if test -z "$LDSHARED"
7400then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007401 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007402 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007403 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007404 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007405 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007406 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007407 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007408 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007409 if test "$GCC" = "yes" ; then
7410 LDSHARED='$(CC) -shared'
7411 LDCXXSHARED='$(CXX) -shared'
7412 else
7413 LDSHARED='$(CC) -G'
7414 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007415 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007416 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007417 if test "$GCC" = "yes" ; then
7418 LDSHARED='$(CC) -shared'
7419 LDCXXSHARED='$(CXX) -shared'
7420 else
7421 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007422 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007423 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007424 LDSHARED='$(CC) -bundle'
7425 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007426 if test "$enable_framework" ; then
7427 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007428 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7429 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007430 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007431 else
7432 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007433 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007434 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007435 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007436 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007437 LDSHARED='$(CC) -bundle'
7438 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007439 if test "$enable_framework" ; then
7440 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007441 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7442 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007443 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007444 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007445 # No framework, use the Python app as bundle-loader
7446 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007447 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007448 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007449 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007450 Darwin/*)
7451 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7452 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007453
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007454 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007455 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007456 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007457 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007458 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007459 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7460 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007461 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007462 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007463 LDSHARED='$(CC) -bundle'
7464 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007465 if test "$enable_framework" ; then
7466 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007467 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7468 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007469 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007470 else
7471 # No framework, use the Python app as bundle-loader
7472 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7473 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007474 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007475 fi
7476 fi
7477 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007478 Linux*|GNU*|QNX*)
7479 LDSHARED='$(CC) -shared'
7480 LDCXXSHARED='$(CXX) -shared';;
7481 BSD/OS*/4*)
7482 LDSHARED="gcc -shared"
7483 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007484 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007485 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007486 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007487 LDSHARED='$(CC) -shared'
7488 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007489 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007490 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007491 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007492 OpenBSD*)
7493 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7494 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007495 LDSHARED='$(CC) -shared $(CCSHARED)'
7496 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007497 else
7498 case `uname -r` in
7499 [01].* | 2.[0-7] | 2.[0-7].*)
7500 LDSHARED="ld -Bshareable ${LDFLAGS}"
7501 ;;
7502 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007503 LDSHARED='$(CC) -shared $(CCSHARED)'
7504 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007505 ;;
7506 esac
7507 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007508 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007509 LDSHARED='$(CC) -shared'
7510 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007511 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007512 if test "$GCC" = "yes" ; then
7513 LDSHARED='$(CC) -shared'
7514 LDCXXSHARED='$(CXX) -shared'
7515 else
7516 LDSHARED='$(CC) -G'
7517 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007518 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007519 SCO_SV*)
7520 LDSHARED='$(CC) -Wl,-G,-Bexport'
7521 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7522 CYGWIN*)
7523 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7524 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007525 *) LDSHARED="ld";;
7526 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007527fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7529$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007530LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007531BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007532# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007533# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7535$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007536if test -z "$CCSHARED"
7537then
Guido van Rossum07397971997-04-29 21:49:50 +00007538 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007539 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007540 then CCSHARED="-fPIC";
7541 elif test `uname -p` = sparc;
7542 then CCSHARED="-xcode=pic32";
7543 else CCSHARED="-Kpic";
7544 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007545 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007546 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007547 else CCSHARED="+z";
7548 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007549 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007550 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007551 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007552 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007553 if test "$GCC" = "yes"
7554 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007555 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007556 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007557 SCO_SV*)
7558 if test "$GCC" = "yes"
7559 then CCSHARED="-fPIC"
7560 else CCSHARED="-Kpic -belf"
7561 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007562 IRIX*/6*) case $CC in
7563 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007564 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007565 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007566 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7569$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007570# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007571# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7573$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007574if test -z "$LINKFORSHARED"
7575then
Guido van Rossum07397971997-04-29 21:49:50 +00007576 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007577 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007578 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007579 LINKFORSHARED="-Wl,-E -Wl,+s";;
7580# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007581 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007582 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007583 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007584 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007585 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007586 if test "$enable_framework"
7587 then
Jack Jansenda49e192005-01-07 13:08:22 +00007588 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007589 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007590 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007591 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007592 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007593 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007594 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007595 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7596 then
7597 LINKFORSHARED="-Wl,--export-dynamic"
7598 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007599 SunOS/5*) case $CC in
7600 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007601 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007602 then
7603 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007604 fi;;
7605 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007606 CYGWIN*)
7607 if test $enable_shared = "no"
7608 then
7609 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7610 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007611 QNX*)
7612 # -Wl,-E causes the symbols to be added to the dynamic
7613 # symbol table so that they can be found when a module
7614 # is loaded. -N 2048K causes the stack size to be set
7615 # to 2048 kilobytes so that the stack doesn't overflow
7616 # when running test_compile.py.
7617 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007618 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7621$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007622
Michael W. Hudson54241132001-12-07 15:38:26 +00007623
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007624
Matthias Kloseb9621712010-04-24 17:59:49 +00007625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7626$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007627if test ! "$LIBRARY" = "$LDLIBRARY"
7628then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007629 case $ac_sys_system in
7630 CYGWIN*)
7631 # Cygwin needs CCSHARED when building extension DLLs
7632 # but not when building the interpreter DLL.
7633 CFLAGSFORSHARED='';;
7634 *)
7635 CFLAGSFORSHARED='$(CCSHARED)'
7636 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7639$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007640
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007641# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7642# library (with --enable-shared).
7643# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007644# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7645# if it is not required, since it creates a dependency of the shared library
7646# to LIBS. This, in turn, means that applications linking the shared libpython
7647# don't need to link LIBS explicitly. The default should be only changed
7648# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007649
Matthias Kloseb9621712010-04-24 17:59:49 +00007650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7651$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007652case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007653 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007654 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007655esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7657$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007658
7659
Guido van Rossum627b2d71993-12-24 10:39:16 +00007660# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7662$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007663if test "${ac_cv_lib_sendfile_sendfile+set}" = set; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007664 $as_echo_n "(cached) " >&6
7665else
7666 ac_check_lib_save_LIBS=$LIBS
7667LIBS="-lsendfile $LIBS"
7668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7669/* end confdefs.h. */
7670
7671/* Override any GCC internal prototype to avoid an error.
7672 Use char because int might match the return type of a GCC
7673 builtin and then its argument prototype would still apply. */
7674#ifdef __cplusplus
7675extern "C"
7676#endif
7677char sendfile ();
7678int
7679main ()
7680{
7681return sendfile ();
7682 ;
7683 return 0;
7684}
7685_ACEOF
7686if ac_fn_c_try_link "$LINENO"; then :
7687 ac_cv_lib_sendfile_sendfile=yes
7688else
7689 ac_cv_lib_sendfile_sendfile=no
7690fi
7691rm -f core conftest.err conftest.$ac_objext \
7692 conftest$ac_exeext conftest.$ac_ext
7693LIBS=$ac_check_lib_save_LIBS
7694fi
7695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7696$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007697if test "x$ac_cv_lib_sendfile_sendfile" = x""yes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007698 cat >>confdefs.h <<_ACEOF
7699#define HAVE_LIBSENDFILE 1
7700_ACEOF
7701
7702 LIBS="-lsendfile $LIBS"
7703
7704fi
7705
Matthias Kloseb9621712010-04-24 17:59:49 +00007706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7707$as_echo_n "checking for dlopen in -ldl... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007708if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007709 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007710else
Martin v. Löwis11437992002-04-12 09:54:03 +00007711 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007712LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007715
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007716/* Override any GCC internal prototype to avoid an error.
7717 Use char because int might match the return type of a GCC
7718 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007719#ifdef __cplusplus
7720extern "C"
7721#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007722char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007723int
7724main ()
7725{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007726return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007727 ;
7728 return 0;
7729}
7730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007731if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007732 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007733else
Matthias Kloseb9621712010-04-24 17:59:49 +00007734 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007736rm -f core conftest.err conftest.$ac_objext \
7737 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007738LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7741$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007742if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007743 cat >>confdefs.h <<_ACEOF
7744#define HAVE_LIBDL 1
7745_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007746
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007747 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007748
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007749fi
7750 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7752$as_echo_n "checking for shl_load in -ldld... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007753if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007754 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007755else
Martin v. Löwis11437992002-04-12 09:54:03 +00007756 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007757LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007761/* Override any GCC internal prototype to avoid an error.
7762 Use char because int might match the return type of a GCC
7763 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007764#ifdef __cplusplus
7765extern "C"
7766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007767char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007768int
7769main ()
7770{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007771return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007772 ;
7773 return 0;
7774}
7775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007776if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007777 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007778else
Matthias Kloseb9621712010-04-24 17:59:49 +00007779 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007781rm -f core conftest.err conftest.$ac_objext \
7782 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007783LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7786$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007787if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007788 cat >>confdefs.h <<_ACEOF
7789#define HAVE_LIBDLD 1
7790_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007791
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007792 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007793
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007794fi
7795 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007796
Georg Brandlb1441c72009-01-03 22:33:39 +00007797# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007798if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7800$as_echo_n "checking for library containing sem_init... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007801if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007802 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007803else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007804 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007808/* Override any GCC internal prototype to avoid an error.
7809 Use char because int might match the return type of a GCC
7810 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007811#ifdef __cplusplus
7812extern "C"
7813#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007814char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007815int
7816main ()
7817{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007819 ;
7820 return 0;
7821}
7822_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007823for ac_lib in '' pthread rt posix4; do
7824 if test -z "$ac_lib"; then
7825 ac_res="none required"
7826 else
7827 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007828 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007829 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007830 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007833rm -f core conftest.err conftest.$ac_objext \
7834 conftest$ac_exeext
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007835 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007836 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007838done
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007839if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007840
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007841else
7842 ac_cv_search_sem_init=no
7843fi
7844rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007845LIBS=$ac_func_search_save_LIBS
7846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7848$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007849ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007850if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007851 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007852
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007853fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007854 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007855 # posix4 on Solaris 2.6
7856 # pthread (first!) on Linux
7857fi
7858
Martin v. Löwis19d17342003-06-14 21:03:05 +00007859# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7861$as_echo_n "checking for textdomain in -lintl... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007862if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007863 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007864else
7865 ac_check_lib_save_LIBS=$LIBS
7866LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007868/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007870/* Override any GCC internal prototype to avoid an error.
7871 Use char because int might match the return type of a GCC
7872 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007873#ifdef __cplusplus
7874extern "C"
7875#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007876char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007877int
7878main ()
7879{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007881 ;
7882 return 0;
7883}
7884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007885if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007886 ac_cv_lib_intl_textdomain=yes
7887else
Matthias Kloseb9621712010-04-24 17:59:49 +00007888 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007890rm -f core conftest.err conftest.$ac_objext \
7891 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007892LIBS=$ac_check_lib_save_LIBS
7893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7895$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007896if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007897
Matthias Kloseb9621712010-04-24 17:59:49 +00007898$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007899
Brett Cannonc6d936e2009-06-07 20:09:53 +00007900 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007901fi
7902
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007903
7904# checks for system dependent C++ extensions support
7905case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007906 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7907$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007909/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007910
Georg Brandl59e87bd2011-02-15 19:48:59 +00007911 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007912int
7913main ()
7914{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007915loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007916 ;
7917 return 0;
7918}
Matthias Kloseb159a552010-04-25 21:00:44 +00007919
Martin v. Löwis11437992002-04-12 09:54:03 +00007920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007921if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007922
Matthias Kloseb159a552010-04-25 21:00:44 +00007923
Matthias Kloseb9621712010-04-24 17:59:49 +00007924$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007925
Matthias Kloseb159a552010-04-25 21:00:44 +00007926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007927$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007928
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007929else
Matthias Kloseb159a552010-04-25 21:00:44 +00007930
7931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007932$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007933
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007935rm -f core conftest.err conftest.$ac_objext \
7936 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007937 *) ;;
7938esac
7939
Guido van Rossum70c7f481998-03-26 18:44:10 +00007940# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7942$as_echo_n "checking for t_open in -lnsl... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007943if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007944 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007945else
Martin v. Löwis11437992002-04-12 09:54:03 +00007946 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007947LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951/* Override any GCC internal prototype to avoid an error.
7952 Use char because int might match the return type of a GCC
7953 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007954#ifdef __cplusplus
7955extern "C"
7956#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007957char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007958int
7959main ()
7960{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007961return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007962 ;
7963 return 0;
7964}
7965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007966if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007967 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007968else
Matthias Kloseb9621712010-04-24 17:59:49 +00007969 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007971rm -f core conftest.err conftest.$ac_objext \
7972 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007973LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
7976$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007977if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007978 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007979fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00007980 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00007981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7982$as_echo_n "checking for socket in -lsocket... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02007983if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007984 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007985else
Martin v. Löwis11437992002-04-12 09:54:03 +00007986 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007987LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007990
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007991/* Override any GCC internal prototype to avoid an error.
7992 Use char because int might match the return type of a GCC
7993 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007994#ifdef __cplusplus
7995extern "C"
7996#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007997char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007998int
7999main ()
8000{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008001return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008002 ;
8003 return 0;
8004}
8005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008006if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008007 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008008else
Matthias Kloseb9621712010-04-24 17:59:49 +00008009 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008011rm -f core conftest.err conftest.$ac_objext \
8012 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008013LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8016$as_echo "$ac_cv_lib_socket_socket" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02008017if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008018 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008019fi
8020 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008021
Matthias Kloseb9621712010-04-24 17:59:49 +00008022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8023$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008024
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008025# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008026if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008027 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8029$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008030LIBS="$withval $LIBS"
8031
8032else
Matthias Kloseb9621712010-04-24 17:59:49 +00008033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8034$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008035fi
8036
Guido van Rossum7f43da71994-08-01 12:15:30 +00008037
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008038if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008039 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8040set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8042$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02008043if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008044 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008045else
8046 case $PKG_CONFIG in
8047 [\\/]* | ?:[\\/]*)
8048 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8049 ;;
8050 *)
8051 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8052for as_dir in $PATH
8053do
8054 IFS=$as_save_IFS
8055 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008056 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008057 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8058 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008059 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008060 break 2
8061 fi
8062done
Matthias Kloseb9621712010-04-24 17:59:49 +00008063 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008064IFS=$as_save_IFS
8065
8066 ;;
8067esac
8068fi
8069PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8070if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8072$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008073else
Matthias Kloseb9621712010-04-24 17:59:49 +00008074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8075$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008076fi
8077
8078
8079fi
8080if test -z "$ac_cv_path_PKG_CONFIG"; then
8081 ac_pt_PKG_CONFIG=$PKG_CONFIG
8082 # Extract the first word of "pkg-config", so it can be a program name with args.
8083set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8085$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02008086if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008087 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008088else
8089 case $ac_pt_PKG_CONFIG in
8090 [\\/]* | ?:[\\/]*)
8091 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8092 ;;
8093 *)
8094 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8095for as_dir in $PATH
8096do
8097 IFS=$as_save_IFS
8098 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008099 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008100 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8101 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008102 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008103 break 2
8104 fi
8105done
Matthias Kloseb9621712010-04-24 17:59:49 +00008106 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008107IFS=$as_save_IFS
8108
8109 ;;
8110esac
8111fi
8112ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8113if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8115$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008116else
Matthias Kloseb9621712010-04-24 17:59:49 +00008117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8118$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008119fi
8120
8121 if test "x$ac_pt_PKG_CONFIG" = x; then
8122 PKG_CONFIG=""
8123 else
8124 case $cross_compiling:$ac_tool_warned in
8125yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008126{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8127$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008128ac_tool_warned=yes ;;
8129esac
8130 PKG_CONFIG=$ac_pt_PKG_CONFIG
8131 fi
8132else
8133 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8134fi
8135
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008136
8137# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8139$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008140
8141# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008142if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008143 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008144else
8145 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008146fi
8147
8148
Matthias Kloseb9621712010-04-24 17:59:49 +00008149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8150$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008151
8152# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8154$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008155
8156# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008157if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008158 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008159else
8160 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008161fi
8162
8163
8164if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008165 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8166else
8167 LIBFFI_INCLUDEDIR=""
8168fi
8169
8170
Matthias Kloseb9621712010-04-24 17:59:49 +00008171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8172$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008173
Benjamin Peterson076ed002010-10-31 17:11:02 +00008174# Check for support for loadable sqlite extensions
8175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8176$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8177# Check whether --enable-loadable-sqlite-extensions was given.
8178if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8179 enableval=$enable_loadable_sqlite_extensions;
8180else
8181 enable_loadable_sqlite_extensions="no"
8182fi
8183
8184
8185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8186$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8187
Matthias Klose55708cc2009-04-30 08:06:49 +00008188# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8190$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008191
8192# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008193if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008194 withval=$with_dbmliborder;
8195if test x$with_dbmliborder = xyes
8196then
Antoine Pitrou6f26be02011-05-03 18:18:59 +02008197as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008198else
8199 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8200 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8201 then
Antoine Pitrou6f26be02011-05-03 18:18:59 +02008202 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008203 fi
8204 done
8205fi
8206fi
8207
Matthias Kloseb9621712010-04-24 17:59:49 +00008208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8209$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008210
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008211# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008212
8213
Matthias Kloseb9621712010-04-24 17:59:49 +00008214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8215$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008216
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008217# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008218if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008219 withval=$with_signal_module;
8220fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008221
8222
8223if test -z "$with_signal_module"
8224then with_signal_module="yes"
8225fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8227$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008228
8229if test "${with_signal_module}" = "yes"; then
8230 USE_SIGNAL_MODULE=""
8231 SIGNAL_OBJS=""
8232else
8233 USE_SIGNAL_MODULE="#"
8234 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8235fi
8236
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008237# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008238
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008239USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008241
Martin v. Löwis11437992002-04-12 09:54:03 +00008242
8243# Templates for things AC_DEFINEd more than once.
8244# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008245
8246
Martin v. Löwis11437992002-04-12 09:54:03 +00008247
8248
Matthias Kloseb9621712010-04-24 17:59:49 +00008249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8250$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008251
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008252# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008253if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008254 withval=$with_threads;
8255fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008256
8257
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008258# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008259
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008260# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008261if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008262 withval=$with_thread; with_threads=$with_thread
8263fi
8264
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008265
8266if test -z "$with_threads"
8267then with_threads="yes"
8268fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8270$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008271
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008272
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008273if test "$with_threads" = "no"
8274then
8275 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008276elif test "$ac_cv_pthread_is_default" = yes
8277then
Matthias Kloseb9621712010-04-24 17:59:49 +00008278 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008279
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008280 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008281 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008282
8283 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008284 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008285elif test "$ac_cv_kpthread" = "yes"
8286then
8287 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008288 if test "$ac_cv_cxx_thread" = "yes"; then
8289 CXX="$CXX -Kpthread"
8290 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008291 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008292
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008293 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008294 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008295elif test "$ac_cv_kthread" = "yes"
8296then
8297 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008298 if test "$ac_cv_cxx_thread" = "yes"; then
8299 CXX="$CXX -Kthread"
8300 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008301 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008302
8303 posix_threads=yes
8304 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008305elif test "$ac_cv_pthread" = "yes"
8306then
8307 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008308 if test "$ac_cv_cxx_thread" = "yes"; then
8309 CXX="$CXX -pthread"
8310 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008311 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008312
8313 posix_threads=yes
8314 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008315else
8316 if test ! -z "$with_threads" -a -d "$with_threads"
8317 then LDFLAGS="$LDFLAGS -L$with_threads"
8318 fi
8319 if test ! -z "$withval" -a -d "$withval"
8320 then LDFLAGS="$LDFLAGS -L$withval"
8321 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008322
8323 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008324 # define _POSIX_THREADS in unistd.h. Some apparently don't
8325 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8327$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008329/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008330
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008331#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008332#ifdef _POSIX_THREADS
8333yes
8334#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008335
8336_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008337if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008338 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008339 unistd_defines_pthreads=yes
8340else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008341 unistd_defines_pthreads=no
8342fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008343rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008344
Matthias Kloseb9621712010-04-24 17:59:49 +00008345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8346$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008347
Matthias Kloseb9621712010-04-24 17:59:49 +00008348 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008349
Matthias Kloseb9621712010-04-24 17:59:49 +00008350 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02008351if test "x$ac_cv_header_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008352 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008353
Matthias Kloseb9621712010-04-24 17:59:49 +00008354 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008355
Martin v. Löwis11437992002-04-12 09:54:03 +00008356
Matthias Kloseb9621712010-04-24 17:59:49 +00008357$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008358
8359 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008360 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008361else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008362
Matthias Kloseb9621712010-04-24 17:59:49 +00008363 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02008364if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008365 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008366
Matthias Kloseb9621712010-04-24 17:59:49 +00008367 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008368
Martin v. Löwis11437992002-04-12 09:54:03 +00008369
Matthias Kloseb9621712010-04-24 17:59:49 +00008370$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008371
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008372 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008373else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008374
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008375 # Just looking for pthread_create in libpthread is not enough:
8376 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8377 # So we really have to include pthread.h, and then link.
8378 _libs=$LIBS
8379 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8381$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008383/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008384#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008385
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008386void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008387int
8388main ()
8389{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008390
8391pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008392 ;
8393 return 0;
8394}
8395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008396if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008397
Matthias Kloseb9621712010-04-24 17:59:49 +00008398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8399$as_echo "yes" >&6; }
8400 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008401
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008402 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008403 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008404else
Martin v. Löwis11437992002-04-12 09:54:03 +00008405
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008406 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008407 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02008408if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008409 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008410
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008411 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008412 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008413else
Guido van Rossumad678af1998-10-02 14:42:15 +00008414
Matthias Kloseb9621712010-04-24 17:59:49 +00008415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8416$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02008417if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008418 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008419else
Martin v. Löwis11437992002-04-12 09:54:03 +00008420 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008421LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008423/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008424
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008425/* Override any GCC internal prototype to avoid an error.
8426 Use char because int might match the return type of a GCC
8427 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008428#ifdef __cplusplus
8429extern "C"
8430#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008431char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008432int
8433main ()
8434{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008435return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008436 ;
8437 return 0;
8438}
8439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008440if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008441 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008442else
Matthias Kloseb9621712010-04-24 17:59:49 +00008443 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008444fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008445rm -f core conftest.err conftest.$ac_objext \
8446 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008447LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008448fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8450$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02008451if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008453
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008454 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008455 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008456 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008457else
Greg Steinadf63d62000-07-05 10:38:09 +00008458
Matthias Kloseb9621712010-04-24 17:59:49 +00008459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8460$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02008461if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008462 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008463else
Martin v. Löwis11437992002-04-12 09:54:03 +00008464 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008465LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008468
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008469/* Override any GCC internal prototype to avoid an error.
8470 Use char because int might match the return type of a GCC
8471 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008472#ifdef __cplusplus
8473extern "C"
8474#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008475char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008476int
8477main ()
8478{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008479return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008480 ;
8481 return 0;
8482}
8483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008484if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008485 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008486else
Matthias Kloseb9621712010-04-24 17:59:49 +00008487 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008489rm -f core conftest.err conftest.$ac_objext \
8490 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008491LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8494$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02008495if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008497
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008498 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008499 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008500 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008501else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008502
Matthias Kloseb9621712010-04-24 17:59:49 +00008503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8504$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02008505if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008506 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008507else
Martin v. Löwis11437992002-04-12 09:54:03 +00008508 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008509LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008511/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008512
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513/* Override any GCC internal prototype to avoid an error.
8514 Use char because int might match the return type of a GCC
8515 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008516#ifdef __cplusplus
8517extern "C"
8518#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008519char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008520int
8521main ()
8522{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008523return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008524 ;
8525 return 0;
8526}
8527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008528if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008529 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008530else
Matthias Kloseb9621712010-04-24 17:59:49 +00008531 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008532fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008533rm -f core conftest.err conftest.$ac_objext \
8534 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008535LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008536fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8538$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02008539if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008540 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008541
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008542 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008543 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008544 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008545else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008546
Matthias Kloseb9621712010-04-24 17:59:49 +00008547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8548$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02008549if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008550 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008551else
Martin v. Löwis11437992002-04-12 09:54:03 +00008552 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008553LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008555/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008556
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008557/* Override any GCC internal prototype to avoid an error.
8558 Use char because int might match the return type of a GCC
8559 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008560#ifdef __cplusplus
8561extern "C"
8562#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008563char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008564int
8565main ()
8566{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008567return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008568 ;
8569 return 0;
8570}
8571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008572if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008573 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008574else
Matthias Kloseb9621712010-04-24 17:59:49 +00008575 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008577rm -f core conftest.err conftest.$ac_objext \
8578 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008579LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8582$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02008583if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008584 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008585
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008586 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008587 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008588 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008589else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008590
Martin v. Löwis130fb172001-07-19 11:00:41 +00008591 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008592fi
8593
Guido van Rossum627b2d71993-12-24 10:39:16 +00008594
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008595fi
8596
Guido van Rossum0be3e491997-05-22 20:33:33 +00008597fi
8598
Guido van Rossum49545951997-12-02 19:28:29 +00008599fi
8600
Guido van Rossumb93a8621998-05-07 13:27:32 +00008601fi
8602
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008603fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008604rm -f core conftest.err conftest.$ac_objext \
8605 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606fi
8607
Martin v. Löwis11437992002-04-12 09:54:03 +00008608
8609fi
8610
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008611
Michael W. Hudson54241132001-12-07 15:38:26 +00008612
Matthias Kloseb9621712010-04-24 17:59:49 +00008613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8614$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02008615if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008616 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008617else
Martin v. Löwis11437992002-04-12 09:54:03 +00008618 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008619LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008621/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008622
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008623/* Override any GCC internal prototype to avoid an error.
8624 Use char because int might match the return type of a GCC
8625 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008626#ifdef __cplusplus
8627extern "C"
8628#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008629char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008630int
8631main ()
8632{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008633return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008634 ;
8635 return 0;
8636}
8637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008638if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008639 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008640else
Matthias Kloseb9621712010-04-24 17:59:49 +00008641 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008643rm -f core conftest.err conftest.$ac_objext \
8644 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008645LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8648$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02008649if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008650 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008651
Martin v. Löwis130fb172001-07-19 11:00:41 +00008652 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008653 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008654 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008655fi
8656
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008657
Neal Norwitza978ab02002-11-02 16:58:05 +00008658 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8660$as_echo_n "checking for thr_create in -lthread... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02008661if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008662 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008663else
Martin v. Löwis11437992002-04-12 09:54:03 +00008664 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008665LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008668
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008669/* Override any GCC internal prototype to avoid an error.
8670 Use char because int might match the return type of a GCC
8671 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008672#ifdef __cplusplus
8673extern "C"
8674#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008675char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008676int
8677main ()
8678{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008679return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 ;
8681 return 0;
8682}
8683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008684if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008685 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008686else
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008689rm -f core conftest.err conftest.$ac_objext \
8690 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008691LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8694$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02008695if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008696 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008697
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008698 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008699 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008700 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008701fi
8702
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008703 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008704fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008705
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008706if test "$posix_threads" = "yes"; then
8707 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008708
Matthias Kloseb9621712010-04-24 17:59:49 +00008709$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008710
8711 fi
8712
8713 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8714 case $ac_sys_system/$ac_sys_release in
8715 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008716$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008717
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008718 ;;
8719 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008720$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008721
8722 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008723 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008724$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008725
8726 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008727 AIX/6)
8728$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8729
8730 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008731 esac
8732
Matthias Kloseb9621712010-04-24 17:59:49 +00008733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8734$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02008735 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008736 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008737else
Matthias Kloseb9621712010-04-24 17:59:49 +00008738 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008739 ac_cv_pthread_system_supported=no
8740else
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008742/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008743#include <pthread.h>
8744 void *foo(void *parm) {
8745 return NULL;
8746 }
8747 main() {
8748 pthread_attr_t attr;
8749 pthread_t id;
8750 if (pthread_attr_init(&attr)) exit(-1);
8751 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8752 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8753 exit(0);
8754 }
8755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008756if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008757 ac_cv_pthread_system_supported=yes
8758else
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008761rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8762 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008763fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008765
Guido van Rossum627b2d71993-12-24 10:39:16 +00008766fi
8767
Matthias Kloseb9621712010-04-24 17:59:49 +00008768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8769$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008770 if test "$ac_cv_pthread_system_supported" = "yes"; then
8771
Matthias Kloseb9621712010-04-24 17:59:49 +00008772$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008773
8774 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008775 for ac_func in pthread_sigmask
8776do :
8777 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02008778if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008779 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008780#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008781_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008782 case $ac_sys_system in
8783 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008784
Matthias Kloseb9621712010-04-24 17:59:49 +00008785$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008786
8787 ;;
8788 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008789fi
8790done
8791
8792fi
8793
8794
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008795# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008796
Matthias Kloseb9621712010-04-24 17:59:49 +00008797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8798$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008799# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008800if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008801 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008802 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8804$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008805 ipv6=no
8806 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008807 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8808$as_echo "yes" >&6; }
8809 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008810
8811 ipv6=yes
8812 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008813 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008814else
Martin v. Löwis11437992002-04-12 09:54:03 +00008815
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008817
Matthias Kloseb9621712010-04-24 17:59:49 +00008818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8819$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008820 ipv6=no
8821
8822else
Matthias Kloseb9621712010-04-24 17:59:49 +00008823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008824/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008825 /* AF_INET6 available check */
8826#include <sys/types.h>
8827#include <sys/socket.h>
8828main()
8829{
8830 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8831 exit(1);
8832 else
8833 exit(0);
8834}
8835
Martin v. Löwis11437992002-04-12 09:54:03 +00008836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008837if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008838
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8840$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008841 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008842
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008843else
Matthias Kloseb159a552010-04-25 21:00:44 +00008844
Matthias Kloseb9621712010-04-24 17:59:49 +00008845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8846$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008847 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008848
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008850rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8851 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008852fi
8853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008854
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008855if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8857$as_echo_n "checking if RFC2553 API is available... " >&6; }
8858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008859/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008860
8861 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008862#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008863int
8864main ()
8865{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008866struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008867 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008868 ;
8869 return 0;
8870}
Matthias Kloseb159a552010-04-25 21:00:44 +00008871
Martin v. Löwis11437992002-04-12 09:54:03 +00008872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008873if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008874
8875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008876$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008877 ipv6=yes
8878
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008879else
Matthias Kloseb159a552010-04-25 21:00:44 +00008880
8881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008882$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008883 ipv6=no
8884
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008887fi
8888
8889if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008890 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008891
8892fi
8893
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008894fi
8895
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008896
8897ipv6type=unknown
8898ipv6lib=none
8899ipv6trylibc=no
8900
8901if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8903$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008904 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8905 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008906 case $i in
8907 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008909/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008910
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008911#include <netinet/in.h>
8912#ifdef IPV6_INRIA_VERSION
8913yes
8914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008915_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008916if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008917 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008918 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008919fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008920rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008921
8922 ;;
8923 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008925/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008926
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008927#include <netinet/in.h>
8928#ifdef __KAME__
8929yes
8930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008931_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008932if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008933 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008934 ipv6type=$i;
8935 ipv6lib=inet6
8936 ipv6libdir=/usr/local/v6/lib
8937 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008938fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008939rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008940
8941 ;;
8942 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008944/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008945
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008946#include <features.h>
8947#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8948yes
8949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008950_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008951if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008952 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008953 ipv6type=$i;
8954 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008955fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008956rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008957
8958 ;;
8959 linux-inet6)
8960 if test -d /usr/inet6; then
8961 ipv6type=$i
8962 ipv6lib=inet6
8963 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008964 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008965 fi
8966 ;;
8967 solaris)
8968 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00008969 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008970 ipv6type=$i
8971 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008972 fi
8973 fi
8974 ;;
8975 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00008976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008977/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008978
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008979#include <sys/param.h>
8980#ifdef _TOSHIBA_INET6
8981yes
8982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008983_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008985 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008986 ipv6type=$i;
8987 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008988 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008989fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008990rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008991
8992 ;;
8993 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00008994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008995/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008996
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008997#include </usr/local/v6/include/sys/v6config.h>
8998#ifdef __V6D__
8999yes
9000#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009001_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009002if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009003 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009004 ipv6type=$i;
9005 ipv6lib=v6;
9006 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009007 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009008fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009009rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009010
9011 ;;
9012 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009014/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009015
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009016#include <sys/param.h>
9017#ifdef _ZETA_MINAMI_INET6
9018yes
9019#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009020_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009021if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009022 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009023 ipv6type=$i;
9024 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009025 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009026fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009027rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009028
9029 ;;
9030 esac
9031 if test "$ipv6type" != "unknown"; then
9032 break
9033 fi
9034 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9036$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009037fi
9038
9039if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9040 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9041 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9042 echo "using lib$ipv6lib"
9043 else
9044 if test $ipv6trylibc = "yes"; then
9045 echo "using libc"
9046 else
9047 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9048 echo "You need to fetch lib$ipv6lib.a from appropriate"
9049 echo 'ipv6 kit and compile beforehand.'
9050 exit 1
9051 fi
9052 fi
9053fi
9054
Matthias Kloseb9621712010-04-24 17:59:49 +00009055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9056$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009058/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009059
9060 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009061int
9062main ()
9063{
9064FSIORefNum fRef = 0
9065 ;
9066 return 0;
9067}
Matthias Kloseb159a552010-04-25 21:00:44 +00009068
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009070if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009071
Matthias Kloseb159a552010-04-25 21:00:44 +00009072
Matthias Kloseb9621712010-04-24 17:59:49 +00009073$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009074
Matthias Kloseb9621712010-04-24 17:59:49 +00009075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9076$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009077
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009078else
Matthias Kloseb159a552010-04-25 21:00:44 +00009079
Matthias Kloseb9621712010-04-24 17:59:49 +00009080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9081$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009082
9083fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9085
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009086# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9088$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009089
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009090# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009091if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009092 withval=$with_doc_strings;
9093fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009094
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009095
9096if test -z "$with_doc_strings"
9097then with_doc_strings="yes"
9098fi
9099if test "$with_doc_strings" != "no"
9100then
9101
Matthias Kloseb9621712010-04-24 17:59:49 +00009102$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009103
9104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9106$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009107
Antoine Pitrou042b1282010-08-13 21:15:58 +00009108# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9110$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009111
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009112# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009113if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009114 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009115if test "$withval" != no
9116then
9117
Matthias Kloseb9621712010-04-24 17:59:49 +00009118$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009119
Matthias Kloseb9621712010-04-24 17:59:49 +00009120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9121$as_echo "yes" >&6; }
9122else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9123$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009124fi
9125else
Matthias Kloseb9621712010-04-24 17:59:49 +00009126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9127$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009128fi
9129
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009130
9131# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9133$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009135# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009136if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009137 withval=$with_pymalloc;
9138fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009139
Neil Schemenauera35c6882001-02-27 04:45:05 +00009140
Neil Schemenauer16c22972002-03-22 15:34:49 +00009141if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009142then
9143 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009144 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009145fi
9146if test "$with_pymalloc" != "no"
9147then
Martin v. Löwis11437992002-04-12 09:54:03 +00009148
Matthias Kloseb9621712010-04-24 17:59:49 +00009149$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009150
9151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9153$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009154
Benjamin Peterson05159c42009-12-03 03:01:27 +00009155# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9157$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009158
9159# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009160if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009161 withval=$with_valgrind;
9162else
9163 with_valgrind=no
9164fi
9165
Matthias Kloseb9621712010-04-24 17:59:49 +00009166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9167$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009168if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009169 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009170if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009171
Matthias Kloseb9621712010-04-24 17:59:49 +00009172$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009173
9174else
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009175 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009176
9177fi
9178
9179
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009180 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009181fi
9182
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009183# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009184
Guido van Rossum98935bf2001-09-05 19:13:16 +00009185DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009186
Guido van Rossume97ee181999-12-20 21:27:22 +00009187# the dlopen() function means we might want to use dynload_shlib.o. some
9188# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009189for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009190do :
9191 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009192if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009193 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009194#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009195_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009196
Guido van Rossume97ee181999-12-20 21:27:22 +00009197fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009198done
Guido van Rossume97ee181999-12-20 21:27:22 +00009199
Michael W. Hudson54241132001-12-07 15:38:26 +00009200
Guido van Rossume97ee181999-12-20 21:27:22 +00009201# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9202# loading of modules.
9203
Matthias Kloseb9621712010-04-24 17:59:49 +00009204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9205$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009206if test -z "$DYNLOADFILE"
9207then
9208 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009209 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9210 if test "$ac_cv_func_dlopen" = yes
9211 then DYNLOADFILE="dynload_shlib.o"
9212 else DYNLOADFILE="dynload_aix.o"
9213 fi
9214 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009215 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009216 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9217 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009218 *)
9219 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9220 # out any dynamic loading
9221 if test "$ac_cv_func_dlopen" = yes
9222 then DYNLOADFILE="dynload_shlib.o"
9223 else DYNLOADFILE="dynload_stub.o"
9224 fi
9225 ;;
9226 esac
9227fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9229$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009230if test "$DYNLOADFILE" != "dynload_stub.o"
9231then
Martin v. Löwis11437992002-04-12 09:54:03 +00009232
Matthias Kloseb9621712010-04-24 17:59:49 +00009233$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009234
9235fi
9236
Neil Schemenauer4e425612001-06-19 15:44:15 +00009237# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9238
Michael W. Hudson54241132001-12-07 15:38:26 +00009239
Matthias Kloseb9621712010-04-24 17:59:49 +00009240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9241$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009242if test -z "$MACHDEP_OBJS"
9243then
Jack Jansene578a632001-08-15 01:27:14 +00009244 MACHDEP_OBJS=$extra_machdep_objs
9245else
9246 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9249$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009250
Guido van Rossum627b2d71993-12-24 10:39:16 +00009251# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009252for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009253 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009254 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
9255 futimens futimes \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009256 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009257 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009258 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009259 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009260 posix_fallocate posix_fadvise pread \
9261 pthread_init putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009262 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009263 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009264 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Victor Stinner024e37a2011-03-31 01:31:06 +02009265 sigaction sigaltstack siginterrupt sigrelse snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009266 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009267 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9268 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009269do :
9270 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9271ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009272eval as_val=\$$as_ac_var
9273 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009274 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009275#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009276_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009277
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009278fi
9279done
9280
Michael W. Hudson54241132001-12-07 15:38:26 +00009281
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009282# For some functions, having a definition is not sufficient, since
9283# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9285$as_echo_n "checking for chroot... " >&6; }
9286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009287/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009288#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009289int
9290main ()
9291{
9292void *x=chroot
9293 ;
9294 return 0;
9295}
9296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009297if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009298
Matthias Kloseb9621712010-04-24 17:59:49 +00009299$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009300
Matthias Kloseb159a552010-04-25 21:00:44 +00009301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009302$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009303else
Matthias Kloseb9621712010-04-24 17:59:49 +00009304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9305$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009306
9307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9310$as_echo_n "checking for link... " >&6; }
9311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009312/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009313#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009314int
9315main ()
9316{
9317void *x=link
9318 ;
9319 return 0;
9320}
9321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009322if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009323
Matthias Kloseb9621712010-04-24 17:59:49 +00009324$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009325
Matthias Kloseb159a552010-04-25 21:00:44 +00009326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009327$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009328else
Matthias Kloseb9621712010-04-24 17:59:49 +00009329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9330$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009331
9332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9335$as_echo_n "checking for symlink... " >&6; }
9336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009337/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009338#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009339int
9340main ()
9341{
9342void *x=symlink
9343 ;
9344 return 0;
9345}
9346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009347if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009348
Matthias Kloseb9621712010-04-24 17:59:49 +00009349$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009350
Matthias Kloseb159a552010-04-25 21:00:44 +00009351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009352$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009353else
Matthias Kloseb9621712010-04-24 17:59:49 +00009354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9355$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009356
9357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9360$as_echo_n "checking for fchdir... " >&6; }
9361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009362/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009363#include <unistd.h>
9364int
9365main ()
9366{
9367void *x=fchdir
9368 ;
9369 return 0;
9370}
9371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009372if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009373
Matthias Kloseb9621712010-04-24 17:59:49 +00009374$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009375
Matthias Kloseb159a552010-04-25 21:00:44 +00009376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009377$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009378else
Matthias Kloseb9621712010-04-24 17:59:49 +00009379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9380$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009381
9382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9385$as_echo_n "checking for fsync... " >&6; }
9386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009387/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009388#include <unistd.h>
9389int
9390main ()
9391{
9392void *x=fsync
9393 ;
9394 return 0;
9395}
9396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009397if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009398
Matthias Kloseb9621712010-04-24 17:59:49 +00009399$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009400
Matthias Kloseb159a552010-04-25 21:00:44 +00009401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009402$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009403else
Matthias Kloseb9621712010-04-24 17:59:49 +00009404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9405$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009406
9407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9410$as_echo_n "checking for fdatasync... " >&6; }
9411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009412/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009413#include <unistd.h>
9414int
9415main ()
9416{
9417void *x=fdatasync
9418 ;
9419 return 0;
9420}
9421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009422if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009423
Matthias Kloseb9621712010-04-24 17:59:49 +00009424$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009425
Matthias Kloseb159a552010-04-25 21:00:44 +00009426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009427$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009428else
Matthias Kloseb9621712010-04-24 17:59:49 +00009429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9430$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009431
9432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9435$as_echo_n "checking for epoll... " >&6; }
9436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009437/* end confdefs.h. */
9438#include <sys/epoll.h>
9439int
9440main ()
9441{
9442void *x=epoll_create
9443 ;
9444 return 0;
9445}
9446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009447if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009448
Matthias Kloseb9621712010-04-24 17:59:49 +00009449$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009450
Matthias Kloseb159a552010-04-25 21:00:44 +00009451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009452$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009453else
Matthias Kloseb9621712010-04-24 17:59:49 +00009454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9455$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009456
9457fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9460$as_echo_n "checking for kqueue... " >&6; }
9461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009462/* end confdefs.h. */
9463
9464#include <sys/types.h>
9465#include <sys/event.h>
9466
9467int
9468main ()
9469{
9470int x=kqueue()
9471 ;
9472 return 0;
9473}
9474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009475if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009476
Matthias Kloseb9621712010-04-24 17:59:49 +00009477$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009478
Matthias Kloseb159a552010-04-25 21:00:44 +00009479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009480$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009481else
Matthias Kloseb9621712010-04-24 17:59:49 +00009482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9483$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009484
9485fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009487# On some systems (eg. FreeBSD 5), we would find a definition of the
9488# functions ctermid_r, setgroups in the library, but no prototype
9489# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9490# address to avoid compiler warnings and potential miscompilations
9491# because of the missing prototypes.
9492
Matthias Kloseb9621712010-04-24 17:59:49 +00009493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9494$as_echo_n "checking for ctermid_r... " >&6; }
9495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009496/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009497
Martin v. Löwisd5843682002-11-21 20:41:28 +00009498#include <stdio.h>
9499
Martin v. Löwisd5843682002-11-21 20:41:28 +00009500int
9501main ()
9502{
9503void* p = ctermid_r
9504 ;
9505 return 0;
9506}
9507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009508if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009509
Matthias Kloseb9621712010-04-24 17:59:49 +00009510$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009511
Matthias Kloseb159a552010-04-25 21:00:44 +00009512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009513$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009514else
Matthias Kloseb9621712010-04-24 17:59:49 +00009515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9516$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009517
9518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9520
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9522$as_echo_n "checking for flock declaration... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009523if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009524 $as_echo_n "(cached) " >&6
9525else
9526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009527/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009528#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009529int
9530main ()
9531{
9532void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009533
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009534 ;
9535 return 0;
9536}
9537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009538if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009539 ac_cv_flock_decl=yes
9540else
9541 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009542
9543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009545
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009546fi
9547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9548$as_echo "$ac_cv_flock_decl" >&6; }
9549if test "x${ac_cv_flock_decl}" = xyes; then
9550 for ac_func in flock
9551do :
9552 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009553if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009554 cat >>confdefs.h <<_ACEOF
9555#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009556_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009557
Antoine Pitroua3000072010-09-07 14:52:42 +00009558else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009560$as_echo_n "checking for flock in -lbsd... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009561if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009562 $as_echo_n "(cached) " >&6
9563else
9564 ac_check_lib_save_LIBS=$LIBS
9565LIBS="-lbsd $LIBS"
9566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9567/* end confdefs.h. */
9568
9569/* Override any GCC internal prototype to avoid an error.
9570 Use char because int might match the return type of a GCC
9571 builtin and then its argument prototype would still apply. */
9572#ifdef __cplusplus
9573extern "C"
9574#endif
9575char flock ();
9576int
9577main ()
9578{
9579return flock ();
9580 ;
9581 return 0;
9582}
9583_ACEOF
9584if ac_fn_c_try_link "$LINENO"; then :
9585 ac_cv_lib_bsd_flock=yes
9586else
9587 ac_cv_lib_bsd_flock=no
9588fi
9589rm -f core conftest.err conftest.$ac_objext \
9590 conftest$ac_exeext conftest.$ac_ext
9591LIBS=$ac_check_lib_save_LIBS
9592fi
9593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9594$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009595if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009596 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009597
9598
9599$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9600
9601
9602fi
9603
9604
9605fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009606done
9607
Antoine Pitroua3000072010-09-07 14:52:42 +00009608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009609
Matthias Kloseb9621712010-04-24 17:59:49 +00009610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9611$as_echo_n "checking for getpagesize... " >&6; }
9612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009613/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009614
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009615#include <unistd.h>
9616
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009617int
9618main ()
9619{
9620void* p = getpagesize
9621 ;
9622 return 0;
9623}
9624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009625if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009626
Matthias Kloseb9621712010-04-24 17:59:49 +00009627$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009628
Matthias Kloseb159a552010-04-25 21:00:44 +00009629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009630$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009631else
Matthias Kloseb9621712010-04-24 17:59:49 +00009632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9633$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009634
9635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009637
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mallopt can set malloc mmap threshold" >&5
9639$as_echo_n "checking whether mallopt can set malloc mmap threshold... " >&6; }
9640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9641/* end confdefs.h. */
9642
9643#include <malloc.h>
9644
9645int
9646main ()
9647{
9648mallopt(M_MMAP_THRESHOLD, 256 * 1024)
9649 ;
9650 return 0;
9651}
9652_ACEOF
9653if ac_fn_c_try_compile "$LINENO"; then :
9654
9655$as_echo "#define HAVE_MALLOPT_MMAP_THRESHOLD 1" >>confdefs.h
9656
9657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9658$as_echo "yes" >&6; }
9659else
9660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9661$as_echo "no" >&6; }
9662
9663fi
9664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9665
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009666for ac_prog in true
9667do
9668 # Extract the first word of "$ac_prog", so it can be a program name with args.
9669set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9671$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009672if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009673 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009674else
9675 if test -n "$TRUE"; then
9676 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9677else
9678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9679for as_dir in $PATH
9680do
9681 IFS=$as_save_IFS
9682 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009683 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009684 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 +00009685 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009686 $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 +00009687 break 2
9688 fi
9689done
Matthias Kloseb9621712010-04-24 17:59:49 +00009690 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009691IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009692
9693fi
9694fi
9695TRUE=$ac_cv_prog_TRUE
9696if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9698$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009699else
Matthias Kloseb9621712010-04-24 17:59:49 +00009700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9701$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009702fi
9703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009704
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009705 test -n "$TRUE" && break
9706done
9707test -n "$TRUE" || TRUE="/bin/true"
9708
9709
Matthias Kloseb9621712010-04-24 17:59:49 +00009710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9711$as_echo_n "checking for inet_aton in -lc... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009712if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009713 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009714else
9715 ac_check_lib_save_LIBS=$LIBS
9716LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009718/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009720/* Override any GCC internal prototype to avoid an error.
9721 Use char because int might match the return type of a GCC
9722 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009723#ifdef __cplusplus
9724extern "C"
9725#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009726char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009727int
9728main ()
9729{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009730return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009731 ;
9732 return 0;
9733}
9734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009735if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009736 ac_cv_lib_c_inet_aton=yes
9737else
Matthias Kloseb9621712010-04-24 17:59:49 +00009738 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009740rm -f core conftest.err conftest.$ac_objext \
9741 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009742LIBS=$ac_check_lib_save_LIBS
9743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9745$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009746if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009747 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009748else
Matthias Kloseb9621712010-04-24 17:59:49 +00009749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9750$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009751if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009752 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009753else
9754 ac_check_lib_save_LIBS=$LIBS
9755LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009757/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009758
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009759/* Override any GCC internal prototype to avoid an error.
9760 Use char because int might match the return type of a GCC
9761 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009762#ifdef __cplusplus
9763extern "C"
9764#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009765char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009766int
9767main ()
9768{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009769return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009770 ;
9771 return 0;
9772}
9773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009774if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009775 ac_cv_lib_resolv_inet_aton=yes
9776else
Matthias Kloseb9621712010-04-24 17:59:49 +00009777 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009779rm -f core conftest.err conftest.$ac_objext \
9780 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009781LIBS=$ac_check_lib_save_LIBS
9782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9784$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009785if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009786 cat >>confdefs.h <<_ACEOF
9787#define HAVE_LIBRESOLV 1
9788_ACEOF
9789
9790 LIBS="-lresolv $LIBS"
9791
9792fi
9793
9794
9795fi
9796
9797
Christian Heimesd0764e22007-12-04 15:00:33 +00009798# On Tru64, chflags seems to be present, but calling it will
9799# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9801$as_echo_n "checking for chflags... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009802if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009803 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009804else
Matthias Kloseb9621712010-04-24 17:59:49 +00009805 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009806 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009807else
Matthias Kloseb9621712010-04-24 17:59:49 +00009808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009809/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009810[
Christian Heimesd0764e22007-12-04 15:00:33 +00009811#include <sys/stat.h>
9812#include <unistd.h>
9813int main(int argc, char*argv[])
9814{
9815 if(chflags(argv[0], 0) != 0)
9816 return 1;
9817 return 0;
9818}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009819]
Christian Heimesd0764e22007-12-04 15:00:33 +00009820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009821if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009822 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009823else
Matthias Kloseb9621712010-04-24 17:59:49 +00009824 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009826rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9827 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009828fi
9829
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009830
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9833$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009834if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009835 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009836if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009837 ac_cv_have_chflags="yes"
9838else
9839 ac_cv_have_chflags="no"
9840fi
9841
9842fi
9843if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009844
Matthias Kloseb9621712010-04-24 17:59:49 +00009845$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009846
9847fi
9848
Matthias Kloseb9621712010-04-24 17:59:49 +00009849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9850$as_echo_n "checking for lchflags... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009851if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009852 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009853else
Matthias Kloseb9621712010-04-24 17:59:49 +00009854 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009855 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009856else
Matthias Kloseb9621712010-04-24 17:59:49 +00009857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009858/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009859[
Christian Heimesd0764e22007-12-04 15:00:33 +00009860#include <sys/stat.h>
9861#include <unistd.h>
9862int main(int argc, char*argv[])
9863{
9864 if(lchflags(argv[0], 0) != 0)
9865 return 1;
9866 return 0;
9867}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009868]
Christian Heimesd0764e22007-12-04 15:00:33 +00009869_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009870if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009871 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009872else
Matthias Kloseb9621712010-04-24 17:59:49 +00009873 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009875rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9876 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009877fi
9878
9879
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9882$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009883if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009884 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009885if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009886 ac_cv_have_lchflags="yes"
9887else
9888 ac_cv_have_lchflags="no"
9889fi
9890
9891fi
9892if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009893
Matthias Kloseb9621712010-04-24 17:59:49 +00009894$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009895
9896fi
9897
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009898case $ac_sys_system/$ac_sys_release in
9899Darwin/*)
9900 _CUR_CFLAGS="${CFLAGS}"
9901 _CUR_LDFLAGS="${LDFLAGS}"
9902 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9903 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9904 ;;
9905esac
9906
Matthias Kloseb9621712010-04-24 17:59:49 +00009907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9908$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009909if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009910 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009911else
9912 ac_check_lib_save_LIBS=$LIBS
9913LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009915/* end confdefs.h. */
9916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009917/* Override any GCC internal prototype to avoid an error.
9918 Use char because int might match the return type of a GCC
9919 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009920#ifdef __cplusplus
9921extern "C"
9922#endif
9923char inflateCopy ();
9924int
9925main ()
9926{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009927return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009928 ;
9929 return 0;
9930}
9931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009932if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009933 ac_cv_lib_z_inflateCopy=yes
9934else
Matthias Kloseb9621712010-04-24 17:59:49 +00009935 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009937rm -f core conftest.err conftest.$ac_objext \
9938 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009939LIBS=$ac_check_lib_save_LIBS
9940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9942$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009943if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009944
Matthias Kloseb9621712010-04-24 17:59:49 +00009945$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009946
9947fi
9948
9949
9950case $ac_sys_system/$ac_sys_release in
9951Darwin/*)
9952 CFLAGS="${_CUR_CFLAGS}"
9953 LDFLAGS="${_CUR_LDFLAGS}"
9954 ;;
9955esac
9956
Matthias Kloseb9621712010-04-24 17:59:49 +00009957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9958$as_echo_n "checking for hstrerror... " >&6; }
9959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009960/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009961
Martin v. Löwise9416172003-05-03 10:12:45 +00009962#include <netdb.h>
9963
Martin v. Löwise9416172003-05-03 10:12:45 +00009964int
9965main ()
9966{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009967void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009968 ;
9969 return 0;
9970}
9971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009972if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009973
Matthias Kloseb9621712010-04-24 17:59:49 +00009974$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009975
Matthias Kloseb159a552010-04-25 21:00:44 +00009976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009977$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009978else
Matthias Kloseb9621712010-04-24 17:59:49 +00009979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9980$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009981
9982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009983rm -f core conftest.err conftest.$ac_objext \
9984 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009985
Matthias Kloseb9621712010-04-24 17:59:49 +00009986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9987$as_echo_n "checking for inet_aton... " >&6; }
9988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009989/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009990
Martin v. Löwis86d66262006-02-17 08:40:11 +00009991#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009992#include <sys/socket.h>
9993#include <netinet/in.h>
9994#include <arpa/inet.h>
9995
Martin v. Löwise9416172003-05-03 10:12:45 +00009996int
9997main ()
9998{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009999void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010000 ;
10001 return 0;
10002}
10003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010004if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010005
Matthias Kloseb9621712010-04-24 17:59:49 +000010006$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010007
Matthias Kloseb159a552010-04-25 21:00:44 +000010008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010009$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010010else
Matthias Kloseb9621712010-04-24 17:59:49 +000010011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10012$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010013
10014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010015rm -f core conftest.err conftest.$ac_objext \
10016 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010017
Matthias Kloseb9621712010-04-24 17:59:49 +000010018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10019$as_echo_n "checking for inet_pton... " >&6; }
10020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010021/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010022
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010023#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010024#include <sys/socket.h>
10025#include <netinet/in.h>
10026#include <arpa/inet.h>
10027
Martin v. Löwise9416172003-05-03 10:12:45 +000010028int
10029main ()
10030{
10031void* p = inet_pton
10032 ;
10033 return 0;
10034}
10035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010036if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010037
Matthias Kloseb9621712010-04-24 17:59:49 +000010038$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010039
Matthias Kloseb159a552010-04-25 21:00:44 +000010040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010041$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010042else
Matthias Kloseb9621712010-04-24 17:59:49 +000010043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10044$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010045
10046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010048
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010049# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10051$as_echo_n "checking for setgroups... " >&6; }
10052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010053/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010054
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010055#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010056#ifdef HAVE_GRP_H
10057#include <grp.h>
10058#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010059
Martin v. Löwisd5843682002-11-21 20:41:28 +000010060int
10061main ()
10062{
10063void* p = setgroups
10064 ;
10065 return 0;
10066}
10067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010068if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010069
Matthias Kloseb9621712010-04-24 17:59:49 +000010070$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010071
Matthias Kloseb159a552010-04-25 21:00:44 +000010072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010073$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010074else
Matthias Kloseb9621712010-04-24 17:59:49 +000010075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10076$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010077
10078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010080
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010081# check for openpty and forkpty
10082
10083for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010084do :
10085 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010086if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010087 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010088#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010089_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010090
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010091else
Matthias Kloseb9621712010-04-24 17:59:49 +000010092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10093$as_echo_n "checking for openpty in -lutil... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010094if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010095 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010096else
Martin v. Löwis11437992002-04-12 09:54:03 +000010097 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010098LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010100/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010102/* Override any GCC internal prototype to avoid an error.
10103 Use char because int might match the return type of a GCC
10104 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010105#ifdef __cplusplus
10106extern "C"
10107#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010108char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010109int
10110main ()
10111{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010112return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010113 ;
10114 return 0;
10115}
10116_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010117if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010118 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010119else
Matthias Kloseb9621712010-04-24 17:59:49 +000010120 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010122rm -f core conftest.err conftest.$ac_objext \
10123 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010124LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010125fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10127$as_echo "$ac_cv_lib_util_openpty" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010128if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010129 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010130 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010131else
Matthias Kloseb9621712010-04-24 17:59:49 +000010132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10133$as_echo_n "checking for openpty in -lbsd... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010134if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010135 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010136else
10137 ac_check_lib_save_LIBS=$LIBS
10138LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010140/* end confdefs.h. */
10141
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010142/* Override any GCC internal prototype to avoid an error.
10143 Use char because int might match the return type of a GCC
10144 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010145#ifdef __cplusplus
10146extern "C"
10147#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010148char openpty ();
10149int
10150main ()
10151{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010152return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010153 ;
10154 return 0;
10155}
10156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010157if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010158 ac_cv_lib_bsd_openpty=yes
10159else
Matthias Kloseb9621712010-04-24 17:59:49 +000010160 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010162rm -f core conftest.err conftest.$ac_objext \
10163 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010164LIBS=$ac_check_lib_save_LIBS
10165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10167$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010168if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010169 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010170 LIBS="$LIBS -lbsd"
10171fi
10172
10173
10174fi
10175
Fred Drake8cef4cf2000-06-28 16:40:38 +000010176
10177fi
10178done
10179
10180for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010181do :
10182 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010183if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010184 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010185#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010186_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010187
Fred Drake8cef4cf2000-06-28 16:40:38 +000010188else
Matthias Kloseb9621712010-04-24 17:59:49 +000010189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10190$as_echo_n "checking for forkpty in -lutil... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010191if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010192 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010193else
Martin v. Löwis11437992002-04-12 09:54:03 +000010194 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010195LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010199/* Override any GCC internal prototype to avoid an error.
10200 Use char because int might match the return type of a GCC
10201 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010202#ifdef __cplusplus
10203extern "C"
10204#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010205char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010206int
10207main ()
10208{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010209return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010210 ;
10211 return 0;
10212}
10213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010214if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010215 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010216else
Matthias Kloseb9621712010-04-24 17:59:49 +000010217 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010219rm -f core conftest.err conftest.$ac_objext \
10220 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010221LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010222fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10224$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010225if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010226 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010227 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010228else
Matthias Kloseb9621712010-04-24 17:59:49 +000010229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10230$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010231if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010232 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010233else
10234 ac_check_lib_save_LIBS=$LIBS
10235LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010237/* end confdefs.h. */
10238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010239/* Override any GCC internal prototype to avoid an error.
10240 Use char because int might match the return type of a GCC
10241 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010242#ifdef __cplusplus
10243extern "C"
10244#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010245char forkpty ();
10246int
10247main ()
10248{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010249return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010250 ;
10251 return 0;
10252}
10253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010254if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010255 ac_cv_lib_bsd_forkpty=yes
10256else
Matthias Kloseb9621712010-04-24 17:59:49 +000010257 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010258fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010259rm -f core conftest.err conftest.$ac_objext \
10260 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010261LIBS=$ac_check_lib_save_LIBS
10262fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10264$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010265if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010266 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010267 LIBS="$LIBS -lbsd"
10268fi
10269
10270
10271fi
10272
Fred Drake8cef4cf2000-06-28 16:40:38 +000010273
10274fi
10275done
10276
Jack Jansendd19cf82001-12-06 22:36:17 +000010277
Christian Heimesb186d002008-03-18 15:15:01 +000010278# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010279for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010280do :
10281 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010282if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010283 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010284#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010285_ACEOF
10286
10287fi
10288done
10289
10290
Michael W. Hudson54241132001-12-07 15:38:26 +000010291# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010292for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010293do :
10294 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10295ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010296eval as_val=\$$as_ac_var
10297 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010298 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010299#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010300_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010301
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010302fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010303done
10304
Michael W. Hudson54241132001-12-07 15:38:26 +000010305
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010306for ac_func in dup2 getcwd strdup
10307do :
10308 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10309ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10310eval as_val=\$$as_ac_var
10311 if test "x$as_val" = x""yes; then :
10312 cat >>confdefs.h <<_ACEOF
10313#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10314_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010315
Martin v. Löwis1142de32002-03-29 16:28:31 +000010316else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010317 case " $LIBOBJS " in
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010318 *" $ac_func.$ac_objext "* ) ;;
10319 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010320 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010321esac
10322
Martin v. Löwis1142de32002-03-29 16:28:31 +000010323fi
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010324done
Martin v. Löwis1142de32002-03-29 16:28:31 +000010325
10326
10327for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010328do :
10329 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010330if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010332#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010335/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010336#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010337int
10338main ()
10339{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010340getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010341 ;
10342 return 0;
10343}
10344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010345if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010346
Matthias Kloseb9621712010-04-24 17:59:49 +000010347$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010348
Guido van Rossum627b2d71993-12-24 10:39:16 +000010349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010351
Guido van Rossum627b2d71993-12-24 10:39:16 +000010352fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010353done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010354
Jack Jansen150753c2003-03-29 22:07:47 +000010355for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010356do :
10357 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010358if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010359 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010360#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010363/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010364#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010365int
10366main ()
10367{
10368setpgrp(0,0);
10369 ;
10370 return 0;
10371}
10372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010373if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010374
Matthias Kloseb9621712010-04-24 17:59:49 +000010375$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010376
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010379
10380fi
10381done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010382
Thomas Wouters3a584202000-08-05 23:28:51 +000010383for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010384do :
10385 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010386if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010387 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010388#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010391/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010392#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010393int
10394main ()
10395{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010396gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010397 ;
10398 return 0;
10399}
10400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010401if ac_fn_c_try_compile "$LINENO"; then :
10402
Guido van Rossum627b2d71993-12-24 10:39:16 +000010403else
Skip Montanaro6dead952003-09-25 14:50:04 +000010404
Matthias Kloseb9621712010-04-24 17:59:49 +000010405$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010406
Martin v. Löwis11437992002-04-12 09:54:03 +000010407
Guido van Rossum627b2d71993-12-24 10:39:16 +000010408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010410
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010411fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010412done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010413
Michael W. Hudson54241132001-12-07 15:38:26 +000010414
Matthias Kloseb9621712010-04-24 17:59:49 +000010415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10416$as_echo_n "checking for major... " >&6; }
10417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010418/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010419
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010420#if defined(MAJOR_IN_MKDEV)
10421#include <sys/mkdev.h>
10422#elif defined(MAJOR_IN_SYSMACROS)
10423#include <sys/sysmacros.h>
10424#else
10425#include <sys/types.h>
10426#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010427
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010428int
10429main ()
10430{
10431
10432 makedev(major(0),minor(0));
10433
10434 ;
10435 return 0;
10436}
10437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010438if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010439
10440
Matthias Kloseb9621712010-04-24 17:59:49 +000010441$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010442
Matthias Kloseb9621712010-04-24 17:59:49 +000010443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10444$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010445
10446else
Skip Montanaro6dead952003-09-25 14:50:04 +000010447
Matthias Kloseb9621712010-04-24 17:59:49 +000010448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10449$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010450
10451fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010452rm -f core conftest.err conftest.$ac_objext \
10453 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010454
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010455# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010456# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10458$as_echo_n "checking for getaddrinfo... " >&6; }
10459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010460/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010461
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010462#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010463#include <sys/socket.h>
10464#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010465#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010466
Martin v. Löwis11437992002-04-12 09:54:03 +000010467int
10468main ()
10469{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010470getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010471 ;
10472 return 0;
10473}
10474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010475if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010476 have_getaddrinfo=yes
10477else
Matthias Kloseb9621712010-04-24 17:59:49 +000010478 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010479fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010480rm -f core conftest.err conftest.$ac_objext \
10481 conftest$ac_exeext conftest.$ac_ext
10482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10483$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010484if test $have_getaddrinfo = yes
10485then
Matthias Kloseb9621712010-04-24 17:59:49 +000010486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10487$as_echo_n "checking getaddrinfo bug... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010488 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010489 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010490else
Matthias Kloseb9621712010-04-24 17:59:49 +000010491 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010492 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010493else
Matthias Kloseb9621712010-04-24 17:59:49 +000010494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010495/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010496
10497#include <sys/types.h>
10498#include <netdb.h>
10499#include <string.h>
10500#include <sys/socket.h>
10501#include <netinet/in.h>
10502
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010503int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010504{
10505 int passive, gaierr, inet4 = 0, inet6 = 0;
10506 struct addrinfo hints, *ai, *aitop;
10507 char straddr[INET6_ADDRSTRLEN], strport[16];
10508
10509 for (passive = 0; passive <= 1; passive++) {
10510 memset(&hints, 0, sizeof(hints));
10511 hints.ai_family = AF_UNSPEC;
10512 hints.ai_flags = passive ? AI_PASSIVE : 0;
10513 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010514 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010515 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10516 (void)gai_strerror(gaierr);
10517 goto bad;
10518 }
10519 for (ai = aitop; ai; ai = ai->ai_next) {
10520 if (ai->ai_addr == NULL ||
10521 ai->ai_addrlen == 0 ||
10522 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10523 straddr, sizeof(straddr), strport, sizeof(strport),
10524 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10525 goto bad;
10526 }
10527 switch (ai->ai_family) {
10528 case AF_INET:
10529 if (strcmp(strport, "54321") != 0) {
10530 goto bad;
10531 }
10532 if (passive) {
10533 if (strcmp(straddr, "0.0.0.0") != 0) {
10534 goto bad;
10535 }
10536 } else {
10537 if (strcmp(straddr, "127.0.0.1") != 0) {
10538 goto bad;
10539 }
10540 }
10541 inet4++;
10542 break;
10543 case AF_INET6:
10544 if (strcmp(strport, "54321") != 0) {
10545 goto bad;
10546 }
10547 if (passive) {
10548 if (strcmp(straddr, "::") != 0) {
10549 goto bad;
10550 }
10551 } else {
10552 if (strcmp(straddr, "::1") != 0) {
10553 goto bad;
10554 }
10555 }
10556 inet6++;
10557 break;
10558 case AF_UNSPEC:
10559 goto bad;
10560 break;
10561 default:
10562 /* another family support? */
10563 break;
10564 }
10565 }
10566 }
10567
10568 if (!(inet4 == 0 || inet4 == 2))
10569 goto bad;
10570 if (!(inet6 == 0 || inet6 == 2))
10571 goto bad;
10572
10573 if (aitop)
10574 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010575 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010576
10577 bad:
10578 if (aitop)
10579 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010580 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010581}
10582
Martin v. Löwis11437992002-04-12 09:54:03 +000010583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010584if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010585 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010586else
Matthias Kloseb9621712010-04-24 17:59:49 +000010587 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010588fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010589rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10590 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010592
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010593fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010594
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010596
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10598$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10599
Mark Dickinson2df5d282009-12-31 21:22:50 +000010600if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010601then
10602 if test $ipv6 = yes
10603 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010604 echo 'Fatal: You must get working getaddrinfo() function.'
10605 echo ' or you can specify "--disable-ipv6"'.
10606 exit 1
10607 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010608else
Martin v. Löwis11437992002-04-12 09:54:03 +000010609
Matthias Kloseb9621712010-04-24 17:59:49 +000010610$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010611
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010612fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010613
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010614for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010615do :
10616 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010617if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010618 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010619#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010620_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010621
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010622fi
10623done
10624
Michael W. Hudson54241132001-12-07 15:38:26 +000010625
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010626# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10628$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010629if test "${ac_cv_header_time+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010630 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010631else
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010633/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010634#include <sys/types.h>
10635#include <sys/time.h>
10636#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010637
Martin v. Löwis11437992002-04-12 09:54:03 +000010638int
10639main ()
10640{
10641if ((struct tm *) 0)
10642return 0;
10643 ;
10644 return 0;
10645}
10646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010647if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010648 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010649else
Matthias Kloseb9621712010-04-24 17:59:49 +000010650 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010651fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010653fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10655$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010656if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010657
Matthias Kloseb9621712010-04-24 17:59:49 +000010658$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010659
10660fi
10661
Matthias Kloseb9621712010-04-24 17:59:49 +000010662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10663$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010664if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010665 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010666else
Matthias Kloseb9621712010-04-24 17:59:49 +000010667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010668/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010669#include <sys/types.h>
10670#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010671
Martin v. Löwis11437992002-04-12 09:54:03 +000010672int
10673main ()
10674{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010675struct tm tm;
10676 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010677 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010678 ;
10679 return 0;
10680}
10681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010682if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010683 ac_cv_struct_tm=time.h
10684else
Matthias Kloseb9621712010-04-24 17:59:49 +000010685 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010688fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10690$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010691if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010692
Matthias Kloseb9621712010-04-24 17:59:49 +000010693$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010694
10695fi
10696
Matthias Kloseb9621712010-04-24 17:59:49 +000010697ac_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 +000010698#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010699
Matthias Kloseb9621712010-04-24 17:59:49 +000010700"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010701if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010702
10703cat >>confdefs.h <<_ACEOF
10704#define HAVE_STRUCT_TM_TM_ZONE 1
10705_ACEOF
10706
10707
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010708fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010709
Martin v. Löwis11437992002-04-12 09:54:03 +000010710if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10711
Matthias Kloseb9621712010-04-24 17:59:49 +000010712$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010713
10714else
Matthias Kloseb9621712010-04-24 17:59:49 +000010715 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10716"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010717if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010718 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719else
Matthias Kloseb9621712010-04-24 17:59:49 +000010720 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010721fi
10722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010723cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010724#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010725_ACEOF
10726
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10728$as_echo_n "checking for tzname... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010729if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010730 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010731else
Matthias Kloseb9621712010-04-24 17:59:49 +000010732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010733/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010734#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010735#if !HAVE_DECL_TZNAME
10736extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010737#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010738
Martin v. Löwis11437992002-04-12 09:54:03 +000010739int
10740main ()
10741{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010742return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010743 ;
10744 return 0;
10745}
10746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010747if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010748 ac_cv_var_tzname=yes
10749else
Matthias Kloseb9621712010-04-24 17:59:49 +000010750 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010751fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010752rm -f core conftest.err conftest.$ac_objext \
10753 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10756$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010757 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010758
Matthias Kloseb9621712010-04-24 17:59:49 +000010759$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010760
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010761 fi
10762fi
10763
Matthias Kloseb9621712010-04-24 17:59:49 +000010764ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010765if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010766
10767cat >>confdefs.h <<_ACEOF
10768#define HAVE_STRUCT_STAT_ST_RDEV 1
10769_ACEOF
10770
10771
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010772fi
10773
Matthias Kloseb9621712010-04-24 17:59:49 +000010774ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010775if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010776
Martin v. Löwis11437992002-04-12 09:54:03 +000010777cat >>confdefs.h <<_ACEOF
10778#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10779_ACEOF
10780
10781
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010782fi
10783
Matthias Kloseb9621712010-04-24 17:59:49 +000010784ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010785if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010786
10787cat >>confdefs.h <<_ACEOF
10788#define HAVE_STRUCT_STAT_ST_FLAGS 1
10789_ACEOF
10790
10791
10792fi
10793
Matthias Kloseb9621712010-04-24 17:59:49 +000010794ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010795if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010796
10797cat >>confdefs.h <<_ACEOF
10798#define HAVE_STRUCT_STAT_ST_GEN 1
10799_ACEOF
10800
10801
10802fi
10803
Matthias Kloseb9621712010-04-24 17:59:49 +000010804ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010805if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010806
10807cat >>confdefs.h <<_ACEOF
10808#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10809_ACEOF
10810
10811
10812fi
10813
Matthias Kloseb9621712010-04-24 17:59:49 +000010814ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010815if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010816
Martin v. Löwis11437992002-04-12 09:54:03 +000010817cat >>confdefs.h <<_ACEOF
10818#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10819_ACEOF
10820
10821
Matthias Kloseb9621712010-04-24 17:59:49 +000010822$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010823
10824else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010825 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010826 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010827 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10828 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010829esac
10830
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010831fi
10832
Michael W. Hudson54241132001-12-07 15:38:26 +000010833
Martin v. Löwis11437992002-04-12 09:54:03 +000010834
Matthias Kloseb9621712010-04-24 17:59:49 +000010835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10836$as_echo_n "checking for time.h that defines altzone... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010837if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010838 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010839else
Matthias Kloseb159a552010-04-25 21:00:44 +000010840
Matthias Kloseb9621712010-04-24 17:59:49 +000010841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010842/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010843#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010844int
10845main ()
10846{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010847return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010848 ;
10849 return 0;
10850}
10851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010852if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010853 ac_cv_header_time_altzone=yes
10854else
Matthias Kloseb9621712010-04-24 17:59:49 +000010855 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010859fi
10860
Matthias Kloseb9621712010-04-24 17:59:49 +000010861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10862$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010863if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010864
Matthias Kloseb9621712010-04-24 17:59:49 +000010865$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010866
10867fi
10868
Guido van Rossumda88dad1995-01-26 00:46:29 +000010869was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10871$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010873/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010874
10875#include <sys/types.h>
10876#include <sys/select.h>
10877#include <sys/time.h>
10878
Martin v. Löwis11437992002-04-12 09:54:03 +000010879int
10880main ()
10881{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010882;
Martin v. Löwis11437992002-04-12 09:54:03 +000010883 ;
10884 return 0;
10885}
10886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010887if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010888
10889
Matthias Kloseb9621712010-04-24 17:59:49 +000010890$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010891
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010892 was_it_defined=yes
10893
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10897$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010898
Matthias Kloseb9621712010-04-24 17:59:49 +000010899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10900$as_echo_n "checking for addrinfo... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010901if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010902 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010903else
Matthias Kloseb9621712010-04-24 17:59:49 +000010904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010905/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010906#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010907int
10908main ()
10909{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010910struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010911 ;
10912 return 0;
10913}
10914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010915if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010916 ac_cv_struct_addrinfo=yes
10917else
Matthias Kloseb9621712010-04-24 17:59:49 +000010918 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10921fi
10922
Matthias Kloseb9621712010-04-24 17:59:49 +000010923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10924$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010925if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010926
Matthias Kloseb9621712010-04-24 17:59:49 +000010927$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010928
10929fi
10930
Matthias Kloseb9621712010-04-24 17:59:49 +000010931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10932$as_echo_n "checking for sockaddr_storage... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010933if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010934 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010935else
Matthias Kloseb9621712010-04-24 17:59:49 +000010936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010937/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010938
10939# include <sys/types.h>
10940# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010941int
10942main ()
10943{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010944struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010945 ;
10946 return 0;
10947}
10948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010949if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010950 ac_cv_struct_sockaddr_storage=yes
10951else
Matthias Kloseb9621712010-04-24 17:59:49 +000010952 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10955fi
10956
Matthias Kloseb9621712010-04-24 17:59:49 +000010957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10958$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010959if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010960
Matthias Kloseb9621712010-04-24 17:59:49 +000010961$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010962
10963fi
10964
Guido van Rossum627b2d71993-12-24 10:39:16 +000010965# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010966
Matthias Kloseb9621712010-04-24 17:59:49 +000010967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10968$as_echo_n "checking whether char is unsigned... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020010969if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010970 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010971else
Matthias Kloseb9621712010-04-24 17:59:49 +000010972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010973/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010974$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010975int
10976main ()
10977{
10978static int test_array [1 - 2 * !(((char) -1) < 0)];
10979test_array [0] = 0
10980
10981 ;
10982 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010983}
Martin v. Löwis11437992002-04-12 09:54:03 +000010984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010985if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010986 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010987else
Matthias Kloseb9621712010-04-24 17:59:49 +000010988 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010989fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010991fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10993$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010994if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010995 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010996
10997fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010998
Matthias Kloseb9621712010-04-24 17:59:49 +000010999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11000$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020011001if test "${ac_cv_c_const+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011002 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011003else
Matthias Kloseb9621712010-04-24 17:59:49 +000011004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011005/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011006
Martin v. Löwis11437992002-04-12 09:54:03 +000011007int
11008main ()
11009{
11010/* FIXME: Include the comments suggested by Paul. */
11011#ifndef __cplusplus
11012 /* Ultrix mips cc rejects this. */
11013 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011014 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011015 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011016 char const *const *pcpcc;
11017 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011018 /* NEC SVR4.0.2 mips cc rejects this. */
11019 struct point {int x, y;};
11020 static struct point const zero = {0,0};
11021 /* AIX XL C 1.02.0.0 rejects this.
11022 It does not let you subtract one const X* pointer from another in
11023 an arm of an if-expression whose if-part is not a constant
11024 expression */
11025 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011026 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011027 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011028 ++pcpcc;
11029 ppc = (char**) pcpcc;
11030 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011031 { /* SCO 3.2v4 cc rejects this. */
11032 char *t;
11033 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011034
Martin v. Löwis11437992002-04-12 09:54:03 +000011035 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011036 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011037 }
11038 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11039 int x[] = {25, 17};
11040 const int *foo = &x[0];
11041 ++foo;
11042 }
11043 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11044 typedef const int *iptr;
11045 iptr p = 0;
11046 ++p;
11047 }
11048 { /* AIX XL C 1.02.0.0 rejects this saying
11049 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11050 struct s { int j; const int *ap[3]; };
11051 struct s *b; b->j = 5;
11052 }
11053 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11054 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011055 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011056 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011057 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011058#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011059
Martin v. Löwis11437992002-04-12 09:54:03 +000011060 ;
11061 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011062}
Martin v. Löwis11437992002-04-12 09:54:03 +000011063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011064if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011065 ac_cv_c_const=yes
11066else
Matthias Kloseb9621712010-04-24 17:59:49 +000011067 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011070fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11072$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011073if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011074
Matthias Kloseb9621712010-04-24 17:59:49 +000011075$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011076
11077fi
11078
Michael W. Hudson54241132001-12-07 15:38:26 +000011079
Guido van Rossumda88dad1995-01-26 00:46:29 +000011080works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11082$as_echo_n "checking for working volatile... " >&6; }
11083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011084/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011085
Martin v. Löwis11437992002-04-12 09:54:03 +000011086int
11087main ()
11088{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011089volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011090 ;
11091 return 0;
11092}
11093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011094if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011095 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011096else
Skip Montanaro6dead952003-09-25 14:50:04 +000011097
Matthias Kloseb9621712010-04-24 17:59:49 +000011098$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011099
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011100
Guido van Rossum627b2d71993-12-24 10:39:16 +000011101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11104$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011105
Guido van Rossumda88dad1995-01-26 00:46:29 +000011106works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11108$as_echo_n "checking for working signed char... " >&6; }
11109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011110/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011111
Martin v. Löwis11437992002-04-12 09:54:03 +000011112int
11113main ()
11114{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011115signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011116 ;
11117 return 0;
11118}
11119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011120if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011121 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011122else
Skip Montanaro6dead952003-09-25 14:50:04 +000011123
Matthias Kloseb9621712010-04-24 17:59:49 +000011124$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011125
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011126
Guido van Rossum7f43da71994-08-01 12:15:30 +000011127fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11130$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011131
Guido van Rossumda88dad1995-01-26 00:46:29 +000011132have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11134$as_echo_n "checking for prototypes... " >&6; }
11135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011136/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011137int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011138int
11139main ()
11140{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011141return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011142 ;
11143 return 0;
11144}
11145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011146if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011147
Matthias Kloseb9621712010-04-24 17:59:49 +000011148$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011149
Matthias Kloseb159a552010-04-25 21:00:44 +000011150 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011151fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11154$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011155
Guido van Rossumda88dad1995-01-26 00:46:29 +000011156works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11158$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011160/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011161
11162#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011163int foo(int x, ...) {
11164 va_list va;
11165 va_start(va, x);
11166 va_arg(va, int);
11167 va_arg(va, char *);
11168 va_arg(va, double);
11169 return 0;
11170}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011171
Martin v. Löwis11437992002-04-12 09:54:03 +000011172int
11173main ()
11174{
Guido van Rossum90eea071996-08-30 20:58:57 +000011175return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011176 ;
11177 return 0;
11178}
11179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011180if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011181
11182
Matthias Kloseb9621712010-04-24 17:59:49 +000011183$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011184
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011185 works=yes
11186
Guido van Rossum627b2d71993-12-24 10:39:16 +000011187fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11190$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011191
Martin v. Löwisd6320502004-08-12 13:45:08 +000011192# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11194$as_echo_n "checking for socketpair... " >&6; }
11195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011196/* end confdefs.h. */
11197
11198#include <sys/types.h>
11199#include <sys/socket.h>
11200
11201int
11202main ()
11203{
11204void *x=socketpair
11205 ;
11206 return 0;
11207}
11208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011209if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011210
Matthias Kloseb9621712010-04-24 17:59:49 +000011211$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011212
Matthias Kloseb159a552010-04-25 21:00:44 +000011213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011214$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011215else
Matthias Kloseb9621712010-04-24 17:59:49 +000011216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11217$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011218
11219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011221
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011222# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11224$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011226/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011227#include <sys/types.h>
11228#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011229int
11230main ()
11231{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011232struct sockaddr x;
11233x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011234 ;
11235 return 0;
11236}
11237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011238if ac_fn_c_try_compile "$LINENO"; then :
11239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11240$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011241
Matthias Kloseb9621712010-04-24 17:59:49 +000011242$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011243
11244else
Matthias Kloseb9621712010-04-24 17:59:49 +000011245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11246$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011247
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011250
Guido van Rossumda88dad1995-01-26 00:46:29 +000011251va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11253$as_echo_n "checking whether va_list is an array... " >&6; }
11254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011255/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011256
11257#ifdef HAVE_STDARG_PROTOTYPES
11258#include <stdarg.h>
11259#else
11260#include <varargs.h>
11261#endif
11262
Martin v. Löwis11437992002-04-12 09:54:03 +000011263int
11264main ()
11265{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011266va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011267 ;
11268 return 0;
11269}
11270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011271if ac_fn_c_try_compile "$LINENO"; then :
11272
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011273else
Skip Montanaro6dead952003-09-25 14:50:04 +000011274
Martin v. Löwis11437992002-04-12 09:54:03 +000011275
Matthias Kloseb9621712010-04-24 17:59:49 +000011276$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011277
Guido van Rossumda88dad1995-01-26 00:46:29 +000011278 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011279
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11283$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011284
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011285# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011286
11287
Matthias Kloseb9621712010-04-24 17:59:49 +000011288ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020011289if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011290
Matthias Kloseb9621712010-04-24 17:59:49 +000011291 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011292
Matthias Kloseb9621712010-04-24 17:59:49 +000011293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11294$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011295 OLD_CFLAGS=$CFLAGS
11296 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011298/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011299
11300# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011301
Martin v. Löwis11437992002-04-12 09:54:03 +000011302int
11303main ()
11304{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011305
11306 char *name;
11307 struct hostent *he, *res;
11308 char buffer[2048];
11309 int buflen = 2048;
11310 int h_errnop;
11311
11312 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011313
11314 ;
11315 return 0;
11316}
11317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011318if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011319
Matthias Kloseb9621712010-04-24 17:59:49 +000011320 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011321
Martin v. Löwis11437992002-04-12 09:54:03 +000011322
Matthias Kloseb9621712010-04-24 17:59:49 +000011323$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011324
Matthias Kloseb9621712010-04-24 17:59:49 +000011325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11326$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011327
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011328else
Skip Montanaro6dead952003-09-25 14:50:04 +000011329
Matthias Kloseb9621712010-04-24 17:59:49 +000011330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11331$as_echo "no" >&6; }
11332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11333$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011335/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011336
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011337# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011338
Martin v. Löwis11437992002-04-12 09:54:03 +000011339int
11340main ()
11341{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011342
11343 char *name;
11344 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011345 char buffer[2048];
11346 int buflen = 2048;
11347 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011348
Matthias Kloseb159a552010-04-25 21:00:44 +000011349 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011350
11351 ;
11352 return 0;
11353}
11354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011355if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011356
Matthias Kloseb9621712010-04-24 17:59:49 +000011357 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011358
Martin v. Löwis11437992002-04-12 09:54:03 +000011359
Matthias Kloseb159a552010-04-25 21:00:44 +000011360$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011361
Matthias Kloseb9621712010-04-24 17:59:49 +000011362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11363$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011364
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011365else
Skip Montanaro6dead952003-09-25 14:50:04 +000011366
Matthias Kloseb9621712010-04-24 17:59:49 +000011367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11368$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11370$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11372/* end confdefs.h. */
11373
11374# include <netdb.h>
11375
11376int
11377main ()
11378{
11379
11380 char *name;
11381 struct hostent *he;
11382 struct hostent_data data;
11383
11384 (void) gethostbyname_r(name, he, &data);
11385
11386 ;
11387 return 0;
11388}
11389_ACEOF
11390if ac_fn_c_try_compile "$LINENO"; then :
11391
11392 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11393
11394
11395$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11396
11397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11398$as_echo "yes" >&6; }
11399
11400else
11401
11402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11403$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011404
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011407
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011410
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011413 CFLAGS=$OLD_CFLAGS
11414
11415else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011416
Matthias Kloseb9621712010-04-24 17:59:49 +000011417 for ac_func in gethostbyname
11418do :
11419 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020011420if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011421 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011422#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011423_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011424
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011425fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011426done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011427
Michael W. Hudson54241132001-12-07 15:38:26 +000011428
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011429fi
11430
Michael W. Hudson54241132001-12-07 15:38:26 +000011431
11432
11433
11434
11435
11436
Guido van Rossum627b2d71993-12-24 10:39:16 +000011437# checks for system services
11438# (none yet)
11439
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011440# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011441ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020011442if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011443
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011444else
Matthias Kloseb9621712010-04-24 17:59:49 +000011445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11446$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020011447if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011448 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011449else
Martin v. Löwis11437992002-04-12 09:54:03 +000011450 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011451LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011453/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011455/* Override any GCC internal prototype to avoid an error.
11456 Use char because int might match the return type of a GCC
11457 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011458#ifdef __cplusplus
11459extern "C"
11460#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011461char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011462int
11463main ()
11464{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011465return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011466 ;
11467 return 0;
11468}
11469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011470if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011471 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011472else
Matthias Kloseb9621712010-04-24 17:59:49 +000011473 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011474fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011475rm -f core conftest.err conftest.$ac_objext \
11476 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011477LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011478fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11480$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020011481if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011482 cat >>confdefs.h <<_ACEOF
11483#define HAVE_LIBIEEE 1
11484_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011485
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011486 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011487
Guido van Rossum627b2d71993-12-24 10:39:16 +000011488fi
11489
Michael W. Hudson54241132001-12-07 15:38:26 +000011490
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011491fi
11492
Michael W. Hudson54241132001-12-07 15:38:26 +000011493
Guido van Rossum7f253911997-05-09 02:42:48 +000011494# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11496$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011498# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011499if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011500 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011501if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011502then
11503
Matthias Kloseb9621712010-04-24 17:59:49 +000011504$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011505
Matthias Kloseb9621712010-04-24 17:59:49 +000011506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11507$as_echo "yes" >&6; }
11508else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11509$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011510fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011511else
Matthias Kloseb9621712010-04-24 17:59:49 +000011512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11513$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011514fi
11515
Guido van Rossum7f253911997-05-09 02:42:48 +000011516
Guido van Rossum7f43da71994-08-01 12:15:30 +000011517# check for --with-libm=...
11518
Guido van Rossum563e7081996-09-10 18:20:48 +000011519case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011520Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011521*) LIBM=-lm
11522esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11524$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011526# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011527if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011528 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011529if test "$withval" = no
11530then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11532$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011533elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011534then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11536$as_echo "set LIBM=\"$withval\"" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020011537else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011538fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011539else
Matthias Kloseb9621712010-04-24 17:59:49 +000011540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11541$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011542fi
11543
Guido van Rossum7f43da71994-08-01 12:15:30 +000011544
11545# check for --with-libc=...
11546
Matthias Kloseb9621712010-04-24 17:59:49 +000011547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11548$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011549
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011550# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011551if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011552 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011553if test "$withval" = no
11554then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11556$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011557elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011558then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11560$as_echo "set LIBC=\"$withval\"" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020011561else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011562fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011563else
Matthias Kloseb9621712010-04-24 17:59:49 +000011564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11565$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011566fi
11567
Guido van Rossum7f43da71994-08-01 12:15:30 +000011568
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011569# **************************************************
11570# * Check for various properties of floating point *
11571# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011572
Matthias Kloseb9621712010-04-24 17:59:49 +000011573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11574$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020011575if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011576 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011577else
11578
Matthias Kloseb9621712010-04-24 17:59:49 +000011579if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011580 ac_cv_little_endian_double=no
11581else
Matthias Kloseb9621712010-04-24 17:59:49 +000011582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011583/* end confdefs.h. */
11584
11585#include <string.h>
11586int main() {
11587 double x = 9006104071832581.0;
11588 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11589 return 0;
11590 else
11591 return 1;
11592}
11593
11594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011595if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011596 ac_cv_little_endian_double=yes
11597else
Matthias Kloseb9621712010-04-24 17:59:49 +000011598 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011599fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011600rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11601 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011602fi
11603
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011604fi
11605
Matthias Kloseb9621712010-04-24 17:59:49 +000011606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11607$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011608if test "$ac_cv_little_endian_double" = yes
11609then
11610
Matthias Kloseb9621712010-04-24 17:59:49 +000011611$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011612
11613fi
11614
Matthias Kloseb9621712010-04-24 17:59:49 +000011615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11616$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020011617if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011618 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011619else
11620
Matthias Kloseb9621712010-04-24 17:59:49 +000011621if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011622 ac_cv_big_endian_double=no
11623else
Matthias Kloseb9621712010-04-24 17:59:49 +000011624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011625/* end confdefs.h. */
11626
11627#include <string.h>
11628int main() {
11629 double x = 9006104071832581.0;
11630 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11631 return 0;
11632 else
11633 return 1;
11634}
11635
11636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011637if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011638 ac_cv_big_endian_double=yes
11639else
Matthias Kloseb9621712010-04-24 17:59:49 +000011640 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011641fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11643 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011644fi
11645
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011646fi
11647
Matthias Kloseb9621712010-04-24 17:59:49 +000011648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11649$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011650if test "$ac_cv_big_endian_double" = yes
11651then
11652
Matthias Kloseb9621712010-04-24 17:59:49 +000011653$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011654
11655fi
11656
11657# Some ARM platforms use a mixed-endian representation for doubles.
11658# While Python doesn't currently have full support for these platforms
11659# (see e.g., issue 1762561), we can at least make sure that float <-> string
11660# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11662$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020011663if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011664 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011665else
11666
Matthias Kloseb9621712010-04-24 17:59:49 +000011667if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011668 ac_cv_mixed_endian_double=no
11669else
Matthias Kloseb9621712010-04-24 17:59:49 +000011670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011671/* end confdefs.h. */
11672
11673#include <string.h>
11674int main() {
11675 double x = 9006104071832581.0;
11676 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11677 return 0;
11678 else
11679 return 1;
11680}
11681
11682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011683if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011684 ac_cv_mixed_endian_double=yes
11685else
Matthias Kloseb9621712010-04-24 17:59:49 +000011686 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011687fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011688rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11689 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011690fi
11691
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011692fi
11693
Matthias Kloseb9621712010-04-24 17:59:49 +000011694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11695$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011696if test "$ac_cv_mixed_endian_double" = yes
11697then
11698
Matthias Kloseb9621712010-04-24 17:59:49 +000011699$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011700
11701fi
11702
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011703# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011704# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011705# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011706# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011707# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011708# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011709
11710# This inline assembler syntax may also work for suncc and icc,
11711# so we try it on all platforms.
11712
Matthias Kloseb9621712010-04-24 17:59:49 +000011713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11714$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011716/* end confdefs.h. */
11717
11718int
11719main ()
11720{
11721
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011722 unsigned short cw;
11723 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11724 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011725
11726 ;
11727 return 0;
11728}
11729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011730if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011731 have_gcc_asm_for_x87=yes
11732else
Matthias Kloseb9621712010-04-24 17:59:49 +000011733 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011734fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11737$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011738if test "$have_gcc_asm_for_x87" = yes
11739then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011740
Matthias Kloseb9621712010-04-24 17:59:49 +000011741$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011742
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011743fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011744
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011745# Detect whether system arithmetic is subject to x87-style double
11746# rounding issues. The result of this test has little meaning on non
11747# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11748# mode is round-to-nearest and double rounding issues are present, and
11749# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11751$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011752# $BASECFLAGS may affect the result
11753ac_save_cc="$CC"
11754CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011755if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011756 ac_cv_x87_double_rounding=no
11757else
Matthias Kloseb9621712010-04-24 17:59:49 +000011758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011759/* end confdefs.h. */
11760
11761#include <stdlib.h>
11762#include <math.h>
11763int main() {
11764 volatile double x, y, z;
11765 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11766 x = 0.99999999999999989; /* 1-2**-53 */
11767 y = 1./x;
11768 if (y != 1.)
11769 exit(0);
11770 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11771 x = 1e16;
11772 y = 2.99999;
11773 z = x + y;
11774 if (z != 1e16+4.)
11775 exit(0);
11776 /* both tests show evidence of double rounding */
11777 exit(1);
11778}
11779
11780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011781if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011782 ac_cv_x87_double_rounding=no
11783else
Matthias Kloseb9621712010-04-24 17:59:49 +000011784 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011786rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11787 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011788fi
11789
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011790CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11792$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011793if test "$ac_cv_x87_double_rounding" = yes
11794then
11795
Matthias Kloseb9621712010-04-24 17:59:49 +000011796$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011797
11798fi
11799
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011800# ************************************
11801# * Check for mathematical functions *
11802# ************************************
11803
11804LIBS_SAVE=$LIBS
11805LIBS="$LIBS $LIBM"
11806
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011807for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11808do :
11809 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11810ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020011811eval as_val=\$$as_ac_var
11812 if test "x$as_val" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011813 cat >>confdefs.h <<_ACEOF
11814#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11815_ACEOF
11816
11817fi
11818done
11819
11820for ac_func in hypot lgamma log1p round tgamma
11821do :
11822 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11823ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020011824eval as_val=\$$as_ac_var
11825 if test "x$as_val" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011826 cat >>confdefs.h <<_ACEOF
11827#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11828_ACEOF
11829
11830fi
11831done
11832
11833ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11834"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020011835if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011836 ac_have_decl=1
11837else
11838 ac_have_decl=0
11839fi
11840
11841cat >>confdefs.h <<_ACEOF
11842#define HAVE_DECL_ISINF $ac_have_decl
11843_ACEOF
11844ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11845"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020011846if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011847 ac_have_decl=1
11848else
11849 ac_have_decl=0
11850fi
11851
11852cat >>confdefs.h <<_ACEOF
11853#define HAVE_DECL_ISNAN $ac_have_decl
11854_ACEOF
11855ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11856"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020011857if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011858 ac_have_decl=1
11859else
11860 ac_have_decl=0
11861fi
11862
11863cat >>confdefs.h <<_ACEOF
11864#define HAVE_DECL_ISFINITE $ac_have_decl
11865_ACEOF
11866
11867
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011868# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11869# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11871$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020011872if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011873 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011874else
11875
Matthias Kloseb9621712010-04-24 17:59:49 +000011876if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011877 ac_cv_tanh_preserves_zero_sign=no
11878else
Matthias Kloseb9621712010-04-24 17:59:49 +000011879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011880/* end confdefs.h. */
11881
11882#include <math.h>
11883#include <stdlib.h>
11884int main() {
11885 /* return 0 if either negative zeros don't exist
11886 on this platform or if negative zeros exist
11887 and tanh(-0.) == -0. */
11888 if (atan2(0., -1.) == atan2(-0., -1.) ||
11889 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11890 else exit(1);
11891}
11892
11893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011894if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011895 ac_cv_tanh_preserves_zero_sign=yes
11896else
Matthias Kloseb9621712010-04-24 17:59:49 +000011897 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011898fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011899rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11900 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011901fi
11902
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011903fi
11904
Matthias Kloseb9621712010-04-24 17:59:49 +000011905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11906$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011907if test "$ac_cv_tanh_preserves_zero_sign" = yes
11908then
11909
Matthias Kloseb9621712010-04-24 17:59:49 +000011910$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011911
11912fi
11913
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011914if test "$ac_cv_func_log1p" = yes
11915then
11916 # On some versions of AIX, log1p(-0.) returns 0. instead of
11917 # -0. See issue #9920.
11918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
11919$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020011920 if test "${ac_cv_log1p_drops_zero_sign+set}" = set; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011921 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011922else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011923
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011924 if test "$cross_compiling" = yes; then :
11925 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011926else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11928/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011929
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011930 #include <math.h>
11931 #include <stdlib.h>
11932 int main() {
11933 /* Fail if the signs of log1p(-0.) and -0. can be
11934 distinguished. */
11935 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
11936 return 0;
11937 else
11938 return 1;
11939 }
11940
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011941_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011942if ac_fn_c_try_run "$LINENO"; then :
11943 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011944else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011945 ac_cv_log1p_drops_zero_sign=yes
11946fi
11947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11948 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011949fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011950
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011951fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011952
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
11954$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
11955fi
11956if test "$ac_cv_log1p_drops_zero_sign" = yes
11957then
11958
11959$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
11960
11961fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011962
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011963LIBS=$LIBS_SAVE
11964
Mark Dickinsona614f042009-11-28 12:48:43 +000011965# For multiprocessing module, check that sem_open
11966# actually works. For FreeBSD versions <= 7.2,
11967# the kernel module that provides POSIX semaphores
11968# isn't loaded by default, so an attempt to call
11969# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11971$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020011972if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011973 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011974else
Matthias Kloseb9621712010-04-24 17:59:49 +000011975 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011976 ac_cv_posix_semaphores_enabled=yes
11977else
Matthias Kloseb9621712010-04-24 17:59:49 +000011978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011979/* end confdefs.h. */
11980
11981#include <unistd.h>
11982#include <fcntl.h>
11983#include <stdio.h>
11984#include <semaphore.h>
11985#include <sys/stat.h>
11986
11987int main(void) {
11988 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11989 if (a == SEM_FAILED) {
11990 perror("sem_open");
11991 return 1;
11992 }
11993 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011994 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011995 return 0;
11996}
11997
11998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011999if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012000 ac_cv_posix_semaphores_enabled=yes
12001else
Matthias Kloseb9621712010-04-24 17:59:49 +000012002 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012003fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012004rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12005 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012006fi
12007
12008
Mark Dickinsona614f042009-11-28 12:48:43 +000012009fi
12010
Matthias Kloseb9621712010-04-24 17:59:49 +000012011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12012$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012013if test $ac_cv_posix_semaphores_enabled = no
12014then
12015
Matthias Kloseb9621712010-04-24 17:59:49 +000012016$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012017
12018fi
12019
Mark Dickinson10683072009-04-18 21:18:19 +000012020# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12022$as_echo_n "checking for broken sem_getvalue... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020012023if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012024 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012025else
Matthias Kloseb9621712010-04-24 17:59:49 +000012026 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012027 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012028else
Matthias Kloseb9621712010-04-24 17:59:49 +000012029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012030/* end confdefs.h. */
12031
12032#include <unistd.h>
12033#include <fcntl.h>
12034#include <stdio.h>
12035#include <semaphore.h>
12036#include <sys/stat.h>
12037
12038int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012039 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012040 int count;
12041 int res;
12042 if(a==SEM_FAILED){
12043 perror("sem_open");
12044 return 1;
12045
12046 }
12047 res = sem_getvalue(a, &count);
12048 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012049 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012050 return res==-1 ? 1 : 0;
12051}
12052
Mark Dickinson10683072009-04-18 21:18:19 +000012053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012054if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012055 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012056else
Matthias Kloseb9621712010-04-24 17:59:49 +000012057 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012058fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12060 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012061fi
12062
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012063
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012064fi
12065
Matthias Kloseb9621712010-04-24 17:59:49 +000012066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12067$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012068if test $ac_cv_broken_sem_getvalue = yes
12069then
12070
Matthias Kloseb9621712010-04-24 17:59:49 +000012071$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012072
12073fi
12074
Mark Dickinsonbd792642009-03-18 20:06:12 +000012075# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12077$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012078# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012079if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012080 enableval=$enable_big_digits; case $enable_big_digits in
12081yes)
12082 enable_big_digits=30 ;;
12083no)
12084 enable_big_digits=15 ;;
1208515|30)
12086 ;;
12087*)
Antoine Pitrou6f26be02011-05-03 18:18:59 +020012088 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 +000012089esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12091$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012092
12093cat >>confdefs.h <<_ACEOF
12094#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12095_ACEOF
12096
12097
12098else
Matthias Kloseb9621712010-04-24 17:59:49 +000012099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12100$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012101fi
12102
12103
Guido van Rossumef2255b2000-03-10 22:30:29 +000012104# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012105ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020012106if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012107
12108
Matthias Kloseb9621712010-04-24 17:59:49 +000012109$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012110
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012111 wchar_h="yes"
12112
Guido van Rossumef2255b2000-03-10 22:30:29 +000012113else
Martin v. Löwis11437992002-04-12 09:54:03 +000012114 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012115
12116fi
12117
Michael W. Hudson54241132001-12-07 15:38:26 +000012118
Martin v. Löwis11437992002-04-12 09:54:03 +000012119
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012120# determine wchar_t size
12121if test "$wchar_h" = yes
12122then
Matthias Kloseb9621712010-04-24 17:59:49 +000012123 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012124# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12125# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12126# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12128$as_echo_n "checking size of wchar_t... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020012129if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012130 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012131else
Matthias Kloseb9621712010-04-24 17:59:49 +000012132 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12133"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012134
Martin v. Löwis11437992002-04-12 09:54:03 +000012135else
Matthias Kloseb9621712010-04-24 17:59:49 +000012136 if test "$ac_cv_type_wchar_t" = yes; then
12137 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12138$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +020012139{ as_fn_set_status 77
12140as_fn_error "cannot compute sizeof (wchar_t)
12141See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012142 else
12143 ac_cv_sizeof_wchar_t=0
12144 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012145fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012146
Martin v. Löwis11437992002-04-12 09:54:03 +000012147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12149$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012150
12151
12152
Martin v. Löwis11437992002-04-12 09:54:03 +000012153cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012154#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012155_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012156
Michael W. Hudson54241132001-12-07 15:38:26 +000012157
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012158fi
12159
Matthias Kloseb9621712010-04-24 17:59:49 +000012160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12161$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012162have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012164/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012165
12166#include <tcl.h>
12167#if TCL_UTF_MAX != 6
12168# error "NOT UCS4_TCL"
12169#endif
12170int
12171main ()
12172{
12173
12174 ;
12175 return 0;
12176}
12177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012178if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012179
12180
Matthias Kloseb9621712010-04-24 17:59:49 +000012181$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012182
12183 have_ucs4_tcl=yes
12184
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012185fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12188$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012189
Skip Montanaro6dead952003-09-25 14:50:04 +000012190# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012191if test "$wchar_h" = yes
12192then
12193 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12195$as_echo_n "checking whether wchar_t is signed... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020012196 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012197 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012198else
12199
Matthias Kloseb9621712010-04-24 17:59:49 +000012200 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012201 ac_cv_wchar_t_signed=yes
12202else
Matthias Kloseb9621712010-04-24 17:59:49 +000012203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012204/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012205
12206 #include <wchar.h>
12207 int main()
12208 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012209 /* Success: exit code 0 */
12210 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012211 }
12212
12213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012214if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012215 ac_cv_wchar_t_signed=yes
12216else
Matthias Kloseb9621712010-04-24 17:59:49 +000012217 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012219rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12220 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012221fi
12222
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012223fi
12224
Matthias Kloseb9621712010-04-24 17:59:49 +000012225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12226$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012227fi
12228
Matthias Kloseb9621712010-04-24 17:59:49 +000012229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12230$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012231
12232# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012233if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012234 withval=$with_wide_unicode;
12235if test "$withval" != no
12236then unicode_size="4"
12237else unicode_size="2"
12238fi
12239
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012240else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012241
Georg Brandl52d168a2008-01-07 18:10:24 +000012242case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012243 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012244 *) unicode_size="2" ;;
12245esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012246
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012247fi
12248
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012249
12250
Georg Brandl52d168a2008-01-07 18:10:24 +000012251case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012252 4)
12253 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12254
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012255 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012256 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012257 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012258 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012259esac
12260
Michael W. Hudson54241132001-12-07 15:38:26 +000012261
Martin v. Löwis11437992002-04-12 09:54:03 +000012262
Georg Brandl52d168a2008-01-07 18:10:24 +000012263# wchar_t is only usable if it maps to an unsigned type
12264if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012265 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012266then
12267 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012268
Matthias Kloseb9621712010-04-24 17:59:49 +000012269$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012270
Matthias Kloseb9621712010-04-24 17:59:49 +000012271 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012272
Georg Brandl52d168a2008-01-07 18:10:24 +000012273elif test "$ac_cv_sizeof_short" = "$unicode_size"
12274then
12275 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012276 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012277
Georg Brandl52d168a2008-01-07 18:10:24 +000012278elif test "$ac_cv_sizeof_long" = "$unicode_size"
12279then
12280 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012281 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012282
Georg Brandl52d168a2008-01-07 18:10:24 +000012283else
12284 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012285fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12287$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012288
12289# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12291$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020012292if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012293 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012294else
Matthias Kloseb9621712010-04-24 17:59:49 +000012295 ac_cv_c_bigendian=unknown
12296 # See if we're dealing with a universal compiler.
12297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12298/* end confdefs.h. */
12299#ifndef __APPLE_CC__
12300 not a universal capable compiler
12301 #endif
12302 typedef int dummy;
12303
Skip Montanaro6dead952003-09-25 14:50:04 +000012304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012305if ac_fn_c_try_compile "$LINENO"; then :
12306
12307 # Check for potential -arch flags. It is not universal unless
12308 # there are at least two -arch flags with different values.
12309 ac_arch=
12310 ac_prev=
12311 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12312 if test -n "$ac_prev"; then
12313 case $ac_word in
12314 i?86 | x86_64 | ppc | ppc64)
12315 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12316 ac_arch=$ac_word
12317 else
12318 ac_cv_c_bigendian=universal
12319 break
12320 fi
12321 ;;
12322 esac
12323 ac_prev=
12324 elif test "x$ac_word" = "x-arch"; then
12325 ac_prev=arch
12326 fi
12327 done
12328fi
12329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12330 if test $ac_cv_c_bigendian = unknown; then
12331 # See if sys/param.h defines the BYTE_ORDER macro.
12332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012333/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012334#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012335 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012336
Martin v. Löwis11437992002-04-12 09:54:03 +000012337int
12338main ()
12339{
Matthias Kloseb9621712010-04-24 17:59:49 +000012340#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12341 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12342 && LITTLE_ENDIAN)
12343 bogus endian macros
12344 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012345
12346 ;
12347 return 0;
12348}
12349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012350if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012351 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012353/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012354#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012355 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012356
Martin v. Löwis11437992002-04-12 09:54:03 +000012357int
12358main ()
12359{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012360#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012361 not big endian
12362 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012363
12364 ;
12365 return 0;
12366}
12367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012368if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012369 ac_cv_c_bigendian=yes
12370else
Matthias Kloseb9621712010-04-24 17:59:49 +000012371 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012374fi
12375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12376 fi
12377 if test $ac_cv_c_bigendian = unknown; then
12378 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012380/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012381#include <limits.h>
12382
Martin v. Löwis11437992002-04-12 09:54:03 +000012383int
12384main ()
12385{
Matthias Kloseb9621712010-04-24 17:59:49 +000012386#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12387 bogus endian macros
12388 #endif
12389
Martin v. Löwis11437992002-04-12 09:54:03 +000012390 ;
12391 return 0;
12392}
12393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012394if ac_fn_c_try_compile "$LINENO"; then :
12395 # It does; now see whether it defined to _BIG_ENDIAN or not.
12396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12397/* end confdefs.h. */
12398#include <limits.h>
12399
12400int
12401main ()
12402{
12403#ifndef _BIG_ENDIAN
12404 not big endian
12405 #endif
12406
12407 ;
12408 return 0;
12409}
12410_ACEOF
12411if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012412 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012413else
Matthias Kloseb9621712010-04-24 17:59:49 +000012414 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012415fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12417fi
12418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12419 fi
12420 if test $ac_cv_c_bigendian = unknown; then
12421 # Compile a test program.
12422 if test "$cross_compiling" = yes; then :
12423 # Try to guess by grepping values from an object file.
12424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12425/* end confdefs.h. */
12426short int ascii_mm[] =
12427 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12428 short int ascii_ii[] =
12429 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12430 int use_ascii (int i) {
12431 return ascii_mm[i] + ascii_ii[i];
12432 }
12433 short int ebcdic_ii[] =
12434 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12435 short int ebcdic_mm[] =
12436 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12437 int use_ebcdic (int i) {
12438 return ebcdic_mm[i] + ebcdic_ii[i];
12439 }
12440 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012441
Matthias Kloseb9621712010-04-24 17:59:49 +000012442int
12443main ()
12444{
12445return use_ascii (foo) == use_ebcdic (foo);
12446 ;
12447 return 0;
12448}
12449_ACEOF
12450if ac_fn_c_try_compile "$LINENO"; then :
12451 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12452 ac_cv_c_bigendian=yes
12453 fi
12454 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12455 if test "$ac_cv_c_bigendian" = unknown; then
12456 ac_cv_c_bigendian=no
12457 else
12458 # finding both strings is unlikely to happen, but who knows?
12459 ac_cv_c_bigendian=unknown
12460 fi
12461 fi
12462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012464else
Matthias Kloseb9621712010-04-24 17:59:49 +000012465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012466/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012467$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012468int
12469main ()
12470{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012471
Matthias Kloseb9621712010-04-24 17:59:49 +000012472 /* Are we little or big endian? From Harbison&Steele. */
12473 union
12474 {
12475 long int l;
12476 char c[sizeof (long int)];
12477 } u;
12478 u.l = 1;
12479 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012480
12481 ;
12482 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012483}
Martin v. Löwis11437992002-04-12 09:54:03 +000012484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012485if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012486 ac_cv_c_bigendian=no
12487else
Matthias Kloseb9621712010-04-24 17:59:49 +000012488 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012489fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012490rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12491 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012493
Matthias Kloseb9621712010-04-24 17:59:49 +000012494 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012495fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12497$as_echo "$ac_cv_c_bigendian" >&6; }
12498 case $ac_cv_c_bigendian in #(
12499 yes)
12500 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12501;; #(
12502 no)
12503 ;; #(
12504 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012505
Matthias Kloseb9621712010-04-24 17:59:49 +000012506$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012507
Matthias Kloseb9621712010-04-24 17:59:49 +000012508 ;; #(
12509 *)
Antoine Pitrou6f26be02011-05-03 18:18:59 +020012510 as_fn_error "unknown endianness
Antoine Pitrouc2244582011-01-02 19:34:03 +000012511 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012512 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012513
Michael W. Hudson54241132001-12-07 15:38:26 +000012514
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012515# ABI version string for Python extension modules. This appears between the
12516# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12517# from the following attributes which affect the ABI of this Python build (in
12518# this order):
12519#
12520# * The Python implementation (always 'cpython-' for us)
12521# * The major and minor version numbers
12522# * --with-pydebug (adds a 'd')
12523# * --with-pymalloc (adds a 'm')
12524# * --with-wide-unicode (adds a 'u')
12525#
12526# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012527# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12528# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012529
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12531$as_echo_n "checking ABIFLAGS... " >&6; }
12532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12533$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12535$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012536SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12538$as_echo "$SOABI" >&6; }
12539
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12541$as_echo_n "checking LDVERSION... " >&6; }
12542LDVERSION='$(VERSION)$(ABIFLAGS)'
12543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12544$as_echo "$LDVERSION" >&6; }
12545
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012546# SO is the extension of shared libraries `(including the dot!)
12547# -- usually .so, .sl on HP-UX, .dll on Cygwin
12548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12549$as_echo_n "checking SO... " >&6; }
12550if test -z "$SO"
12551then
12552 case $ac_sys_system in
12553 hp*|HP*)
12554 case `uname -m` in
12555 ia64) SO=.so;;
12556 *) SO=.sl;;
12557 esac
12558 ;;
12559 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012560 Linux*|GNU*)
12561 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012562 *) SO=.so;;
12563 esac
12564else
12565 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012566 echo
12567 echo '====================================================================='
12568 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012569 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012570 echo '+ Do you really mean to change the extension for shared libraries? +'
12571 echo '+ Continuing in 10 seconds to let you to ponder. +'
12572 echo '+ +'
12573 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012574 sleep 10
12575fi
12576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12577$as_echo "$SO" >&6; }
12578
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012579# Check whether right shifting a negative integer extends the sign bit
12580# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12582$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020012583if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012584 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012585else
Martin v. Löwis11437992002-04-12 09:54:03 +000012586
Matthias Kloseb9621712010-04-24 17:59:49 +000012587if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012588 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012589else
Matthias Kloseb9621712010-04-24 17:59:49 +000012590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012591/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012592
12593int main()
12594{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012595 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012596}
12597
Martin v. Löwis11437992002-04-12 09:54:03 +000012598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012599if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012600 ac_cv_rshift_extends_sign=yes
12601else
Matthias Kloseb9621712010-04-24 17:59:49 +000012602 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012603fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012604rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12605 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012606fi
12607
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012608fi
12609
Matthias Kloseb9621712010-04-24 17:59:49 +000012610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12611$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012612if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012613then
Martin v. Löwis11437992002-04-12 09:54:03 +000012614
Matthias Kloseb9621712010-04-24 17:59:49 +000012615$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012616
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012617fi
12618
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012619# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12621$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020012622if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012623 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012624else
Martin v. Löwis11437992002-04-12 09:54:03 +000012625
Matthias Kloseb9621712010-04-24 17:59:49 +000012626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012627/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012628#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012629int
12630main ()
12631{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012632
12633 FILE *f = fopen("/dev/null", "r");
12634 flockfile(f);
12635 getc_unlocked(f);
12636 funlockfile(f);
12637
Martin v. Löwis11437992002-04-12 09:54:03 +000012638 ;
12639 return 0;
12640}
12641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012642if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012643 ac_cv_have_getc_unlocked=yes
12644else
Matthias Kloseb9621712010-04-24 17:59:49 +000012645 ac_cv_have_getc_unlocked=no
12646fi
12647rm -f core conftest.err conftest.$ac_objext \
12648 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012649fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012650
Matthias Kloseb9621712010-04-24 17:59:49 +000012651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12652$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012653if test "$ac_cv_have_getc_unlocked" = yes
12654then
Martin v. Löwis11437992002-04-12 09:54:03 +000012655
Matthias Kloseb9621712010-04-24 17:59:49 +000012656$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012657
12658fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012659
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012660# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012661# save the value of LIBS so we don't actually link Python with readline
12662LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012663
Gregory P. Smith18820942008-09-07 06:24:49 +000012664# On some systems we need to link readline to a termcap compatible
12665# library. NOTE: Keep the precedence of listed libraries synchronised
12666# with setup.py.
12667py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12669$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012670for py_libtermcap in "" ncursesw ncurses curses termcap; do
12671 if test -z "$py_libtermcap"; then
12672 READLINE_LIBS="-lreadline"
12673 else
12674 READLINE_LIBS="-lreadline -l$py_libtermcap"
12675 fi
12676 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012678/* end confdefs.h. */
12679
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012680/* Override any GCC internal prototype to avoid an error.
12681 Use char because int might match the return type of a GCC
12682 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012683#ifdef __cplusplus
12684extern "C"
12685#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012686char readline ();
12687int
12688main ()
12689{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012690return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012691 ;
12692 return 0;
12693}
12694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012695if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012696 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012698rm -f core conftest.err conftest.$ac_objext \
12699 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012700 if test $py_cv_lib_readline = yes; then
12701 break
12702 fi
12703done
12704# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12705#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012706if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12708$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012709else
Matthias Kloseb9621712010-04-24 17:59:49 +000012710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12711$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012712
Matthias Kloseb9621712010-04-24 17:59:49 +000012713$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012714
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012715fi
12716
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012717# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12719$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020012720if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012721 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012722else
12723 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012724LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012726/* end confdefs.h. */
12727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012728/* Override any GCC internal prototype to avoid an error.
12729 Use char because int might match the return type of a GCC
12730 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012731#ifdef __cplusplus
12732extern "C"
12733#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012734char rl_callback_handler_install ();
12735int
12736main ()
12737{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012738return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012739 ;
12740 return 0;
12741}
12742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012743if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012744 ac_cv_lib_readline_rl_callback_handler_install=yes
12745else
Matthias Kloseb9621712010-04-24 17:59:49 +000012746 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012747fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012748rm -f core conftest.err conftest.$ac_objext \
12749 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012750LIBS=$ac_check_lib_save_LIBS
12751fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12753$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020012754if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012755
Matthias Kloseb9621712010-04-24 17:59:49 +000012756$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012757
12758fi
12759
12760
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012761# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012763/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012764#include <readline/readline.h>
12765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012766if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012767 have_readline=yes
12768else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012769 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012770
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012771fi
Antoine Pitrou6f26be02011-05-03 18:18:59 +020012772rm -f conftest.err conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012773if test $have_readline = yes
12774then
Matthias Kloseb9621712010-04-24 17:59:49 +000012775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012776/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012777#include <readline/readline.h>
12778
12779_ACEOF
12780if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012781 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012782
Matthias Kloseb9621712010-04-24 17:59:49 +000012783$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012784
12785fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012786rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012787
Matthias Kloseb9621712010-04-24 17:59:49 +000012788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012789/* end confdefs.h. */
12790#include <readline/readline.h>
12791
12792_ACEOF
12793if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012794 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012795
Matthias Kloseb9621712010-04-24 17:59:49 +000012796$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012797
12798fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012799rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012800
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012801fi
12802
Martin v. Löwis0daad592001-09-30 21:09:59 +000012803# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12805$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020012806if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012807 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012808else
Martin v. Löwis11437992002-04-12 09:54:03 +000012809 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012810LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012813
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012814/* Override any GCC internal prototype to avoid an error.
12815 Use char because int might match the return type of a GCC
12816 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012817#ifdef __cplusplus
12818extern "C"
12819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012820char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012821int
12822main ()
12823{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012824return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012825 ;
12826 return 0;
12827}
12828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012829if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012830 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012831else
Matthias Kloseb9621712010-04-24 17:59:49 +000012832 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012833fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012834rm -f core conftest.err conftest.$ac_objext \
12835 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012836LIBS=$ac_check_lib_save_LIBS
12837fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12839$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020012840if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012841
Matthias Kloseb9621712010-04-24 17:59:49 +000012842$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012843
Martin v. Löwis0daad592001-09-30 21:09:59 +000012844fi
12845
Michael W. Hudson54241132001-12-07 15:38:26 +000012846
Thomas Wouters89d996e2007-09-08 17:39:28 +000012847# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12849$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020012850if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012851 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012852else
12853 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012854LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012856/* end confdefs.h. */
12857
12858/* Override any GCC internal prototype to avoid an error.
12859 Use char because int might match the return type of a GCC
12860 builtin and then its argument prototype would still apply. */
12861#ifdef __cplusplus
12862extern "C"
12863#endif
12864char rl_completion_display_matches_hook ();
12865int
12866main ()
12867{
12868return rl_completion_display_matches_hook ();
12869 ;
12870 return 0;
12871}
12872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012873if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012874 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12875else
Matthias Kloseb9621712010-04-24 17:59:49 +000012876 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012877fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012878rm -f core conftest.err conftest.$ac_objext \
12879 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012880LIBS=$ac_check_lib_save_LIBS
12881fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12883$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020012884if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012885
Matthias Kloseb9621712010-04-24 17:59:49 +000012886$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012887
12888fi
12889
12890
Martin v. Löwis0daad592001-09-30 21:09:59 +000012891# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12893$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020012894if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012895 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012896else
Martin v. Löwis11437992002-04-12 09:54:03 +000012897 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012898LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012902/* Override any GCC internal prototype to avoid an error.
12903 Use char because int might match the return type of a GCC
12904 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012905#ifdef __cplusplus
12906extern "C"
12907#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012908char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012909int
12910main ()
12911{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012912return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012913 ;
12914 return 0;
12915}
12916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012917if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012918 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012919else
Matthias Kloseb9621712010-04-24 17:59:49 +000012920 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012922rm -f core conftest.err conftest.$ac_objext \
12923 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012924LIBS=$ac_check_lib_save_LIBS
12925fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12927$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020012928if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012929
Matthias Kloseb9621712010-04-24 17:59:49 +000012930$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012931
Guido van Rossum353ae582001-07-10 16:45:32 +000012932fi
12933
Jack Jansendd19cf82001-12-06 22:36:17 +000012934
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012935# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012937/* end confdefs.h. */
12938#include <readline/readline.h>
12939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012940if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012941 have_readline=yes
12942else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012943 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012944
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012945fi
Antoine Pitrou6f26be02011-05-03 18:18:59 +020012946rm -f conftest.err conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012947if test $have_readline = yes
12948then
Matthias Kloseb9621712010-04-24 17:59:49 +000012949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012950/* end confdefs.h. */
12951#include <readline/readline.h>
12952
12953_ACEOF
12954if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012955 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012956
Matthias Kloseb9621712010-04-24 17:59:49 +000012957$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012958
12959fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012960rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012961
12962fi
12963
Martin v. Löwis82bca632006-02-10 20:49:30 +000012964# End of readline checks: restore LIBS
12965LIBS=$LIBS_no_readline
12966
Matthias Kloseb9621712010-04-24 17:59:49 +000012967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12968$as_echo_n "checking for broken nice()... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020012969if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012970 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012971else
Martin v. Löwis11437992002-04-12 09:54:03 +000012972
Matthias Kloseb9621712010-04-24 17:59:49 +000012973if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012974 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012975else
Matthias Kloseb9621712010-04-24 17:59:49 +000012976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012977/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012978
12979int main()
12980{
12981 int val1 = nice(1);
12982 if (val1 != -1 && val1 == nice(2))
12983 exit(0);
12984 exit(1);
12985}
12986
Martin v. Löwis11437992002-04-12 09:54:03 +000012987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012988if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012989 ac_cv_broken_nice=yes
12990else
Matthias Kloseb9621712010-04-24 17:59:49 +000012991 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012993rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12994 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012995fi
12996
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012997fi
12998
Matthias Kloseb9621712010-04-24 17:59:49 +000012999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13000$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013001if test "$ac_cv_broken_nice" = yes
13002then
Martin v. Löwis11437992002-04-12 09:54:03 +000013003
Matthias Kloseb9621712010-04-24 17:59:49 +000013004$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013005
13006fi
13007
Matthias Kloseb9621712010-04-24 17:59:49 +000013008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13009$as_echo_n "checking for broken poll()... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020013010if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013011 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013012else
Matthias Kloseb9621712010-04-24 17:59:49 +000013013 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013014 ac_cv_broken_poll=no
13015else
Matthias Kloseb9621712010-04-24 17:59:49 +000013016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013017/* end confdefs.h. */
13018
13019#include <poll.h>
13020
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013021int main()
13022{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013023 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013024 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013025
13026 close (42);
13027
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013028 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013029 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013030 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013031 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013032 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013033 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013034 return 1;
13035}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013036
13037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013038if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013039 ac_cv_broken_poll=yes
13040else
Matthias Kloseb9621712010-04-24 17:59:49 +000013041 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013042fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013043rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13044 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013046
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013047fi
13048
Matthias Kloseb9621712010-04-24 17:59:49 +000013049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13050$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013051if test "$ac_cv_broken_poll" = yes
13052then
13053
Matthias Kloseb9621712010-04-24 17:59:49 +000013054$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013055
13056fi
13057
Brett Cannon43802422005-02-10 20:48:03 +000013058# 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 +000013059# (which is not required by ISO C or UNIX spec) and/or if we support
13060# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013061ac_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 +000013062#include <$ac_cv_struct_tm>
13063
Matthias Kloseb9621712010-04-24 17:59:49 +000013064"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020013065if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013066
13067cat >>confdefs.h <<_ACEOF
13068#define HAVE_STRUCT_TM_TM_ZONE 1
13069_ACEOF
13070
13071
13072fi
13073
13074if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13075
Matthias Kloseb9621712010-04-24 17:59:49 +000013076$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013077
13078else
Matthias Kloseb9621712010-04-24 17:59:49 +000013079 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13080"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020013081if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013082 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013083else
Matthias Kloseb9621712010-04-24 17:59:49 +000013084 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013085fi
13086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013087cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013088#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013089_ACEOF
13090
Matthias Kloseb9621712010-04-24 17:59:49 +000013091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13092$as_echo_n "checking for tzname... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020013093if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013094 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013095else
Matthias Kloseb9621712010-04-24 17:59:49 +000013096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013097/* end confdefs.h. */
13098#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013099#if !HAVE_DECL_TZNAME
13100extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013101#endif
13102
13103int
13104main ()
13105{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013106return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013107 ;
13108 return 0;
13109}
13110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013111if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013112 ac_cv_var_tzname=yes
13113else
Matthias Kloseb9621712010-04-24 17:59:49 +000013114 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013115fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013116rm -f core conftest.err conftest.$ac_objext \
13117 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013118fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13120$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013121 if test $ac_cv_var_tzname = yes; then
13122
Matthias Kloseb9621712010-04-24 17:59:49 +000013123$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013124
13125 fi
13126fi
13127
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013128
Martin v. Löwis1d459062005-03-14 21:23:33 +000013129# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13131$as_echo_n "checking for working tzset()... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020013132if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013133 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013134else
13135
Matthias Kloseb9621712010-04-24 17:59:49 +000013136if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013137 ac_cv_working_tzset=no
13138else
Matthias Kloseb9621712010-04-24 17:59:49 +000013139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013140/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013141
13142#include <stdlib.h>
13143#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013144#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013145
13146#if HAVE_TZNAME
13147extern char *tzname[];
13148#endif
13149
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013150int main()
13151{
Brett Cannon18367812003-09-19 00:59:16 +000013152 /* Note that we need to ensure that not only does tzset(3)
13153 do 'something' with localtime, but it works as documented
13154 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013155 This includes making sure that tzname is set properly if
13156 tm->tm_zone does not exist since it is the alternative way
13157 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013158
13159 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013160 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013161 */
13162
Martin v. Löwis1d459062005-03-14 21:23:33 +000013163 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013164 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13165
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013166 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013167 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013168 if (localtime(&groundhogday)->tm_hour != 0)
13169 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013170#if HAVE_TZNAME
13171 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13172 if (strcmp(tzname[0], "UTC") ||
13173 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13174 exit(1);
13175#endif
Brett Cannon18367812003-09-19 00:59:16 +000013176
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013177 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013178 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013179 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013180 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013181#if HAVE_TZNAME
13182 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13183 exit(1);
13184#endif
Brett Cannon18367812003-09-19 00:59:16 +000013185
13186 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13187 tzset();
13188 if (localtime(&groundhogday)->tm_hour != 11)
13189 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013190#if HAVE_TZNAME
13191 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13192 exit(1);
13193#endif
13194
13195#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013196 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13197 exit(1);
13198 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13199 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013200#endif
Brett Cannon18367812003-09-19 00:59:16 +000013201
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013202 exit(0);
13203}
13204
13205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013206if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013207 ac_cv_working_tzset=yes
13208else
Matthias Kloseb9621712010-04-24 17:59:49 +000013209 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013211rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13212 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013213fi
13214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013215fi
13216
Matthias Kloseb9621712010-04-24 17:59:49 +000013217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13218$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013219if test "$ac_cv_working_tzset" = yes
13220then
13221
Matthias Kloseb9621712010-04-24 17:59:49 +000013222$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013223
13224fi
13225
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013226# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13228$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020013229if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013230 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013231else
Matthias Kloseb9621712010-04-24 17:59:49 +000013232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013233/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013234#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013235int
13236main ()
13237{
13238
13239struct stat st;
13240st.st_mtim.tv_nsec = 1;
13241
13242 ;
13243 return 0;
13244}
13245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013246if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013247 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013248else
Matthias Kloseb9621712010-04-24 17:59:49 +000013249 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13252fi
13253
Matthias Kloseb9621712010-04-24 17:59:49 +000013254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13255$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013256if test "$ac_cv_stat_tv_nsec" = yes
13257then
13258
Matthias Kloseb9621712010-04-24 17:59:49 +000013259$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013260
13261fi
13262
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013263# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13265$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020013266if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013267 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013268else
Matthias Kloseb9621712010-04-24 17:59:49 +000013269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013270/* end confdefs.h. */
13271#include <sys/stat.h>
13272int
13273main ()
13274{
13275
13276struct stat st;
13277st.st_mtimespec.tv_nsec = 1;
13278
13279 ;
13280 return 0;
13281}
13282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013283if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013284 ac_cv_stat_tv_nsec2=yes
13285else
Matthias Kloseb9621712010-04-24 17:59:49 +000013286 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13289fi
13290
Matthias Kloseb9621712010-04-24 17:59:49 +000013291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13292$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013293if test "$ac_cv_stat_tv_nsec2" = yes
13294then
13295
Matthias Kloseb9621712010-04-24 17:59:49 +000013296$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013297
13298fi
13299
Jack Jansen666b1e72001-10-31 12:11:48 +000013300# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13302$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020013303if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013304 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013305else
Matthias Kloseb9621712010-04-24 17:59:49 +000013306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013307/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013308#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013309int
13310main ()
13311{
Jack Jansen666b1e72001-10-31 12:11:48 +000013312
13313 int rtn;
13314 rtn = mvwdelch(0,0,0);
13315
Martin v. Löwis11437992002-04-12 09:54:03 +000013316 ;
13317 return 0;
13318}
13319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013320if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013321 ac_cv_mvwdelch_is_expression=yes
13322else
Matthias Kloseb9621712010-04-24 17:59:49 +000013323 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13326fi
13327
Matthias Kloseb9621712010-04-24 17:59:49 +000013328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13329$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013330
13331if test "$ac_cv_mvwdelch_is_expression" = yes
13332then
Martin v. Löwis11437992002-04-12 09:54:03 +000013333
Matthias Kloseb9621712010-04-24 17:59:49 +000013334$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013335
13336fi
13337
Matthias Kloseb9621712010-04-24 17:59:49 +000013338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13339$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020013340if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013341 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013342else
Matthias Kloseb9621712010-04-24 17:59:49 +000013343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013344/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013345#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013346int
13347main ()
13348{
Jack Jansen666b1e72001-10-31 12:11:48 +000013349
13350 WINDOW *w;
13351 w->_flags = 0;
13352
Martin v. Löwis11437992002-04-12 09:54:03 +000013353 ;
13354 return 0;
13355}
13356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013357if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013358 ac_cv_window_has_flags=yes
13359else
Matthias Kloseb9621712010-04-24 17:59:49 +000013360 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13363fi
13364
Matthias Kloseb9621712010-04-24 17:59:49 +000013365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13366$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013367
Jack Jansen666b1e72001-10-31 12:11:48 +000013368
13369if test "$ac_cv_window_has_flags" = yes
13370then
Martin v. Löwis11437992002-04-12 09:54:03 +000013371
Matthias Kloseb9621712010-04-24 17:59:49 +000013372$as_echo "#define WINDOW_HAS_FLAGS 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 for is_term_resized" >&5
13377$as_echo_n "checking for is_term_resized... " >&6; }
13378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013379/* end confdefs.h. */
13380#include <curses.h>
13381int
13382main ()
13383{
13384void *x=is_term_resized
13385 ;
13386 return 0;
13387}
13388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013389if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013390
Matthias Kloseb9621712010-04-24 17:59:49 +000013391$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013392
Matthias Kloseb159a552010-04-25 21:00:44 +000013393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013394$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013395else
Matthias Kloseb9621712010-04-24 17:59:49 +000013396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13397$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013398
13399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13401
Matthias Kloseb9621712010-04-24 17:59:49 +000013402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13403$as_echo_n "checking for resize_term... " >&6; }
13404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013405/* end confdefs.h. */
13406#include <curses.h>
13407int
13408main ()
13409{
13410void *x=resize_term
13411 ;
13412 return 0;
13413}
13414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013415if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013416
Matthias Kloseb9621712010-04-24 17:59:49 +000013417$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013418
Matthias Kloseb159a552010-04-25 21:00:44 +000013419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013420$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013421else
Matthias Kloseb9621712010-04-24 17:59:49 +000013422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13423$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013424
13425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13427
Matthias Kloseb9621712010-04-24 17:59:49 +000013428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13429$as_echo_n "checking for resizeterm... " >&6; }
13430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013431/* end confdefs.h. */
13432#include <curses.h>
13433int
13434main ()
13435{
13436void *x=resizeterm
13437 ;
13438 return 0;
13439}
13440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013441if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013442
Matthias Kloseb9621712010-04-24 17:59:49 +000013443$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013444
Matthias Kloseb159a552010-04-25 21:00:44 +000013445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013446$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013447else
Matthias Kloseb9621712010-04-24 17:59:49 +000013448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13449$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013450
13451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13453
Matthias Kloseb9621712010-04-24 17:59:49 +000013454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13455$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013456
13457if test -r /dev/ptmx
13458then
Matthias Kloseb9621712010-04-24 17:59:49 +000013459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13460$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013461
Matthias Kloseb9621712010-04-24 17:59:49 +000013462$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013463
Thomas Wouters89f507f2006-12-13 04:49:30 +000013464else
Matthias Kloseb9621712010-04-24 17:59:49 +000013465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13466$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013467fi
13468
Matthias Kloseb9621712010-04-24 17:59:49 +000013469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13470$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013471
13472if test -r /dev/ptc
13473then
Matthias Kloseb9621712010-04-24 17:59:49 +000013474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13475$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013476
Matthias Kloseb9621712010-04-24 17:59:49 +000013477$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013478
Thomas Wouters89f507f2006-12-13 04:49:30 +000013479else
Matthias Kloseb9621712010-04-24 17:59:49 +000013480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13481$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013482fi
13483
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013484if test "$have_long_long" = yes
13485then
Matthias Kloseb9621712010-04-24 17:59:49 +000013486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13487$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020013488 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013489 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013490else
Matthias Kloseb9621712010-04-24 17:59:49 +000013491 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013492 ac_cv_have_long_long_format=no
13493else
Matthias Kloseb9621712010-04-24 17:59:49 +000013494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013495/* end confdefs.h. */
13496
13497 #include <stdio.h>
13498 #include <stddef.h>
13499 #include <string.h>
13500
13501 #ifdef HAVE_SYS_TYPES_H
13502 #include <sys/types.h>
13503 #endif
13504
13505 int main()
13506 {
13507 char buffer[256];
13508
13509 if (sprintf(buffer, "%lld", (long long)123) < 0)
13510 return 1;
13511 if (strcmp(buffer, "123"))
13512 return 1;
13513
13514 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13515 return 1;
13516 if (strcmp(buffer, "-123"))
13517 return 1;
13518
13519 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13520 return 1;
13521 if (strcmp(buffer, "123"))
13522 return 1;
13523
13524 return 0;
13525 }
13526
13527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013528if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013529 ac_cv_have_long_long_format=yes
13530else
Matthias Kloseb9621712010-04-24 17:59:49 +000013531 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013532fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013533rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13534 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013535fi
13536
13537
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013538fi
13539
Matthias Kloseb9621712010-04-24 17:59:49 +000013540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13541$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013542fi
13543
Mark Dickinson89d7d412009-12-31 20:50:59 +000013544if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013545then
13546
Matthias Kloseb9621712010-04-24 17:59:49 +000013547$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013548
13549fi
13550
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013551if test $ac_sys_system = Darwin
13552then
13553 LIBS="$LIBS -framework CoreFoundation"
13554fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013555
Matthias Kloseb9621712010-04-24 17:59:49 +000013556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13557$as_echo_n "checking for %zd printf() format support... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020013558if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013559 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013560else
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013562 ac_cv_have_size_t_format="cross -- assuming yes"
13563
Thomas Wouters477c8d52006-05-27 19:21:47 +000013564else
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013566/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013567
Thomas Wouters477c8d52006-05-27 19:21:47 +000013568#include <stdio.h>
13569#include <stddef.h>
13570#include <string.h>
13571
Christian Heimes2c181612007-12-17 20:04:13 +000013572#ifdef HAVE_SYS_TYPES_H
13573#include <sys/types.h>
13574#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013575
13576#ifdef HAVE_SSIZE_T
13577typedef ssize_t Py_ssize_t;
13578#elif SIZEOF_VOID_P == SIZEOF_LONG
13579typedef long Py_ssize_t;
13580#else
13581typedef int Py_ssize_t;
13582#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013583
Christian Heimes2c181612007-12-17 20:04:13 +000013584int main()
13585{
13586 char buffer[256];
13587
Thomas Wouters477c8d52006-05-27 19:21:47 +000013588 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13589 return 1;
13590
Thomas Wouters89f507f2006-12-13 04:49:30 +000013591 if (strcmp(buffer, "123"))
13592 return 1;
13593
13594 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13595 return 1;
13596
13597 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013598 return 1;
13599
13600 return 0;
13601}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013602
Thomas Wouters477c8d52006-05-27 19:21:47 +000013603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013604if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013605 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013606else
Matthias Kloseb9621712010-04-24 17:59:49 +000013607 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013608fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013609rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13610 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013611fi
13612
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013613fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13615$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013616if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013617
Matthias Kloseb9621712010-04-24 17:59:49 +000013618$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013619
13620fi
13621
Matthias Kloseb9621712010-04-24 17:59:49 +000013622ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013623#ifdef HAVE_SYS_TYPES_H
13624#include <sys/types.h>
13625#endif
13626#ifdef HAVE_SYS_SOCKET_H
13627#include <sys/socket.h>
13628#endif
13629
Matthias Kloseb9621712010-04-24 17:59:49 +000013630"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020013631if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013632
Martin v. Löwis11437992002-04-12 09:54:03 +000013633else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013634
Matthias Kloseb9621712010-04-24 17:59:49 +000013635$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013636
13637fi
13638
Michael W. Hudson54241132001-12-07 15:38:26 +000013639
Matthias Kloseb9621712010-04-24 17:59:49 +000013640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13641$as_echo_n "checking for broken mbstowcs... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020013642if test "${ac_cv_broken_mbstowcs+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013643 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013644else
Matthias Kloseb9621712010-04-24 17:59:49 +000013645 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013646 ac_cv_broken_mbstowcs=no
13647else
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013649/* end confdefs.h. */
13650
13651#include<stdlib.h>
13652int main() {
13653 size_t len = -1;
13654 const char *str = "text";
13655 len = mbstowcs(NULL, str, 0);
13656 return (len != 4);
13657}
13658
13659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013660if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013661 ac_cv_broken_mbstowcs=no
13662else
Matthias Kloseb9621712010-04-24 17:59:49 +000013663 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013664fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013665rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13666 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013667fi
13668
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013669fi
13670
Matthias Kloseb9621712010-04-24 17:59:49 +000013671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13672$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013673if test "$ac_cv_broken_mbstowcs" = yes
13674then
13675
Matthias Kloseb9621712010-04-24 17:59:49 +000013676$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013677
13678fi
13679
Antoine Pitrou042b1282010-08-13 21:15:58 +000013680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13681$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Antoine Pitrou6f26be02011-05-03 18:18:59 +020013682if test "${ac_cv_computed_gotos+set}" = set; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013683 $as_echo_n "(cached) " >&6
13684else
13685 if test "$cross_compiling" = yes; then :
13686 ac_cv_computed_gotos=no
13687else
13688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13689/* end confdefs.h. */
13690
13691int main(int argc, char **argv)
13692{
13693 static void *targets[1] = { &&LABEL1 };
13694 goto LABEL2;
13695LABEL1:
13696 return 0;
13697LABEL2:
13698 goto *targets[0];
13699 return 1;
13700}
13701
13702_ACEOF
13703if ac_fn_c_try_run "$LINENO"; then :
13704 ac_cv_computed_gotos=yes
13705else
13706 ac_cv_computed_gotos=no
13707fi
13708rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13709 conftest.$ac_objext conftest.beam conftest.$ac_ext
13710fi
13711
13712fi
13713
13714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13715$as_echo "$ac_cv_computed_gotos" >&6; }
13716if test "$ac_cv_computed_gotos" = yes
13717then
13718
13719$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13720
13721fi
13722
Antoine Pitroub52ec782009-01-25 16:34:23 +000013723# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13725$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013726
13727# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013728if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013729 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013730if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013731then
13732
Matthias Kloseb9621712010-04-24 17:59:49 +000013733$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013734
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13736$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013737fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013738if test "$withval" = no
13739then
13740
13741$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13742
Matthias Kloseb9621712010-04-24 17:59:49 +000013743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13744$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013745fi
13746
Antoine Pitrou042b1282010-08-13 21:15:58 +000013747else
13748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13749$as_echo "no value specified" >&6; }
13750fi
13751
Antoine Pitroub52ec782009-01-25 16:34:23 +000013752
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013753case $ac_sys_system in
13754AIX*)
13755
13756$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13757 ;;
13758esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013759
Michael W. Hudson54241132001-12-07 15:38:26 +000013760
Gregory P. Smith138fa432010-12-13 08:00:52 +000013761ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020013762if test "x$ac_cv_func_pipe2" = x""yes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013763
13764$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13765
13766fi
Jesus Cea6a792292010-05-03 21:18:48 +000013767
13768
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013769
13770
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013771for h in `(cd $srcdir;echo Python/thread_*.h)`
13772do
13773 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13774done
13775
Michael W. Hudson54241132001-12-07 15:38:26 +000013776
Neal Norwitzd24499d2005-12-18 21:36:39 +000013777SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13779$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013780for dir in $SRCDIRS; do
13781 if test ! -d $dir; then
13782 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013783 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013784done
Matthias Kloseb9621712010-04-24 17:59:49 +000013785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13786$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013787
Guido van Rossum627b2d71993-12-24 10:39:16 +000013788# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013789ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013790
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013791ac_config_files="$ac_config_files Modules/ld_so_aix"
13792
Martin v. Löwis11437992002-04-12 09:54:03 +000013793cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013794# This file is a shell script that caches the results of configure
13795# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013796# scripts and configure runs, see configure's option --config-cache.
13797# It is not useful on other systems. If it contains results you don't
13798# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013799#
Martin v. Löwis11437992002-04-12 09:54:03 +000013800# config.status only pays attention to the cache file if you give it
13801# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013802#
Skip Montanaro6dead952003-09-25 14:50:04 +000013803# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013804# loading this file, other *unset* `ac_cv_foo' will be assigned the
13805# following values.
13806
13807_ACEOF
13808
Guido van Rossumf78abae1997-01-21 22:02:36 +000013809# The following way of writing the cache mishandles newlines in values,
13810# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013811# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013812# Ultrix sh set writes to stderr and can't be redirected directly,
13813# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013814(
13815 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13816 eval ac_val=\$$ac_var
13817 case $ac_val in #(
13818 *${as_nl}*)
13819 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013820 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13821$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013822 esac
13823 case $ac_var in #(
13824 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013825 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13826 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013827 esac ;;
13828 esac
13829 done
13830
Martin v. Löwis11437992002-04-12 09:54:03 +000013831 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013832 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13833 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013834 # `set' does not quote correctly, so add quotes: double-quote
13835 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013836 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013837 "s/'/'\\\\''/g;
13838 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013839 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013840 *)
13841 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013842 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013843 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013844 esac |
13845 sort
13846) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013847 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013848 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013849 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013850 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013851 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13852 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013853 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13854 :end' >>confcache
13855if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13856 if test -w "$cache_file"; then
Antoine Pitrou6f26be02011-05-03 18:18:59 +020013857 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013858 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13859$as_echo "$as_me: updating cache $cache_file" >&6;}
Antoine Pitrou6f26be02011-05-03 18:18:59 +020013860 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013861 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013862 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13863$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013864 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013865fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013866rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013867
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013868test "x$prefix" = xNONE && prefix=$ac_default_prefix
13869# Let make expand exec_prefix.
13870test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013871
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013872DEFS=-DHAVE_CONFIG_H
13873
Skip Montanaro6dead952003-09-25 14:50:04 +000013874ac_libobjs=
13875ac_ltlibobjs=
13876for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13877 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013878 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013879 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013880 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13881 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013882 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13883 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013884done
13885LIBOBJS=$ac_libobjs
13886
13887LTLIBOBJS=$ac_ltlibobjs
13888
13889
Martin v. Löwis11437992002-04-12 09:54:03 +000013890
Matthias Kloseb9621712010-04-24 17:59:49 +000013891
Antoine Pitrou6f26be02011-05-03 18:18:59 +020013892: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013893ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013894ac_clean_files_save=$ac_clean_files
13895ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013896{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13897$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13898as_write_fail=0
13899cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013900#! $SHELL
13901# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013902# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013903# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013904# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013905
Martin v. Löwis11437992002-04-12 09:54:03 +000013906debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013907ac_cs_recheck=false
13908ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013909
Matthias Kloseb9621712010-04-24 17:59:49 +000013910SHELL=\${CONFIG_SHELL-$SHELL}
13911export SHELL
13912_ASEOF
13913cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13914## -------------------- ##
13915## M4sh Initialization. ##
13916## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013917
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013918# Be more Bourne compatible
13919DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013920if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013921 emulate sh
13922 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013923 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013924 # is contrary to our usage. Disable this feature.
13925 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013926 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013927else
Matthias Kloseb9621712010-04-24 17:59:49 +000013928 case `(set -o) 2>/dev/null` in #(
13929 *posix*) :
13930 set -o posix ;; #(
13931 *) :
13932 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013933esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013934fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013935
13936
Matthias Kloseb9621712010-04-24 17:59:49 +000013937as_nl='
13938'
13939export as_nl
13940# Printing a long string crashes Solaris 7 /usr/bin/printf.
13941as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13942as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13943as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13944# Prefer a ksh shell builtin over an external printf program on Solaris,
13945# but without wasting forks for bash or zsh.
13946if test -z "$BASH_VERSION$ZSH_VERSION" \
13947 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13948 as_echo='print -r --'
13949 as_echo_n='print -rn --'
13950elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13951 as_echo='printf %s\n'
13952 as_echo_n='printf %s'
13953else
13954 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13955 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13956 as_echo_n='/usr/ucb/echo -n'
13957 else
13958 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13959 as_echo_n_body='eval
13960 arg=$1;
13961 case $arg in #(
13962 *"$as_nl"*)
13963 expr "X$arg" : "X\\(.*\\)$as_nl";
13964 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13965 esac;
13966 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13967 '
13968 export as_echo_n_body
13969 as_echo_n='sh -c $as_echo_n_body as_echo'
13970 fi
13971 export as_echo_body
13972 as_echo='sh -c $as_echo_body as_echo'
13973fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013974
13975# The user is always right.
13976if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013977 PATH_SEPARATOR=:
13978 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13979 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13980 PATH_SEPARATOR=';'
13981 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013982fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013984
13985# IFS
13986# We need space, tab and new line, in precisely that order. Quoting is
13987# there to prevent editors from complaining about space-tab.
13988# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13989# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013990IFS=" "" $as_nl"
13991
13992# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013993case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013994 *[\\/]* ) as_myself=$0 ;;
13995 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013996for as_dir in $PATH
13997do
13998 IFS=$as_save_IFS
13999 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014000 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14001 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014002IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014003
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014004 ;;
14005esac
14006# We did not find ourselves, most probably we were run as `sh COMMAND'
14007# in which case we are not to be found in the path.
14008if test "x$as_myself" = x; then
14009 as_myself=$0
14010fi
14011if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014012 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14013 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014014fi
14015
Matthias Kloseb9621712010-04-24 17:59:49 +000014016# Unset variables that we do not need and which cause bugs (e.g. in
14017# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14018# suppresses any "Segmentation fault" message there. '((' could
14019# trigger a bug in pdksh 5.2.14.
14020for as_var in BASH_ENV ENV MAIL MAILPATH
14021do eval test x\${$as_var+set} = xset \
14022 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014023done
14024PS1='$ '
14025PS2='> '
14026PS4='+ '
14027
14028# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014029LC_ALL=C
14030export LC_ALL
14031LANGUAGE=C
14032export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014033
Matthias Kloseb9621712010-04-24 17:59:49 +000014034# CDPATH.
14035(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14036
14037
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014038# as_fn_error ERROR [LINENO LOG_FD]
14039# ---------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014040# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14041# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014042# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014043as_fn_error ()
14044{
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014045 as_status=$?; test $as_status -eq 0 && as_status=1
14046 if test "$3"; then
14047 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14048 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +000014049 fi
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014050 $as_echo "$as_me: error: $1" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014051 as_fn_exit $as_status
14052} # as_fn_error
14053
14054
14055# as_fn_set_status STATUS
14056# -----------------------
14057# Set $? to STATUS, without forking.
14058as_fn_set_status ()
14059{
14060 return $1
14061} # as_fn_set_status
14062
14063# as_fn_exit STATUS
14064# -----------------
14065# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14066as_fn_exit ()
14067{
14068 set +e
14069 as_fn_set_status $1
14070 exit $1
14071} # as_fn_exit
14072
14073# as_fn_unset VAR
14074# ---------------
14075# Portably unset VAR.
14076as_fn_unset ()
14077{
14078 { eval $1=; unset $1;}
14079}
14080as_unset=as_fn_unset
14081# as_fn_append VAR VALUE
14082# ----------------------
14083# Append the text in VALUE to the end of the definition contained in VAR. Take
14084# advantage of any shell optimizations that allow amortized linear growth over
14085# repeated appends, instead of the typical quadratic growth present in naive
14086# implementations.
14087if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14088 eval 'as_fn_append ()
14089 {
14090 eval $1+=\$2
14091 }'
14092else
14093 as_fn_append ()
14094 {
14095 eval $1=\$$1\$2
14096 }
14097fi # as_fn_append
14098
14099# as_fn_arith ARG...
14100# ------------------
14101# Perform arithmetic evaluation on the ARGs, and store the result in the
14102# global $as_val. Take advantage of shells that can avoid forks. The arguments
14103# must be portable across $(()) and expr.
14104if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14105 eval 'as_fn_arith ()
14106 {
14107 as_val=$(( $* ))
14108 }'
14109else
14110 as_fn_arith ()
14111 {
14112 as_val=`expr "$@" || test $? -eq 1`
14113 }
14114fi # as_fn_arith
14115
14116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014117if expr a : '\(a\)' >/dev/null 2>&1 &&
14118 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14119 as_expr=expr
14120else
14121 as_expr=false
14122fi
14123
14124if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14125 as_basename=basename
14126else
14127 as_basename=false
14128fi
14129
Matthias Kloseb9621712010-04-24 17:59:49 +000014130if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14131 as_dirname=dirname
14132else
14133 as_dirname=false
14134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014136as_me=`$as_basename -- "$0" ||
14137$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14138 X"$0" : 'X\(//\)$' \| \
14139 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014140$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014141 sed '/^.*\/\([^/][^/]*\)\/*$/{
14142 s//\1/
14143 q
14144 }
14145 /^X\/\(\/\/\)$/{
14146 s//\1/
14147 q
14148 }
14149 /^X\/\(\/\).*/{
14150 s//\1/
14151 q
14152 }
14153 s/.*/./; q'`
14154
Matthias Kloseb9621712010-04-24 17:59:49 +000014155# Avoid depending upon Character Ranges.
14156as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14157as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14158as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14159as_cr_digits='0123456789'
14160as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014161
14162ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014163case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014164-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014165 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014166 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014167 xy) ECHO_C='\c';;
14168 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14169 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014170 esac;;
14171*)
14172 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014173esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014174
Martin v. Löwis11437992002-04-12 09:54:03 +000014175rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014176if test -d conf$$.dir; then
14177 rm -f conf$$.dir/conf$$.file
14178else
14179 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014180 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014182if (echo >conf$$.file) 2>/dev/null; then
14183 if ln -s conf$$.file conf$$ 2>/dev/null; then
14184 as_ln_s='ln -s'
14185 # ... but there are two gotchas:
14186 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14187 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14188 # In both cases, we have to default to `cp -p'.
14189 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14190 as_ln_s='cp -p'
14191 elif ln conf$$.file conf$$ 2>/dev/null; then
14192 as_ln_s=ln
14193 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014194 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014196else
14197 as_ln_s='cp -p'
14198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014199rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14200rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014201
Matthias Kloseb9621712010-04-24 17:59:49 +000014202
14203# as_fn_mkdir_p
14204# -------------
14205# Create "$as_dir" as a directory, including parents if necessary.
14206as_fn_mkdir_p ()
14207{
14208
14209 case $as_dir in #(
14210 -*) as_dir=./$as_dir;;
14211 esac
14212 test -d "$as_dir" || eval $as_mkdir_p || {
14213 as_dirs=
14214 while :; do
14215 case $as_dir in #(
14216 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14217 *) as_qdir=$as_dir;;
14218 esac
14219 as_dirs="'$as_qdir' $as_dirs"
14220 as_dir=`$as_dirname -- "$as_dir" ||
14221$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14222 X"$as_dir" : 'X\(//\)[^/]' \| \
14223 X"$as_dir" : 'X\(//\)$' \| \
14224 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14225$as_echo X"$as_dir" |
14226 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14227 s//\1/
14228 q
14229 }
14230 /^X\(\/\/\)[^/].*/{
14231 s//\1/
14232 q
14233 }
14234 /^X\(\/\/\)$/{
14235 s//\1/
14236 q
14237 }
14238 /^X\(\/\).*/{
14239 s//\1/
14240 q
14241 }
14242 s/.*/./; q'`
14243 test -d "$as_dir" && break
14244 done
14245 test -z "$as_dirs" || eval "mkdir $as_dirs"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014246 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014247
14248
14249} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014250if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014251 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014252else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014253 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014254 as_mkdir_p=false
14255fi
14256
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014257if test -x / >/dev/null 2>&1; then
14258 as_test_x='test -x'
14259else
14260 if ls -dL / >/dev/null 2>&1; then
14261 as_ls_L_option=L
14262 else
14263 as_ls_L_option=
14264 fi
14265 as_test_x='
14266 eval sh -c '\''
14267 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014268 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014269 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014270 case $1 in #(
14271 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014272 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014273 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014274 ???[sx]*):;;*)false;;esac;fi
14275 '\'' sh
14276 '
14277fi
14278as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014279
14280# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014281as_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 +000014282
14283# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014284as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014285
14286
Martin v. Löwis11437992002-04-12 09:54:03 +000014287exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014288## ----------------------------------- ##
14289## Main body of $CONFIG_STATUS script. ##
14290## ----------------------------------- ##
14291_ASEOF
14292test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014293
Matthias Kloseb9621712010-04-24 17:59:49 +000014294cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14295# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014296# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014297# values after options handling.
14298ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014299This file was extended by python $as_me 3.3, which was
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014300generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014301
14302 CONFIG_FILES = $CONFIG_FILES
14303 CONFIG_HEADERS = $CONFIG_HEADERS
14304 CONFIG_LINKS = $CONFIG_LINKS
14305 CONFIG_COMMANDS = $CONFIG_COMMANDS
14306 $ $0 $@
14307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014308on `(hostname || uname -n) 2>/dev/null | sed 1q`
14309"
14310
Martin v. Löwis11437992002-04-12 09:54:03 +000014311_ACEOF
14312
Matthias Kloseb9621712010-04-24 17:59:49 +000014313case $ac_config_files in *"
14314"*) set x $ac_config_files; shift; ac_config_files=$*;;
14315esac
14316
14317case $ac_config_headers in *"
14318"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14319esac
14320
14321
14322cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014323# Files that config.status was made for.
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014324config_files="`echo $ac_config_files`"
14325config_headers="`echo $ac_config_headers`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014327_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014328
Matthias Kloseb9621712010-04-24 17:59:49 +000014329cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014330ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014331\`$as_me' instantiates files and other configuration actions
14332from templates according to the current configuration. Unless the files
14333and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014334
Matthias Kloseb9621712010-04-24 17:59:49 +000014335Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014336
14337 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014338 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014339 --config print configuration, then exit
14340 -q, --quiet, --silent
14341 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014342 -d, --debug don't remove temporary files
14343 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014344 --file=FILE[:TEMPLATE]
14345 instantiate the configuration file FILE
14346 --header=FILE[:TEMPLATE]
14347 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014348
14349Configuration files:
14350$config_files
14351
14352Configuration headers:
14353$config_headers
14354
Matthias Kloseb9621712010-04-24 17:59:49 +000014355Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014356
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014358cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14359ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014360ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014361python config.status 3.3
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014362configured by $0, generated by GNU Autoconf 2.65,
Matthias Kloseb9621712010-04-24 17:59:49 +000014363 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014364
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014365Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014366This config.status script is free software; the Free Software Foundation
14367gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014368
14369ac_pwd='$ac_pwd'
14370srcdir='$srcdir'
14371INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014372test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014373_ACEOF
14374
Matthias Kloseb9621712010-04-24 17:59:49 +000014375cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14376# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014377ac_need_defaults=:
14378while test $# != 0
14379do
14380 case $1 in
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014381 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014382 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14383 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014384 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014385 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014386 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014387 ac_option=$1
14388 ac_optarg=$2
14389 ac_shift=shift
14390 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014391 esac
14392
Skip Montanaro6dead952003-09-25 14:50:04 +000014393 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014394 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014395 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14396 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014397 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014398 $as_echo "$ac_cs_version"; exit ;;
14399 --config | --confi | --conf | --con | --co | --c )
14400 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014401 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014402 debug=: ;;
14403 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014404 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014405 case $ac_optarg in
14406 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14407 esac
14408 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014409 ac_need_defaults=false;;
14410 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014411 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014412 case $ac_optarg in
14413 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14414 esac
14415 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014416 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014417 --he | --h)
14418 # Conflict between --help and --header
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014419 as_fn_error "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014420Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014421 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014422 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014423 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14424 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14425 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014426
14427 # This is an error.
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014428 -*) as_fn_error "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014429Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014430
Matthias Kloseb9621712010-04-24 17:59:49 +000014431 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014432 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014433
14434 esac
14435 shift
14436done
14437
Skip Montanaro6dead952003-09-25 14:50:04 +000014438ac_configure_extra_args=
14439
14440if $ac_cs_silent; then
14441 exec 6>/dev/null
14442 ac_configure_extra_args="$ac_configure_extra_args --silent"
14443fi
14444
14445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014446cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014447if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014448 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14449 shift
14450 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14451 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014452 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014453 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014454fi
14455
Martin v. Löwis11437992002-04-12 09:54:03 +000014456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014457cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014458exec 5>>config.log
14459{
14460 echo
14461 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14462## Running $as_me. ##
14463_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014464 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014465} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014468cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014469_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014470
Matthias Kloseb9621712010-04-24 17:59:49 +000014471cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014472
14473# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014474for ac_config_target in $ac_config_targets
14475do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014476 case $ac_config_target in
14477 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14478 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14479 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014480 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14481 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014482 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14483 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014484 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014485 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014486
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014487 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014488 esac
14489done
14490
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014491
Martin v. Löwis11437992002-04-12 09:54:03 +000014492# If the user did not use the arguments to specify the items to instantiate,
14493# then the envvar interface is used. Set only those that are not.
14494# We use the long form for the default assignment because of an extremely
14495# bizarre bug on SunOS 4.1.3.
14496if $ac_need_defaults; then
14497 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14498 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14499fi
14500
Skip Montanaro6dead952003-09-25 14:50:04 +000014501# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014502# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014503# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014504# Hook for its removal unless debugging.
14505# Note that there is a small window in which the directory will not be cleaned:
14506# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014507$debug ||
14508{
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014509 tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014510 trap 'exit_status=$?
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014511 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014512' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014513 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014514}
Martin v. Löwis11437992002-04-12 09:54:03 +000014515# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014516
Martin v. Löwis11437992002-04-12 09:54:03 +000014517{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014518 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014519 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014520} ||
14521{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014522 tmp=./conf$$-$RANDOM
14523 (umask 077 && mkdir "$tmp")
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014524} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014525
Matthias Kloseb9621712010-04-24 17:59:49 +000014526# Set up the scripts for CONFIG_FILES section.
14527# No need to generate them if there are no CONFIG_FILES.
14528# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014529if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014530
Matthias Kloseb9621712010-04-24 17:59:49 +000014531
14532ac_cr=`echo X | tr X '\015'`
14533# On cygwin, bash can eat \r inside `` if the user requested igncr.
14534# But we know of no other shell where ac_cr would be empty at this
14535# point, so we can use a bashism as a fallback.
14536if test "x$ac_cr" = x; then
14537 eval ac_cr=\$\'\\r\'
14538fi
14539ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14540if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014541 ac_cs_awk_cr='\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014542else
14543 ac_cs_awk_cr=$ac_cr
14544fi
14545
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014546echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014547_ACEOF
14548
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014549
Matthias Kloseb9621712010-04-24 17:59:49 +000014550{
14551 echo "cat >conf$$subs.awk <<_ACEOF" &&
14552 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14553 echo "_ACEOF"
14554} >conf$$subs.sh ||
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014555 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14556ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014557ac_delim='%!_!# '
14558for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014559 . ./conf$$subs.sh ||
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014560 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014561
Matthias Kloseb9621712010-04-24 17:59:49 +000014562 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14563 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014564 break
14565 elif $ac_last_try; then
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014566 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014567 else
14568 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014569 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014570done
Matthias Kloseb9621712010-04-24 17:59:49 +000014571rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014572
Matthias Kloseb9621712010-04-24 17:59:49 +000014573cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014574cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014576sed -n '
14577h
14578s/^/S["/; s/!.*/"]=/
14579p
14580g
14581s/^[^!]*!//
14582:repl
14583t repl
14584s/'"$ac_delim"'$//
14585t delim
14586:nl
14587h
14588s/\(.\{148\}\)..*/\1/
14589t more1
14590s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14591p
14592n
14593b repl
14594:more1
14595s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14596p
14597g
14598s/.\{148\}//
14599t nl
14600:delim
14601h
14602s/\(.\{148\}\)..*/\1/
14603t more2
14604s/["\\]/\\&/g; s/^/"/; s/$/"/
14605p
14606b
14607:more2
14608s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14609p
14610g
14611s/.\{148\}//
14612t delim
14613' <conf$$subs.awk | sed '
14614/^[^""]/{
14615 N
14616 s/\n//
14617}
14618' >>$CONFIG_STATUS || ac_write_fail=1
14619rm -f conf$$subs.awk
14620cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14621_ACAWK
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014622cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014623 for (key in S) S_is_set[key] = 1
14624 FS = ""
14625
14626}
14627{
14628 line = $ 0
14629 nfields = split(line, field, "@")
14630 substed = 0
14631 len = length(field[1])
14632 for (i = 2; i < nfields; i++) {
14633 key = field[i]
14634 keylen = length(key)
14635 if (S_is_set[key]) {
14636 value = S[key]
14637 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14638 len += length(value) + length(field[++i])
14639 substed = 1
14640 } else
14641 len += 1 + keylen
14642 }
14643
14644 print line
14645}
14646
14647_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014649cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14650if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14651 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14652else
14653 cat
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014654fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14655 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014656_ACEOF
14657
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014658# VPATH may cause trouble with some makes, so we remove $(srcdir),
14659# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014660# trailing colons and then remove the whole line if VPATH becomes empty
14661# (actually we leave an empty line to preserve line numbers).
14662if test "x$srcdir" = x.; then
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014663 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14664s/:*\$(srcdir):*/:/
14665s/:*\${srcdir}:*/:/
14666s/:*@srcdir@:*/:/
14667s/^\([^=]*=[ ]*\):*/\1/
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668s/:*$//
14669s/^[^=]*=[ ]*$//
14670}'
14671fi
14672
Matthias Kloseb9621712010-04-24 17:59:49 +000014673cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014674fi # test -n "$CONFIG_FILES"
14675
Matthias Kloseb9621712010-04-24 17:59:49 +000014676# Set up the scripts for CONFIG_HEADERS section.
14677# No need to generate them if there are no CONFIG_HEADERS.
14678# This happens for instance with `./config.status Makefile'.
14679if test -n "$CONFIG_HEADERS"; then
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014680cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014681BEGIN {
14682_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014683
Matthias Kloseb9621712010-04-24 17:59:49 +000014684# Transform confdefs.h into an awk script `defines.awk', embedded as
14685# here-document in config.status, that substitutes the proper values into
14686# config.h.in to produce config.h.
14687
14688# Create a delimiter string that does not exist in confdefs.h, to ease
14689# handling of long lines.
14690ac_delim='%!_!# '
14691for ac_last_try in false false :; do
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014692 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14693 if test -z "$ac_t"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014694 break
14695 elif $ac_last_try; then
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014696 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014697 else
14698 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14699 fi
14700done
14701
14702# For the awk script, D is an array of macro values keyed by name,
14703# likewise P contains macro parameters if any. Preserve backslash
14704# newline sequences.
14705
14706ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14707sed -n '
14708s/.\{148\}/&'"$ac_delim"'/g
14709t rset
14710:rset
14711s/^[ ]*#[ ]*define[ ][ ]*/ /
14712t def
14713d
14714:def
14715s/\\$//
14716t bsnl
14717s/["\\]/\\&/g
14718s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14719D["\1"]=" \3"/p
14720s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14721d
14722:bsnl
14723s/["\\]/\\&/g
14724s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14725D["\1"]=" \3\\\\\\n"\\/p
14726t cont
14727s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14728t cont
14729d
14730:cont
14731n
14732s/.\{148\}/&'"$ac_delim"'/g
14733t clear
14734:clear
14735s/\\$//
14736t bsnlc
14737s/["\\]/\\&/g; s/^/"/; s/$/"/p
14738d
14739:bsnlc
14740s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14741b cont
14742' <confdefs.h | sed '
14743s/'"$ac_delim"'/"\\\
14744"/g' >>$CONFIG_STATUS || ac_write_fail=1
14745
14746cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14747 for (key in D) D_is_set[key] = 1
14748 FS = ""
14749}
14750/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14751 line = \$ 0
14752 split(line, arg, " ")
14753 if (arg[1] == "#") {
14754 defundef = arg[2]
14755 mac1 = arg[3]
14756 } else {
14757 defundef = substr(arg[1], 2)
14758 mac1 = arg[2]
14759 }
14760 split(mac1, mac2, "(") #)
14761 macro = mac2[1]
14762 prefix = substr(line, 1, index(line, defundef) - 1)
14763 if (D_is_set[macro]) {
14764 # Preserve the white space surrounding the "#".
14765 print prefix "define", macro P[macro] D[macro]
14766 next
14767 } else {
14768 # Replace #undef with comments. This is necessary, for example,
14769 # in the case of _POSIX_SOURCE, which is predefined and required
14770 # on some systems where configure will not decide to define it.
14771 if (defundef == "undef") {
14772 print "/*", prefix defundef, macro, "*/"
14773 next
14774 }
14775 }
14776}
14777{ print }
14778_ACAWK
14779_ACEOF
14780cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014781 as_fn_error "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014782fi # test -n "$CONFIG_HEADERS"
14783
14784
14785eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14786shift
14787for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014788do
14789 case $ac_tag in
14790 :[FHLC]) ac_mode=$ac_tag; continue;;
14791 esac
14792 case $ac_mode$ac_tag in
14793 :[FHL]*:*);;
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014794 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014795 :[FH]-) ac_tag=-:-;;
14796 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14797 esac
14798 ac_save_IFS=$IFS
14799 IFS=:
14800 set x $ac_tag
14801 IFS=$ac_save_IFS
14802 shift
14803 ac_file=$1
14804 shift
14805
14806 case $ac_mode in
14807 :L) ac_source=$1;;
14808 :[FH])
14809 ac_file_inputs=
14810 for ac_f
14811 do
14812 case $ac_f in
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014813 -) ac_f="$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014814 *) # Look for the file first in the build tree, then in the source tree
14815 # (if the path is not absolute). The absolute path cannot be DOS-style,
14816 # because $ac_f cannot contain `:'.
14817 test -f "$ac_f" ||
14818 case $ac_f in
14819 [\\/$]*) false;;
14820 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14821 esac ||
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014822 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014823 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014824 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14825 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014826 done
14827
14828 # Let's still pretend it is `configure' which instantiates (i.e., don't
14829 # use $as_me), people would be surprised to read:
14830 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014831 configure_input='Generated from '`
14832 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14833 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014834 if test x"$ac_file" != x-; then
14835 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014836 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14837$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014838 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014839 # Neutralize special characters interpreted by sed in replacement strings.
14840 case $configure_input in #(
14841 *\&* | *\|* | *\\* )
14842 ac_sed_conf_input=`$as_echo "$configure_input" |
14843 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14844 *) ac_sed_conf_input=$configure_input;;
14845 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014846
14847 case $ac_tag in
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014848 *:-:* | *:-) cat >"$tmp/stdin" \
14849 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014850 esac
14851 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014852 esac
14853
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014854 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014855$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014856 X"$ac_file" : 'X\(//\)[^/]' \| \
14857 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014858 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014859$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014860 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14861 s//\1/
14862 q
14863 }
14864 /^X\(\/\/\)[^/].*/{
14865 s//\1/
14866 q
14867 }
14868 /^X\(\/\/\)$/{
14869 s//\1/
14870 q
14871 }
14872 /^X\(\/\).*/{
14873 s//\1/
14874 q
14875 }
14876 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014877 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014878 ac_builddir=.
14879
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014880case "$ac_dir" in
14881.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14882*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014883 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014884 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014885 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014886 case $ac_top_builddir_sub in
14887 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14888 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14889 esac ;;
14890esac
14891ac_abs_top_builddir=$ac_pwd
14892ac_abs_builddir=$ac_pwd$ac_dir_suffix
14893# for backward compatibility:
14894ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014895
14896case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014897 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014898 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014899 ac_top_srcdir=$ac_top_builddir_sub
14900 ac_abs_top_srcdir=$ac_pwd ;;
14901 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014902 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014903 ac_top_srcdir=$srcdir
14904 ac_abs_top_srcdir=$srcdir ;;
14905 *) # Relative name.
14906 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14907 ac_top_srcdir=$ac_top_build_prefix$srcdir
14908 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014909esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014910ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014911
Martin v. Löwis11437992002-04-12 09:54:03 +000014912
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913 case $ac_mode in
14914 :F)
14915 #
14916 # CONFIG_FILE
14917 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014918
14919 case $INSTALL in
14920 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014921 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014922 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014923_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014924
Matthias Kloseb9621712010-04-24 17:59:49 +000014925cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014926# If the template does not know about datarootdir, expand it.
14927# FIXME: This hack should be removed a few years after 2.60.
14928ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014929ac_sed_dataroot='
14930/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931 p
14932 q
14933}
14934/@datadir@/p
14935/@docdir@/p
14936/@infodir@/p
14937/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014938/@mandir@/p'
14939case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014940*datarootdir*) ac_datarootdir_seen=yes;;
14941*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14943$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014945cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014946 ac_datarootdir_hack='
14947 s&@datadir@&$datadir&g
14948 s&@docdir@&$docdir&g
14949 s&@infodir@&$infodir&g
14950 s&@localedir@&$localedir&g
14951 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014952 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953esac
14954_ACEOF
14955
14956# Neutralize VPATH when `$srcdir' = `.'.
14957# Shell code in configure.ac might set extrasub.
14958# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014959cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14960ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014961$extrasub
14962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014963cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014964:t
14965/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014966s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014967s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014968s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014969s&@srcdir@&$ac_srcdir&;t t
14970s&@abs_srcdir@&$ac_abs_srcdir&;t t
14971s&@top_srcdir@&$ac_top_srcdir&;t t
14972s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14973s&@builddir@&$ac_builddir&;t t
14974s&@abs_builddir@&$ac_abs_builddir&;t t
14975s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14976s&@INSTALL@&$ac_INSTALL&;t t
14977$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014978"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014979eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
14980 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014982test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014983 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14984 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014985 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014986which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014987$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014988which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014989
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014990 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014991 case $ac_file in
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014992 -) cat "$tmp/out" && rm -f "$tmp/out";;
14993 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000014994 esac \
Antoine Pitrou6f26be02011-05-03 18:18:59 +020014995 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014996 ;;
14997 :H)
14998 #
14999 # CONFIG_HEADER
15000 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015001 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015002 {
15003 $as_echo "/* $configure_input */" \
Antoine Pitrou6f26be02011-05-03 18:18:59 +020015004 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15005 } >"$tmp/config.h" \
15006 || as_fn_error "could not create $ac_file" "$LINENO" 5
15007 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015008 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15009$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015010 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015011 rm -f "$ac_file"
Antoine Pitrou6f26be02011-05-03 18:18:59 +020015012 mv "$tmp/config.h" "$ac_file" \
15013 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015014 fi
15015 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015016 $as_echo "/* $configure_input */" \
Antoine Pitrou6f26be02011-05-03 18:18:59 +020015017 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
15018 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015019 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015020 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015022
15023 esac
15024
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015025
15026 case $ac_file$ac_mode in
15027 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15028
15029 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015030done # for ac_tag
15031
Guido van Rossum627b2d71993-12-24 10:39:16 +000015032
Matthias Kloseb9621712010-04-24 17:59:49 +000015033as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015034_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015035ac_clean_files=$ac_clean_files_save
15036
Matthias Kloseb9621712010-04-24 17:59:49 +000015037test $ac_write_fail = 0 ||
Antoine Pitrou6f26be02011-05-03 18:18:59 +020015038 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015039
Martin v. Löwis11437992002-04-12 09:54:03 +000015040
15041# configure is writing to config.log, and then calls config.status.
15042# config.status does its own redirection, appending to config.log.
15043# Unfortunately, on DOS this fails, as config.log is still kept open
15044# by configure, so config.status won't be able to write to it; its
15045# output is simply discarded. So we exec the FD to /dev/null,
15046# effectively closing config.log, so it can be properly (re)opened and
15047# appended to by config.status. When coming back to configure, we
15048# need to make the FD available again.
15049if test "$no_create" != yes; then
15050 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015051 ac_config_status_args=
15052 test "$silent" = yes &&
15053 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015054 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015055 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015056 exec 5>>config.log
15057 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15058 # would make configure fail if this is the last instruction.
Antoine Pitrou6f26be02011-05-03 18:18:59 +020015059 $ac_cs_success || as_fn_exit $?
Matthias Kloseb9621712010-04-24 17:59:49 +000015060fi
15061if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15062 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15063$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015064fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015065
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015066
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015067echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015068if test ! -f Modules/Setup
15069then
15070 cp $srcdir/Modules/Setup.dist Modules/Setup
15071fi
15072
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015073echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015074if test ! -f Modules/Setup.local
15075then
15076 echo "# Edit this file for local setup changes" >Modules/Setup.local
15077fi
15078
15079echo "creating Makefile"
15080$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15081 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015082 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015083mv config.c Modules