blob: 4dd233207e97b41523f97f52a2c697d31af126fc [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Antoine Pitrou33a29942010-08-30 14:52:00 +00002# From configure.in Revision: 83986 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Matthias Kloseb9621712010-04-24 17:59:49 +00004# Generated by GNU Autoconf 2.65 for python 3.2.
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,
Matthias Kloseb9621712010-04-24 17:59:49 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
11# Inc.
12#
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
224 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
225fi
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"
323 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
324
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
363# as_fn_error ERROR [LINENO LOG_FD]
364# ---------------------------------
365# 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
367# script with status $?, using 1 if that was 0.
368as_fn_error ()
369{
370 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
374 fi
375 $as_echo "$as_me: error: $1" >&2
376 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.
537# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
538# 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'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000556PACKAGE_VERSION='3.2'
557PACKAGE_STRING='python 3.2'
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
601LIBC
602LIBM
603HAVE_GETHOSTBYNAME
604HAVE_GETHOSTBYNAME_R
605HAVE_GETHOSTBYNAME_R_3_ARG
606HAVE_GETHOSTBYNAME_R_5_ARG
607HAVE_GETHOSTBYNAME_R_6_ARG
608LIBOBJS
609TRUE
610MACHDEP_OBJS
611DYNLOADFILE
612DLINCLDIR
613THREADOBJ
614LDLAST
615USE_THREAD_MODULE
616SIGNAL_OBJS
617USE_SIGNAL_MODULE
618LIBFFI_INCLUDEDIR
619PKG_CONFIG
620SHLIBS
621CFLAGSFORSHARED
622LINKFORSHARED
623CCSHARED
624BLDSHARED
625LDCXXSHARED
626LDSHARED
627SO
628LIBTOOL_CRUFT
629OTHER_LIBTOOL_OPT
630UNIVERSAL_ARCH_FLAGS
631BASECFLAGS
632OPT
633LN
634INSTALL_DATA
635INSTALL_SCRIPT
636INSTALL_PROGRAM
637SVNVERSION
638ARFLAGS
639AR
640RANLIB
641GNULD
642LINKCC
643RUNSHARED
644INSTSONAME
645LDLIBRARYDIR
646BLDLIBRARY
647DLLLIBRARY
648LDLIBRARY
649LIBRARY
650BUILDEXEEXT
651EGREP
652GREP
653CPP
654MAINCC
655CXX
656OBJEXT
657EXEEXT
658ac_ct_CC
659CPPFLAGS
660LDFLAGS
661CFLAGS
662CC
663EXPORT_MACOSX_DEPLOYMENT_TARGET
664CONFIGURE_MACOSX_DEPLOYMENT_TARGET
665SGI_ABI
666MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000667FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000668FRAMEWORKUNIXTOOLSPREFIX
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKALTINSTALLFIRST
671FRAMEWORKINSTALLLAST
672FRAMEWORKINSTALLFIRST
673PYTHONFRAMEWORKINSTALLDIR
674PYTHONFRAMEWORKPREFIX
675PYTHONFRAMEWORKDIR
676PYTHONFRAMEWORKIDENTIFIER
677PYTHONFRAMEWORK
678LIPO_32BIT_FLAGS
679ARCH_RUN_32BIT
680UNIVERSALSDK
681CONFIG_ARGS
682SOVERSION
683VERSION
684target_alias
685host_alias
686build_alias
687LIBS
688ECHO_T
689ECHO_N
690ECHO_C
691DEFS
692mandir
693localedir
694libdir
695psdir
696pdfdir
697dvidir
698htmldir
699infodir
700docdir
701oldincludedir
702includedir
703localstatedir
704sharedstatedir
705sysconfdir
706datadir
707datarootdir
708libexecdir
709sbindir
710bindir
711program_transform_name
712prefix
713exec_prefix
714PACKAGE_URL
715PACKAGE_BUGREPORT
716PACKAGE_STRING
717PACKAGE_VERSION
718PACKAGE_TARNAME
719PACKAGE_NAME
720PATH_SEPARATOR
721SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000722ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000723ac_user_opts='
724enable_option_checking
725enable_universalsdk
726with_universal_archs
727with_framework_name
728enable_framework
729with_gcc
730with_cxx_main
731with_suffix
732enable_shared
733enable_profiling
734with_pydebug
735with_libs
736with_system_expat
737with_system_ffi
738with_dbmliborder
739with_signal_module
740with_dec_threads
741with_threads
742with_thread
743enable_ipv6
744with_doc_strings
745with_tsc
746with_pymalloc
747with_valgrind
748with_wctype_functions
749with_fpectl
750with_libm
751with_libc
752enable_big_digits
753with_wide_unicode
754with_computed_gotos
755'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000756 ac_precious_vars='build_alias
757host_alias
758target_alias
759CC
760CFLAGS
761LDFLAGS
762LIBS
763CPPFLAGS
764CPP'
765
Guido van Rossum627b2d71993-12-24 10:39:16 +0000766
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000768ac_init_help=
769ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000770ac_unrecognized_opts=
771ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000772# The variables have the same names as the options, with
773# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000774cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000775exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000776no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000777no_recursion=
778prefix=NONE
779program_prefix=NONE
780program_suffix=NONE
781program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000782silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000783site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000785verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000786x_includes=NONE
787x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000788
789# Installation directory options.
790# These are left unexpanded so users can "make install exec_prefix=/foo"
791# and all the variables that are supposed to be based on exec_prefix
792# by default will actually change.
793# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000794# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000795bindir='${exec_prefix}/bin'
796sbindir='${exec_prefix}/sbin'
797libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000798datarootdir='${prefix}/share'
799datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000800sysconfdir='${prefix}/etc'
801sharedstatedir='${prefix}/com'
802localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000803includedir='${prefix}/include'
804oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000805docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
806infodir='${datarootdir}/info'
807htmldir='${docdir}'
808dvidir='${docdir}'
809pdfdir='${docdir}'
810psdir='${docdir}'
811libdir='${exec_prefix}/lib'
812localedir='${datarootdir}/locale'
813mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814
Guido van Rossum7f43da71994-08-01 12:15:30 +0000815ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000816ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000818do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819 # If the previous option needs an argument, assign it.
820 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000821 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822 ac_prev=
823 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000824 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000826 case $ac_option in
827 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
828 *) ac_optarg=yes ;;
829 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831 # Accept the important Cygnus configure options, so we can diagnose typos.
832
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833 case $ac_dashdash$ac_option in
834 --)
835 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000837 -bindir | --bindir | --bindi | --bind | --bin | --bi)
838 ac_prev=bindir ;;
839 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841
842 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000845 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000847 -cache-file | --cache-file | --cache-fil | --cache-fi \
848 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
849 ac_prev=cache_file ;;
850 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
851 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000852 cache_file=$ac_optarg ;;
853
854 --config-cache | -C)
855 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000856
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000858 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000860 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000861
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
863 | --dataroo | --dataro | --datar)
864 ac_prev=datarootdir ;;
865 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
866 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
867 datarootdir=$ac_optarg ;;
868
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000870 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000872 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
873 as_fn_error "invalid feature name: $ac_useropt"
874 ac_useropt_orig=$ac_useropt
875 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
876 case $ac_user_opts in
877 *"
878"enable_$ac_useropt"
879"*) ;;
880 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
881 ac_unrecognized_sep=', ';;
882 esac
883 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884
885 -docdir | --docdir | --docdi | --doc | --do)
886 ac_prev=docdir ;;
887 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
888 docdir=$ac_optarg ;;
889
890 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
891 ac_prev=dvidir ;;
892 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
893 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894
895 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000896 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000897 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000898 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
899 as_fn_error "invalid feature name: $ac_useropt"
900 ac_useropt_orig=$ac_useropt
901 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
902 case $ac_user_opts in
903 *"
904"enable_$ac_useropt"
905"*) ;;
906 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
907 ac_unrecognized_sep=', ';;
908 esac
909 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
912 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
913 | --exec | --exe | --ex)
914 ac_prev=exec_prefix ;;
915 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
916 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
917 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
920 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000921 # Obsolete; use --with-gas.
922 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 -help | --help | --hel | --he | -h)
925 ac_init_help=long ;;
926 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
927 ac_init_help=recursive ;;
928 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
929 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930
931 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000936 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
937 ac_prev=htmldir ;;
938 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
939 | --ht=*)
940 htmldir=$ac_optarg ;;
941
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 -includedir | --includedir | --includedi | --included | --include \
943 | --includ | --inclu | --incl | --inc)
944 ac_prev=includedir ;;
945 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
946 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948
949 -infodir | --infodir | --infodi | --infod | --info | --inf)
950 ac_prev=infodir ;;
951 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953
954 -libdir | --libdir | --libdi | --libd)
955 ac_prev=libdir ;;
956 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
959 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
960 | --libexe | --libex | --libe)
961 ac_prev=libexecdir ;;
962 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
963 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000964 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000965
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000966 -localedir | --localedir | --localedi | --localed | --locale)
967 ac_prev=localedir ;;
968 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
969 localedir=$ac_optarg ;;
970
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000972 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000973 ac_prev=localstatedir ;;
974 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000975 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000977
978 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
979 ac_prev=mandir ;;
980 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982
Guido van Rossum7f43da71994-08-01 12:15:30 +0000983 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000984 # Obsolete; use --without-fp.
985 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989 no_create=yes ;;
990
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000991 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
992 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
993 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000995 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
996 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
997 | --oldin | --oldi | --old | --ol | --o)
998 ac_prev=oldincludedir ;;
999 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1000 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1001 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001003
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1005 ac_prev=prefix ;;
1006 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
1009 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1010 | --program-pre | --program-pr | --program-p)
1011 ac_prev=program_prefix ;;
1012 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1013 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
1016 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1017 | --program-suf | --program-su | --program-s)
1018 ac_prev=program_suffix ;;
1019 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1020 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
1023 -program-transform-name | --program-transform-name \
1024 | --program-transform-nam | --program-transform-na \
1025 | --program-transform-n | --program-transform- \
1026 | --program-transform | --program-transfor \
1027 | --program-transfo | --program-transf \
1028 | --program-trans | --program-tran \
1029 | --progr-tra | --program-tr | --program-t)
1030 ac_prev=program_transform_name ;;
1031 -program-transform-name=* | --program-transform-name=* \
1032 | --program-transform-nam=* | --program-transform-na=* \
1033 | --program-transform-n=* | --program-transform-=* \
1034 | --program-transform=* | --program-transfor=* \
1035 | --program-transfo=* | --program-transf=* \
1036 | --program-trans=* | --program-tran=* \
1037 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001040 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1041 ac_prev=pdfdir ;;
1042 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1043 pdfdir=$ac_optarg ;;
1044
1045 -psdir | --psdir | --psdi | --psd | --ps)
1046 ac_prev=psdir ;;
1047 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1048 psdir=$ac_optarg ;;
1049
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1051 | -silent | --silent | --silen | --sile | --sil)
1052 silent=yes ;;
1053
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1055 ac_prev=sbindir ;;
1056 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1057 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
1060 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1061 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1062 | --sharedst | --shareds | --shared | --share | --shar \
1063 | --sha | --sh)
1064 ac_prev=sharedstatedir ;;
1065 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1066 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1067 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1068 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001071 -site | --site | --sit)
1072 ac_prev=site ;;
1073 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1077 ac_prev=srcdir ;;
1078 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1082 | --syscon | --sysco | --sysc | --sys | --sy)
1083 ac_prev=sysconfdir ;;
1084 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1085 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1094 verbose=yes ;;
1095
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 -version | --version | --versio | --versi | --vers | -V)
1097 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
1099 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001100 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001101 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001102 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1103 as_fn_error "invalid package name: $ac_useropt"
1104 ac_useropt_orig=$ac_useropt
1105 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1106 case $ac_user_opts in
1107 *"
1108"with_$ac_useropt"
1109"*) ;;
1110 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1111 ac_unrecognized_sep=', ';;
1112 esac
1113 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
1115 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001116 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001117 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001118 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1119 as_fn_error "invalid package name: $ac_useropt"
1120 ac_useropt_orig=$ac_useropt
1121 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1122 case $ac_user_opts in
1123 *"
1124"with_$ac_useropt"
1125"*) ;;
1126 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1127 ac_unrecognized_sep=', ';;
1128 esac
1129 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001131 --x)
1132 # Obsolete; use --with-x.
1133 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
1135 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1136 | --x-incl | --x-inc | --x-in | --x-i)
1137 ac_prev=x_includes ;;
1138 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1139 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001141
1142 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1143 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1144 ac_prev=x_libraries ;;
1145 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1146 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001147 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
Matthias Kloseb9621712010-04-24 17:59:49 +00001149 -*) as_fn_error "unrecognized option: \`$ac_option'
1150Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151 ;;
1152
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 *=*)
1154 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1155 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001156 case $ac_envvar in #(
1157 '' | [0-9]* | *[!_$as_cr_alnum]* )
1158 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1159 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001160 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 export $ac_envvar ;;
1162
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001163 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001165 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001167 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169 ;;
1170
1171 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001172done
1173
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001176 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177fi
1178
Matthias Kloseb9621712010-04-24 17:59:49 +00001179if test -n "$ac_unrecognized_opts"; then
1180 case $enable_option_checking in
1181 no) ;;
1182 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1183 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1184 esac
1185fi
1186
1187# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001188for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1189 datadir sysconfdir sharedstatedir localstatedir includedir \
1190 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1191 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001192do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001193 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001194 # Remove trailing slashes.
1195 case $ac_val in
1196 */ )
1197 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1198 eval $ac_var=\$ac_val;;
1199 esac
1200 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001202 [\\/$]* | ?:[\\/]* ) continue;;
1203 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001206done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001207
Martin v. Löwis11437992002-04-12 09:54:03 +00001208# There might be people who depend on the old broken behavior: `$host'
1209# used to hold the argument of --host etc.
1210# FIXME: To remove some day.
1211build=$build_alias
1212host=$host_alias
1213target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214
Martin v. Löwis11437992002-04-12 09:54:03 +00001215# FIXME: To remove some day.
1216if test "x$host_alias" != x; then
1217 if test "x$build_alias" = x; then
1218 cross_compiling=maybe
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 If a cross compiler is detected then cross compile mode will be used." >&2
1221 elif test "x$build_alias" != "x$host_alias"; then
1222 cross_compiling=yes
1223 fi
1224fi
1225
1226ac_tool_prefix=
1227test -n "$host_alias" && ac_tool_prefix=$host_alias-
1228
1229test "$silent" = yes && exec 6>/dev/null
1230
Guido van Rossum627b2d71993-12-24 10:39:16 +00001231
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001232ac_pwd=`pwd` && test -n "$ac_pwd" &&
1233ac_ls_di=`ls -di .` &&
1234ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Matthias Kloseb9621712010-04-24 17:59:49 +00001235 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001236test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Matthias Kloseb9621712010-04-24 17:59:49 +00001237 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001238
1239
Guido van Rossum627b2d71993-12-24 10:39:16 +00001240# Find the source files, if location was not specified.
1241if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001243 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001244 ac_confdir=`$as_dirname -- "$as_myself" ||
1245$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1246 X"$as_myself" : 'X\(//\)[^/]' \| \
1247 X"$as_myself" : 'X\(//\)$' \| \
1248 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1249$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001250 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1251 s//\1/
1252 q
1253 }
1254 /^X\(\/\/\)[^/].*/{
1255 s//\1/
1256 q
1257 }
1258 /^X\(\/\/\)$/{
1259 s//\1/
1260 q
1261 }
1262 /^X\(\/\).*/{
1263 s//\1/
1264 q
1265 }
1266 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001268 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001269 srcdir=..
1270 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001271else
1272 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001274if test ! -r "$srcdir/$ac_unique_file"; then
1275 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Matthias Kloseb9621712010-04-24 17:59:49 +00001276 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001278ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1279ac_abs_confdir=`(
Matthias Kloseb9621712010-04-24 17:59:49 +00001280 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001281 pwd)`
1282# When building in place, set srcdir=.
1283if test "$ac_abs_confdir" = "$ac_pwd"; then
1284 srcdir=.
1285fi
1286# Remove unnecessary trailing slashes from srcdir.
1287# Double slashes in file names in object file debugging info
1288# mess up M-x gdb in Emacs.
1289case $srcdir in
1290*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1291esac
1292for ac_var in $ac_precious_vars; do
1293 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1294 eval ac_env_${ac_var}_value=\$${ac_var}
1295 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1296 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1297done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001298
Martin v. Löwis11437992002-04-12 09:54:03 +00001299#
1300# Report the --help message.
1301#
1302if test "$ac_init_help" = "long"; then
1303 # Omit some internal or obsolete options to make the list less imposing.
1304 # This message is too long to be a string in the A/UX 3.1 sh.
1305 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001306\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001307
1308Usage: $0 [OPTION]... [VAR=VALUE]...
1309
1310To assign environment variables (e.g., CC, CFLAGS...), specify them as
1311VAR=VALUE. See below for descriptions of some of the useful variables.
1312
1313Defaults for the options are specified in brackets.
1314
1315Configuration:
1316 -h, --help display this help and exit
1317 --help=short display options specific to this package
1318 --help=recursive display the short help of all the included packages
1319 -V, --version display version information and exit
1320 -q, --quiet, --silent do not print \`checking...' messages
1321 --cache-file=FILE cache test results in FILE [disabled]
1322 -C, --config-cache alias for \`--cache-file=config.cache'
1323 -n, --no-create do not create output files
1324 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1325
Martin v. Löwis11437992002-04-12 09:54:03 +00001326Installation directories:
1327 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001328 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001329 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001330 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001331
1332By default, \`make install' will install all the files in
1333\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1334an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1335for instance \`--prefix=\$HOME'.
1336
1337For better control, use the options below.
1338
1339Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001340 --bindir=DIR user executables [EPREFIX/bin]
1341 --sbindir=DIR system admin executables [EPREFIX/sbin]
1342 --libexecdir=DIR program executables [EPREFIX/libexec]
1343 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1344 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1345 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1346 --libdir=DIR object code libraries [EPREFIX/lib]
1347 --includedir=DIR C header files [PREFIX/include]
1348 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1349 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1350 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1351 --infodir=DIR info documentation [DATAROOTDIR/info]
1352 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1353 --mandir=DIR man documentation [DATAROOTDIR/man]
1354 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1355 --htmldir=DIR html documentation [DOCDIR]
1356 --dvidir=DIR dvi documentation [DOCDIR]
1357 --pdfdir=DIR pdf documentation [DOCDIR]
1358 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001359_ACEOF
1360
1361 cat <<\_ACEOF
1362_ACEOF
1363fi
1364
1365if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001366 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001367 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001368 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001369 cat <<\_ACEOF
1370
1371Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001372 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001373 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1374 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001375 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001376 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001377 --enable-framework[=INSTALLDIR]
1378 Build (MacOSX|Darwin) framework
1379 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001380 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001381 --enable-ipv6 Enable ipv6 (with ipv4) support
1382 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001383 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001384 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001385
1386Optional Packages:
1387 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1388 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001389 --with-universal-archs=ARCH
1390 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001391 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001392 --with-framework-name=FRAMEWORK
1393 specify an alternate name of the framework built
1394 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001395 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001396 --with-cxx-main=<compiler>
1397 compile main() and link python executable with C++
1398 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001399 --with-suffix=.exe set executable suffix
1400 --with-pydebug build with Py_DEBUG defined
1401 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001402 --with-system-expat build pyexpat module using an installed expat
1403 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001404 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001405 --with-dbmliborder=db1:db2:...
1406 order to check db backends for dbm. Valid value is a
1407 colon separated string with the backend names
1408 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001409 --with-signal-module disable/enable signal module
1410 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1411 --with(out)-threads[=DIRECTORY]
1412 disable/enable thread support
1413 --with(out)-thread[=DIRECTORY]
1414 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001415 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001416 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001417 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001418 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001420 --with-fpectl enable SIGFPE catching
1421 --with-libm=STRING math library
1422 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001423 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001424 --with(out)-computed-gotos
1425 Use computed gotos in evaluation loop (enabled by
1426 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001427
1428Some influential environment variables:
1429 CC C compiler command
1430 CFLAGS C compiler flags
1431 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1432 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001433 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001435 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001436 CPP C preprocessor
1437
1438Use these variables to override the choices made by `configure' or to help
1439it to find libraries and programs with nonstandard names/locations.
1440
Georg Brandle2e15612009-05-20 18:25:10 +00001441Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001442_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001444fi
1445
1446if test "$ac_init_help" = "recursive"; then
1447 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001448 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001449 test -d "$ac_dir" ||
1450 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1451 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001452 ac_builddir=.
1453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001454case "$ac_dir" in
1455.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1456*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001457 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001458 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001459 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001460 case $ac_top_builddir_sub in
1461 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1462 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1463 esac ;;
1464esac
1465ac_abs_top_builddir=$ac_pwd
1466ac_abs_builddir=$ac_pwd$ac_dir_suffix
1467# for backward compatibility:
1468ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001469
1470case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001471 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001473 ac_top_srcdir=$ac_top_builddir_sub
1474 ac_abs_top_srcdir=$ac_pwd ;;
1475 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001476 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477 ac_top_srcdir=$srcdir
1478 ac_abs_top_srcdir=$srcdir ;;
1479 *) # Relative name.
1480 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1481 ac_top_srcdir=$ac_top_build_prefix$srcdir
1482 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001483esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001484ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001485
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001486 cd "$ac_dir" || { ac_status=$?; continue; }
1487 # Check for guested configure.
1488 if test -f "$ac_srcdir/configure.gnu"; then
1489 echo &&
1490 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1491 elif test -f "$ac_srcdir/configure"; then
1492 echo &&
1493 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001494 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001495 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496 fi || ac_status=$?
1497 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001498 done
1499fi
1500
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001501test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001502if $ac_init_version; then
1503 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001504python configure 3.2
Matthias Kloseb9621712010-04-24 17:59:49 +00001505generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001506
Matthias Kloseb9621712010-04-24 17:59:49 +00001507Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001508This configure script is free software; the Free Software Foundation
1509gives unlimited permission to copy, distribute and modify it.
1510_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001511 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001513
1514## ------------------------ ##
1515## Autoconf initialization. ##
1516## ------------------------ ##
1517
1518# ac_fn_c_try_compile LINENO
1519# --------------------------
1520# Try to compile conftest.$ac_ext, and return whether this succeeded.
1521ac_fn_c_try_compile ()
1522{
1523 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1524 rm -f conftest.$ac_objext
1525 if { { ac_try="$ac_compile"
1526case "(($ac_try" in
1527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1528 *) ac_try_echo=$ac_try;;
1529esac
1530eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1531$as_echo "$ac_try_echo"; } >&5
1532 (eval "$ac_compile") 2>conftest.err
1533 ac_status=$?
1534 if test -s conftest.err; then
1535 grep -v '^ *+' conftest.err >conftest.er1
1536 cat conftest.er1 >&5
1537 mv -f conftest.er1 conftest.err
1538 fi
1539 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1540 test $ac_status = 0; } && {
1541 test -z "$ac_c_werror_flag" ||
1542 test ! -s conftest.err
1543 } && test -s conftest.$ac_objext; then :
1544 ac_retval=0
1545else
1546 $as_echo "$as_me: failed program was:" >&5
1547sed 's/^/| /' conftest.$ac_ext >&5
1548
1549 ac_retval=1
1550fi
1551 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1552 as_fn_set_status $ac_retval
1553
1554} # ac_fn_c_try_compile
1555
1556# ac_fn_c_try_cpp LINENO
1557# ----------------------
1558# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1559ac_fn_c_try_cpp ()
1560{
1561 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1562 if { { ac_try="$ac_cpp conftest.$ac_ext"
1563case "(($ac_try" in
1564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1565 *) ac_try_echo=$ac_try;;
1566esac
1567eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1568$as_echo "$ac_try_echo"; } >&5
1569 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1570 ac_status=$?
1571 if test -s conftest.err; then
1572 grep -v '^ *+' conftest.err >conftest.er1
1573 cat conftest.er1 >&5
1574 mv -f conftest.er1 conftest.err
1575 fi
1576 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1577 test $ac_status = 0; } >/dev/null && {
1578 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1579 test ! -s conftest.err
1580 }; then :
1581 ac_retval=0
1582else
1583 $as_echo "$as_me: failed program was:" >&5
1584sed 's/^/| /' conftest.$ac_ext >&5
1585
1586 ac_retval=1
1587fi
1588 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1589 as_fn_set_status $ac_retval
1590
1591} # ac_fn_c_try_cpp
1592
1593# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1594# -------------------------------------------------------
1595# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1596# the include files in INCLUDES and setting the cache variable VAR
1597# accordingly.
1598ac_fn_c_check_header_mongrel ()
1599{
1600 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1601 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1603$as_echo_n "checking for $2... " >&6; }
1604if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1605 $as_echo_n "(cached) " >&6
1606fi
1607eval ac_res=\$$3
1608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1609$as_echo "$ac_res" >&6; }
1610else
1611 # Is the header compilable?
1612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1613$as_echo_n "checking $2 usability... " >&6; }
1614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1615/* end confdefs.h. */
1616$4
1617#include <$2>
1618_ACEOF
1619if ac_fn_c_try_compile "$LINENO"; then :
1620 ac_header_compiler=yes
1621else
1622 ac_header_compiler=no
1623fi
1624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1626$as_echo "$ac_header_compiler" >&6; }
1627
1628# Is the header present?
1629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1630$as_echo_n "checking $2 presence... " >&6; }
1631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1632/* end confdefs.h. */
1633#include <$2>
1634_ACEOF
1635if ac_fn_c_try_cpp "$LINENO"; then :
1636 ac_header_preproc=yes
1637else
1638 ac_header_preproc=no
1639fi
1640rm -f conftest.err conftest.$ac_ext
1641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1642$as_echo "$ac_header_preproc" >&6; }
1643
1644# So? What about this header?
1645case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1646 yes:no: )
1647 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1648$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1649 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1650$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1651 ;;
1652 no:yes:* )
1653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1654$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1655 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1656$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1657 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1658$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1659 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1660$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1662$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1663( cat <<\_ASBOX
1664## -------------------------------------- ##
1665## Report this to http://bugs.python.org/ ##
1666## -------------------------------------- ##
1667_ASBOX
1668 ) | sed "s/^/$as_me: WARNING: /" >&2
1669 ;;
1670esac
1671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1672$as_echo_n "checking for $2... " >&6; }
1673if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1674 $as_echo_n "(cached) " >&6
1675else
1676 eval "$3=\$ac_header_compiler"
1677fi
1678eval ac_res=\$$3
1679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1680$as_echo "$ac_res" >&6; }
1681fi
1682 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1683
1684} # ac_fn_c_check_header_mongrel
1685
1686# ac_fn_c_try_run LINENO
1687# ----------------------
1688# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1689# that executables *can* be run.
1690ac_fn_c_try_run ()
1691{
1692 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1693 if { { ac_try="$ac_link"
1694case "(($ac_try" in
1695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1696 *) ac_try_echo=$ac_try;;
1697esac
1698eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1699$as_echo "$ac_try_echo"; } >&5
1700 (eval "$ac_link") 2>&5
1701 ac_status=$?
1702 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1703 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1704 { { case "(($ac_try" in
1705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1706 *) ac_try_echo=$ac_try;;
1707esac
1708eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1709$as_echo "$ac_try_echo"; } >&5
1710 (eval "$ac_try") 2>&5
1711 ac_status=$?
1712 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1713 test $ac_status = 0; }; }; then :
1714 ac_retval=0
1715else
1716 $as_echo "$as_me: program exited with status $ac_status" >&5
1717 $as_echo "$as_me: failed program was:" >&5
1718sed 's/^/| /' conftest.$ac_ext >&5
1719
1720 ac_retval=$ac_status
1721fi
1722 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1723 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1724 as_fn_set_status $ac_retval
1725
1726} # ac_fn_c_try_run
1727
1728# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1729# -------------------------------------------------------
1730# Tests whether HEADER exists and can be compiled using the include files in
1731# INCLUDES, setting the cache variable VAR accordingly.
1732ac_fn_c_check_header_compile ()
1733{
1734 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1736$as_echo_n "checking for $2... " >&6; }
1737if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1738 $as_echo_n "(cached) " >&6
1739else
1740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1741/* end confdefs.h. */
1742$4
1743#include <$2>
1744_ACEOF
1745if ac_fn_c_try_compile "$LINENO"; then :
1746 eval "$3=yes"
1747else
1748 eval "$3=no"
1749fi
1750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1751fi
1752eval ac_res=\$$3
1753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1754$as_echo "$ac_res" >&6; }
1755 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1756
1757} # ac_fn_c_check_header_compile
1758
1759# ac_fn_c_try_link LINENO
1760# -----------------------
1761# Try to link conftest.$ac_ext, and return whether this succeeded.
1762ac_fn_c_try_link ()
1763{
1764 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1765 rm -f conftest.$ac_objext conftest$ac_exeext
1766 if { { ac_try="$ac_link"
1767case "(($ac_try" in
1768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1769 *) ac_try_echo=$ac_try;;
1770esac
1771eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1772$as_echo "$ac_try_echo"; } >&5
1773 (eval "$ac_link") 2>conftest.err
1774 ac_status=$?
1775 if test -s conftest.err; then
1776 grep -v '^ *+' conftest.err >conftest.er1
1777 cat conftest.er1 >&5
1778 mv -f conftest.er1 conftest.err
1779 fi
1780 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1781 test $ac_status = 0; } && {
1782 test -z "$ac_c_werror_flag" ||
1783 test ! -s conftest.err
1784 } && test -s conftest$ac_exeext && {
1785 test "$cross_compiling" = yes ||
1786 $as_test_x conftest$ac_exeext
1787 }; then :
1788 ac_retval=0
1789else
1790 $as_echo "$as_me: failed program was:" >&5
1791sed 's/^/| /' conftest.$ac_ext >&5
1792
1793 ac_retval=1
1794fi
1795 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1796 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1797 # interfere with the next link command; also delete a directory that is
1798 # left behind by Apple's compiler. We do this before executing the actions.
1799 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1800 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1801 as_fn_set_status $ac_retval
1802
1803} # ac_fn_c_try_link
1804
1805# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1806# -------------------------------------------
1807# Tests whether TYPE exists after having included INCLUDES, setting cache
1808# variable VAR accordingly.
1809ac_fn_c_check_type ()
1810{
1811 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1813$as_echo_n "checking for $2... " >&6; }
1814if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1815 $as_echo_n "(cached) " >&6
1816else
1817 eval "$3=no"
1818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1819/* end confdefs.h. */
1820$4
1821int
1822main ()
1823{
1824if (sizeof ($2))
1825 return 0;
1826 ;
1827 return 0;
1828}
1829_ACEOF
1830if ac_fn_c_try_compile "$LINENO"; then :
1831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1832/* end confdefs.h. */
1833$4
1834int
1835main ()
1836{
1837if (sizeof (($2)))
1838 return 0;
1839 ;
1840 return 0;
1841}
1842_ACEOF
1843if ac_fn_c_try_compile "$LINENO"; then :
1844
1845else
1846 eval "$3=yes"
1847fi
1848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1849fi
1850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1851fi
1852eval ac_res=\$$3
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1854$as_echo "$ac_res" >&6; }
1855 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1856
1857} # ac_fn_c_check_type
1858
1859# ac_fn_c_find_uintX_t LINENO BITS VAR
1860# ------------------------------------
1861# Finds an unsigned integer type with width BITS, setting cache variable VAR
1862# accordingly.
1863ac_fn_c_find_uintX_t ()
1864{
1865 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1867$as_echo_n "checking for uint$2_t... " >&6; }
1868if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1869 $as_echo_n "(cached) " >&6
1870else
1871 eval "$3=no"
1872 # Order is important - never check a type that is potentially smaller
1873 # than half of the expected target width.
1874 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1875 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1877/* end confdefs.h. */
1878$ac_includes_default
1879int
1880main ()
1881{
1882static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1883test_array [0] = 0
1884
1885 ;
1886 return 0;
1887}
1888_ACEOF
1889if ac_fn_c_try_compile "$LINENO"; then :
1890 case $ac_type in #(
1891 uint$2_t) :
1892 eval "$3=yes" ;; #(
1893 *) :
1894 eval "$3=\$ac_type" ;;
1895esac
1896fi
1897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1898 eval as_val=\$$3
1899 if test "x$as_val" = x""no; then :
1900
1901else
1902 break
1903fi
1904 done
1905fi
1906eval ac_res=\$$3
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1908$as_echo "$ac_res" >&6; }
1909 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1910
1911} # ac_fn_c_find_uintX_t
1912
1913# ac_fn_c_find_intX_t LINENO BITS VAR
1914# -----------------------------------
1915# Finds a signed integer type with width BITS, setting cache variable VAR
1916# accordingly.
1917ac_fn_c_find_intX_t ()
1918{
1919 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1921$as_echo_n "checking for int$2_t... " >&6; }
1922if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1923 $as_echo_n "(cached) " >&6
1924else
1925 eval "$3=no"
1926 # Order is important - never check a type that is potentially smaller
1927 # than half of the expected target width.
1928 for ac_type in int$2_t 'int' 'long int' \
1929 'long long int' 'short int' 'signed char'; do
1930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1931/* end confdefs.h. */
1932$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001933int
1934main ()
1935{
Antoine Pitrou042b1282010-08-13 21:15:58 +00001936static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1937 0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001938test_array [0] = 0
1939
1940 ;
1941 return 0;
1942}
1943_ACEOF
1944if ac_fn_c_try_compile "$LINENO"; then :
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946/* end confdefs.h. */
1947$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001948int
1949main ()
1950{
Antoine Pitrou042b1282010-08-13 21:15:58 +00001951static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1952 ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001953 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1954test_array [0] = 0
1955
1956 ;
1957 return 0;
1958}
1959_ACEOF
1960if ac_fn_c_try_compile "$LINENO"; then :
1961
1962else
1963 case $ac_type in #(
1964 int$2_t) :
1965 eval "$3=yes" ;; #(
1966 *) :
1967 eval "$3=\$ac_type" ;;
1968esac
1969fi
1970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1971fi
1972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1973 eval as_val=\$$3
1974 if test "x$as_val" = x""no; then :
1975
1976else
1977 break
1978fi
1979 done
1980fi
1981eval ac_res=\$$3
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1983$as_echo "$ac_res" >&6; }
1984 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1985
1986} # ac_fn_c_find_intX_t
1987
1988# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1989# --------------------------------------------
1990# Tries to find the compile-time value of EXPR in a program that includes
1991# INCLUDES, setting VAR accordingly. Returns whether the value could be
1992# computed
1993ac_fn_c_compute_int ()
1994{
1995 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1996 if test "$cross_compiling" = yes; then
1997 # Depending upon the size, compute the lo and hi bounds.
1998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1999/* end confdefs.h. */
2000$4
2001int
2002main ()
2003{
2004static int test_array [1 - 2 * !(($2) >= 0)];
2005test_array [0] = 0
2006
2007 ;
2008 return 0;
2009}
2010_ACEOF
2011if ac_fn_c_try_compile "$LINENO"; then :
2012 ac_lo=0 ac_mid=0
2013 while :; do
2014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015/* end confdefs.h. */
2016$4
2017int
2018main ()
2019{
2020static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2021test_array [0] = 0
2022
2023 ;
2024 return 0;
2025}
2026_ACEOF
2027if ac_fn_c_try_compile "$LINENO"; then :
2028 ac_hi=$ac_mid; break
2029else
2030 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2031 if test $ac_lo -le $ac_mid; then
2032 ac_lo= ac_hi=
2033 break
2034 fi
2035 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2036fi
2037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2038 done
2039else
2040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041/* end confdefs.h. */
2042$4
2043int
2044main ()
2045{
2046static int test_array [1 - 2 * !(($2) < 0)];
2047test_array [0] = 0
2048
2049 ;
2050 return 0;
2051}
2052_ACEOF
2053if ac_fn_c_try_compile "$LINENO"; then :
2054 ac_hi=-1 ac_mid=-1
2055 while :; do
2056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057/* end confdefs.h. */
2058$4
2059int
2060main ()
2061{
2062static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2063test_array [0] = 0
2064
2065 ;
2066 return 0;
2067}
2068_ACEOF
2069if ac_fn_c_try_compile "$LINENO"; then :
2070 ac_lo=$ac_mid; break
2071else
2072 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2073 if test $ac_mid -le $ac_hi; then
2074 ac_lo= ac_hi=
2075 break
2076 fi
2077 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080 done
2081else
2082 ac_lo= ac_hi=
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087# Binary search between lo and hi bounds.
2088while test "x$ac_lo" != "x$ac_hi"; do
2089 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2091/* end confdefs.h. */
2092$4
2093int
2094main ()
2095{
2096static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2097test_array [0] = 0
2098
2099 ;
2100 return 0;
2101}
2102_ACEOF
2103if ac_fn_c_try_compile "$LINENO"; then :
2104 ac_hi=$ac_mid
2105else
2106 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2107fi
2108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2109done
2110case $ac_lo in #((
2111?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2112'') ac_retval=1 ;;
2113esac
2114 else
2115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116/* end confdefs.h. */
2117$4
2118static long int longval () { return $2; }
2119static unsigned long int ulongval () { return $2; }
2120#include <stdio.h>
2121#include <stdlib.h>
2122int
2123main ()
2124{
2125
2126 FILE *f = fopen ("conftest.val", "w");
2127 if (! f)
2128 return 1;
2129 if (($2) < 0)
2130 {
2131 long int i = longval ();
2132 if (i != ($2))
2133 return 1;
2134 fprintf (f, "%ld", i);
2135 }
2136 else
2137 {
2138 unsigned long int i = ulongval ();
2139 if (i != ($2))
2140 return 1;
2141 fprintf (f, "%lu", i);
2142 }
2143 /* Do not output a trailing newline, as this causes \r\n confusion
2144 on some platforms. */
2145 return ferror (f) || fclose (f) != 0;
2146
2147 ;
2148 return 0;
2149}
2150_ACEOF
2151if ac_fn_c_try_run "$LINENO"; then :
2152 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2153else
2154 ac_retval=1
2155fi
2156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2157 conftest.$ac_objext conftest.beam conftest.$ac_ext
2158rm -f conftest.val
2159
2160 fi
2161 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2162 as_fn_set_status $ac_retval
2163
2164} # ac_fn_c_compute_int
2165
2166# ac_fn_c_check_func LINENO FUNC VAR
2167# ----------------------------------
2168# Tests whether FUNC exists, setting the cache variable VAR accordingly
2169ac_fn_c_check_func ()
2170{
2171 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2173$as_echo_n "checking for $2... " >&6; }
2174if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2175 $as_echo_n "(cached) " >&6
2176else
2177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178/* end confdefs.h. */
2179/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2180 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2181#define $2 innocuous_$2
2182
2183/* System header to define __stub macros and hopefully few prototypes,
2184 which can conflict with char $2 (); below.
2185 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2186 <limits.h> exists even on freestanding compilers. */
2187
2188#ifdef __STDC__
2189# include <limits.h>
2190#else
2191# include <assert.h>
2192#endif
2193
2194#undef $2
2195
2196/* Override any GCC internal prototype to avoid an error.
2197 Use char because int might match the return type of a GCC
2198 builtin and then its argument prototype would still apply. */
2199#ifdef __cplusplus
2200extern "C"
2201#endif
2202char $2 ();
2203/* The GNU C library defines this for functions which it implements
2204 to always fail with ENOSYS. Some functions are actually named
2205 something starting with __ and the normal name is an alias. */
2206#if defined __stub_$2 || defined __stub___$2
2207choke me
2208#endif
2209
2210int
2211main ()
2212{
2213return $2 ();
2214 ;
2215 return 0;
2216}
2217_ACEOF
2218if ac_fn_c_try_link "$LINENO"; then :
2219 eval "$3=yes"
2220else
2221 eval "$3=no"
2222fi
2223rm -f core conftest.err conftest.$ac_objext \
2224 conftest$ac_exeext conftest.$ac_ext
2225fi
2226eval ac_res=\$$3
2227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2228$as_echo "$ac_res" >&6; }
2229 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2230
2231} # ac_fn_c_check_func
2232
2233# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2234# ----------------------------------------------------
2235# Tries to find if the field MEMBER exists in type AGGR, after including
2236# INCLUDES, setting cache variable VAR accordingly.
2237ac_fn_c_check_member ()
2238{
2239 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2241$as_echo_n "checking for $2.$3... " >&6; }
2242if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2243 $as_echo_n "(cached) " >&6
2244else
2245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2246/* end confdefs.h. */
2247$5
2248int
2249main ()
2250{
2251static $2 ac_aggr;
2252if (ac_aggr.$3)
2253return 0;
2254 ;
2255 return 0;
2256}
2257_ACEOF
2258if ac_fn_c_try_compile "$LINENO"; then :
2259 eval "$4=yes"
2260else
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262/* end confdefs.h. */
2263$5
2264int
2265main ()
2266{
2267static $2 ac_aggr;
2268if (sizeof ac_aggr.$3)
2269return 0;
2270 ;
2271 return 0;
2272}
2273_ACEOF
2274if ac_fn_c_try_compile "$LINENO"; then :
2275 eval "$4=yes"
2276else
2277 eval "$4=no"
2278fi
2279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2280fi
2281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2282fi
2283eval ac_res=\$$4
2284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2285$as_echo "$ac_res" >&6; }
2286 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2287
2288} # ac_fn_c_check_member
2289
2290# ac_fn_c_check_decl LINENO SYMBOL VAR
2291# ------------------------------------
2292# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2293ac_fn_c_check_decl ()
2294{
2295 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2297$as_echo_n "checking whether $2 is declared... " >&6; }
2298if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2299 $as_echo_n "(cached) " >&6
2300else
2301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h. */
2303$4
2304int
2305main ()
2306{
2307#ifndef $2
2308 (void) $2;
2309#endif
2310
2311 ;
2312 return 0;
2313}
2314_ACEOF
2315if ac_fn_c_try_compile "$LINENO"; then :
2316 eval "$3=yes"
2317else
2318 eval "$3=no"
2319fi
2320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2321fi
2322eval ac_res=\$$3
2323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2324$as_echo "$ac_res" >&6; }
2325 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2326
2327} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002328cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002329This file contains any messages produced by compilers while
2330running configure, to aid debugging if configure makes a mistake.
2331
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002332It was created by python $as_me 3.2, which was
Matthias Kloseb9621712010-04-24 17:59:49 +00002333generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002334
2335 $ $0 $@
2336
2337_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002338exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002339{
2340cat <<_ASUNAME
2341## --------- ##
2342## Platform. ##
2343## --------- ##
2344
2345hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2346uname -m = `(uname -m) 2>/dev/null || echo unknown`
2347uname -r = `(uname -r) 2>/dev/null || echo unknown`
2348uname -s = `(uname -s) 2>/dev/null || echo unknown`
2349uname -v = `(uname -v) 2>/dev/null || echo unknown`
2350
2351/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2352/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2353
2354/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2355/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2356/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002357/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002358/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2359/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2360/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2361
2362_ASUNAME
2363
2364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2365for as_dir in $PATH
2366do
2367 IFS=$as_save_IFS
2368 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002369 $as_echo "PATH: $as_dir"
2370 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002371IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002372
2373} >&5
2374
2375cat >&5 <<_ACEOF
2376
2377
2378## ----------- ##
2379## Core tests. ##
2380## ----------- ##
2381
2382_ACEOF
2383
2384
2385# Keep a trace of the command line.
2386# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002387# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002388# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002389# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002390ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002391ac_configure_args0=
2392ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002393ac_must_keep_next=false
2394for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002395do
Skip Montanaro6dead952003-09-25 14:50:04 +00002396 for ac_arg
2397 do
2398 case $ac_arg in
2399 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2400 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2401 | -silent | --silent | --silen | --sile | --sil)
2402 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002403 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002404 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002405 esac
2406 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002407 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002409 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002410 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002411 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002413 case $ac_arg in
2414 *=* | --config-cache | -C | -disable-* | --disable-* \
2415 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2416 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2417 | -with-* | --with-* | -without-* | --without-* | --x)
2418 case "$ac_configure_args0 " in
2419 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2420 esac
2421 ;;
2422 -* ) ac_must_keep_next=true ;;
2423 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 ;;
2427 esac
2428 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002429done
Matthias Kloseb9621712010-04-24 17:59:49 +00002430{ ac_configure_args0=; unset ac_configure_args0;}
2431{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002432
2433# When interrupted or exit'd, cleanup temporary files, and complete
2434# config.log. We remove comments because anyway the quotes in there
2435# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002436# WARNING: Use '\'' to represent an apostrophe within the trap.
2437# 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 +00002438trap 'exit_status=$?
2439 # Save into config.log some information that might help in debugging.
2440 {
2441 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002442
Martin v. Löwis11437992002-04-12 09:54:03 +00002443 cat <<\_ASBOX
2444## ---------------- ##
2445## Cache variables. ##
2446## ---------------- ##
2447_ASBOX
2448 echo
2449 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002450(
2451 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2452 eval ac_val=\$$ac_var
2453 case $ac_val in #(
2454 *${as_nl}*)
2455 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002456 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2457$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458 esac
2459 case $ac_var in #(
2460 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002461 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2462 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002463 esac ;;
2464 esac
2465 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002466 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2468 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002469 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470 "s/'\''/'\''\\\\'\'''\''/g;
2471 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2472 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002473 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002475 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 esac |
2477 sort
2478)
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002480
2481 cat <<\_ASBOX
2482## ----------------- ##
2483## Output variables. ##
2484## ----------------- ##
2485_ASBOX
2486 echo
2487 for ac_var in $ac_subst_vars
2488 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 eval ac_val=\$$ac_var
2490 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002491 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 done | sort
2495 echo
2496
2497 if test -n "$ac_subst_files"; then
2498 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499## ------------------- ##
2500## File substitutions. ##
2501## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002502_ASBOX
2503 echo
2504 for ac_var in $ac_subst_files
2505 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 eval ac_val=\$$ac_var
2507 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 done | sort
2512 echo
2513 fi
2514
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 if test -s confdefs.h; then
2516 cat <<\_ASBOX
2517## ----------- ##
2518## confdefs.h. ##
2519## ----------- ##
2520_ASBOX
2521 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 echo
2524 fi
2525 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 $as_echo "$as_me: caught signal $ac_signal"
2527 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 rm -f core *.core core.conftest.* &&
2530 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002533for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002534 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002535done
2536ac_signal=0
2537
2538# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002540
Matthias Kloseb9621712010-04-24 17:59:49 +00002541$as_echo "/* confdefs.h */" > confdefs.h
2542
Martin v. Löwis11437992002-04-12 09:54:03 +00002543# Predefined preprocessor variables.
2544
2545cat >>confdefs.h <<_ACEOF
2546#define PACKAGE_NAME "$PACKAGE_NAME"
2547_ACEOF
2548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_VERSION "$PACKAGE_VERSION"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_STRING "$PACKAGE_STRING"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2563_ACEOF
2564
Matthias Kloseb9621712010-04-24 17:59:49 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_URL "$PACKAGE_URL"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569
2570# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002571# Prefer an explicitly selected file to automatically selected ones.
2572ac_site_file1=NONE
2573ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574if test -n "$CONFIG_SITE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002575 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002577 ac_site_file1=$prefix/share/config.site
2578 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579else
Matthias Kloseb9621712010-04-24 17:59:49 +00002580 ac_site_file1=$ac_default_prefix/share/config.site
2581 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002583for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584do
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 test "x$ac_site_file" = xNONE && continue
2586 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2587 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2588$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002589 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002590 . "$ac_site_file"
2591 fi
2592done
2593
2594if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 # Some versions of bash will fail to source /dev/null (special files
2596 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2597 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2598 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2599$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2602 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002603 esac
2604 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002605else
Matthias Kloseb9621712010-04-24 17:59:49 +00002606 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2607$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 >$cache_file
2609fi
2610
2611# Check that the precious variables saved in the cache have kept the same
2612# value.
2613ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2616 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002617 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2618 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 case $ac_old_set,$ac_new_set in
2620 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002621 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2622$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 +00002623 ac_cache_corrupted=: ;;
2624 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002625 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2626$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 ac_cache_corrupted=: ;;
2628 ,);;
2629 *)
2630 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002631 # differences in whitespace do not lead to failure.
2632 ac_old_val_w=`echo x $ac_old_val`
2633 ac_new_val_w=`echo x $ac_new_val`
2634 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2635 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2636$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2637 ac_cache_corrupted=:
2638 else
2639 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2640$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2641 eval $ac_var=\$ac_old_val
2642 fi
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2644$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2646$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002647 fi;;
2648 esac
2649 # Pass precious variables to config.status.
2650 if test "$ac_new_set" = set; then
2651 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002652 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 *) ac_arg=$ac_var=$ac_new_val ;;
2654 esac
2655 case " $ac_configure_args " in
2656 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002657 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 esac
2659 fi
2660done
2661if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002662 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2663$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2665$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2666 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002668## -------------------- ##
2669## Main body of script. ##
2670## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002671
Guido van Rossum7f43da71994-08-01 12:15:30 +00002672ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002673ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002674ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2675ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2676ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002677
Guido van Rossum627b2d71993-12-24 10:39:16 +00002678
Michael W. Hudson54241132001-12-07 15:38:26 +00002679
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002680ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002681
2682
Martin v. Löwis11437992002-04-12 09:54:03 +00002683
Benjamin Petersond23f8222009-04-05 19:13:16 +00002684if test "$prefix" != "/"; then
2685 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2686fi
2687
2688
Martin v. Löwis11437992002-04-12 09:54:03 +00002689
2690
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002691# We don't use PACKAGE_ variables, and they cause conflicts
2692# with other autoconf-based packages that include Python.h
2693grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2694rm confdefs.h
2695mv confdefs.h.new confdefs.h
2696
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002697
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002698VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002699
Martin v. Löwis1142de32002-03-29 16:28:31 +00002700
2701SOVERSION=1.0
2702
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002703# The later defininition of _XOPEN_SOURCE disables certain features
2704# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2705
Matthias Kloseb9621712010-04-24 17:59:49 +00002706$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002707
2708
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002709# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2710# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2711# them.
2712
Matthias Kloseb9621712010-04-24 17:59:49 +00002713$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002714
2715
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002716# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2717# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2718# them.
2719
Matthias Kloseb9621712010-04-24 17:59:49 +00002720$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002721
2722
Martin v. Löwisd6320502004-08-12 13:45:08 +00002723# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2724# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2725
Matthias Kloseb9621712010-04-24 17:59:49 +00002726$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002727
2728
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002729# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2730# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2731# them.
2732
Matthias Kloseb9621712010-04-24 17:59:49 +00002733$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002734
2735
2736
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002737define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002738
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002739# Arguments passed to configure.
2740
2741CONFIG_ARGS="$ac_configure_args"
2742
Matthias Kloseb9621712010-04-24 17:59:49 +00002743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2744$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002745# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002746if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002747 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002748 case $enableval in
2749 yes)
2750 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002751 if test ! -d "${enableval}"
2752 then
2753 enableval=/
2754 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002755 ;;
2756 esac
2757 case $enableval in
2758 no)
2759 UNIVERSALSDK=
2760 enable_universalsdk=
2761 ;;
2762 *)
2763 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002764 if test ! -d "${UNIVERSALSDK}"
2765 then
Matthias Kloseb9621712010-04-24 17:59:49 +00002766 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002767 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002768 ;;
2769 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002770
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002771
Thomas Wouters477c8d52006-05-27 19:21:47 +00002772else
2773
2774 UNIVERSALSDK=
2775 enable_universalsdk=
2776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002777fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002778
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002779if test -n "${UNIVERSALSDK}"
2780then
Matthias Kloseb9621712010-04-24 17:59:49 +00002781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2782$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002783else
Matthias Kloseb9621712010-04-24 17:59:49 +00002784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2785$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002786fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002787
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002788
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002789
2790
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002791UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002792
Matthias Kloseb9621712010-04-24 17:59:49 +00002793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2794$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002795
2796# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002797if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002798 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2800$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002801 UNIVERSAL_ARCHS="$withval"
2802
2803else
2804
Matthias Kloseb9621712010-04-24 17:59:49 +00002805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2806$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002807
2808fi
2809
2810
2811
2812
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002813
2814# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002815if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002816 withval=$with_framework_name;
2817 PYTHONFRAMEWORK=${withval}
2818 PYTHONFRAMEWORKDIR=${withval}.framework
2819 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2820
2821else
2822
2823 PYTHONFRAMEWORK=Python
2824 PYTHONFRAMEWORKDIR=Python.framework
2825 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2826
2827fi
2828
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002829# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002830if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002831 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002832 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002833 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002834 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002835 esac
2836 case $enableval in
2837 no)
2838 PYTHONFRAMEWORK=
2839 PYTHONFRAMEWORKDIR=no-framework
2840 PYTHONFRAMEWORKPREFIX=
2841 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002842 FRAMEWORKINSTALLFIRST=
2843 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002844 FRAMEWORKALTINSTALLFIRST=
2845 FRAMEWORKALTINSTALLLAST=
2846 if test "x${prefix}" = "xNONE"; then
2847 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2848 else
2849 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2850 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002851 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002852 ;;
2853 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002854 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002855 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002856 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002857 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002858 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2859 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002860 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002861
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002862 if test "x${prefix}" = "xNONE" ; then
2863 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002864
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002865 else
2866 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2867 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002868
2869 case "${enableval}" in
2870 /System*)
2871 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2872 if test "${prefix}" = "NONE" ; then
2873 # See below
2874 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2875 fi
2876 ;;
2877
2878 /Library*)
2879 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2880 ;;
2881
2882 */Library/Frameworks)
2883 MDIR="`dirname "${enableval}"`"
2884 MDIR="`dirname "${MDIR}"`"
2885 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2886
2887 if test "${prefix}" = "NONE"; then
2888 # User hasn't specified the
2889 # --prefix option, but wants to install
2890 # the framework in a non-default location,
2891 # ensure that the compatibility links get
2892 # installed relative to that prefix as well
2893 # instead of in /usr/local.
2894 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2895 fi
2896 ;;
2897
2898 *)
2899 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2900 ;;
2901 esac
2902
Jack Jansen127e56e2001-09-11 14:41:54 +00002903 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002904
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002905 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002906 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002907 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002908
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002909 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002910
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002911 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2912
2913 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2914
Jack Jansene578a632001-08-15 01:27:14 +00002915 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002916
Guido van Rossum563e7081996-09-10 18:20:48 +00002917else
Martin v. Löwis11437992002-04-12 09:54:03 +00002918
Jack Jansene578a632001-08-15 01:27:14 +00002919 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002920 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002921 PYTHONFRAMEWORKPREFIX=
2922 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002923 FRAMEWORKINSTALLFIRST=
2924 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002925 FRAMEWORKALTINSTALLFIRST=
2926 FRAMEWORKALTINSTALLLAST=
2927 if test "x${prefix}" = "xNONE" ; then
2928 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2929 else
2930 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2931 fi
Jack Jansene578a632001-08-15 01:27:14 +00002932 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002933
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002934
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002935fi
2936
Thomas Wouters477c8d52006-05-27 19:21:47 +00002937
2938
Michael W. Hudson54241132001-12-07 15:38:26 +00002939
2940
2941
2942
Jack Jansene578a632001-08-15 01:27:14 +00002943
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002944
2945
2946
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002947
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002948
Jack Jansene578a632001-08-15 01:27:14 +00002949##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002950## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002951## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002952##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002953# Set name for machine-dependent library files
2954
Matthias Kloseb9621712010-04-24 17:59:49 +00002955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2956$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002957if test -z "$MACHDEP"
2958then
Guido van Rossum563e7081996-09-10 18:20:48 +00002959 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002960 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002961 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002962 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002963 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002964 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002965 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002966 ac_md_system=`echo $ac_sys_system |
2967 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2968 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002969 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002970 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002971
Guido van Rossum07397971997-04-29 21:49:50 +00002972 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002973 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002974 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002975 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002976 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002977 esac
2978fi
Guido van Rossum91922671997-10-09 20:24:13 +00002979
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002980# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2981# disable features if it is defined, without any means to access these
2982# features as extensions. For these systems, we skip the definition of
2983# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2984# some feature, make sure there is no alternative way to access this
2985# feature. Also, when using wildcards, make sure you have verified the
2986# need for not defining _XOPEN_SOURCE on all systems matching the
2987# wildcard, and that the wildcard does not include future systems
2988# (which may remove their limitations).
2989case $ac_sys_system/$ac_sys_release in
2990 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2991 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002992 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002993 # In addition, Stefan Krah confirms that issue #1244610 exists through
2994 # OpenBSD 4.6, but is fixed in 4.7.
2995 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002996 define_xopen_source=no
2997 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2998 # also defined. This can be overridden by defining _BSD_SOURCE
2999 # As this has a different meaning on Linux, only define it on OpenBSD
3000
Matthias Kloseb9621712010-04-24 17:59:49 +00003001$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003002
3003 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003004 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003005 # 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
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003010
3011 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003012 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3013 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3014 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003015 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 +00003016 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003017 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3018 # request to enable features supported by the standard as a request
3019 # to disable features not supported by the standard. The best way
3020 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3021 # entirely and define __EXTENSIONS__ instead.
3022 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003023 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003024 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3025 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003026 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003027 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003028 define_xopen_source=no;;
3029 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003030 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003031 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003032 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003033 # On FreeBSD 4, the math functions C89 does not cover are never defined
3034 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3035 FreeBSD/4.*)
3036 define_xopen_source=no;;
3037 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3038 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3039 # identifies itself as Darwin/7.*
3040 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3041 # disables platform specific features beyond repair.
3042 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3043 # has no effect, don't bother defining them
3044 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003045 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003046 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003047 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003048 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3049 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3050 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003051 AIX/4)
3052 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003053 AIX/5)
3054 if test `uname -r` -eq 1; then
3055 define_xopen_source=no
3056 fi
3057 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003058 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3059 # defining NI_NUMERICHOST.
3060 QNX/6.3.2)
3061 define_xopen_source=no
3062 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003063
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003064esac
3065
3066if test $define_xopen_source = yes
3067then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003068
Matthias Kloseb9621712010-04-24 17:59:49 +00003069$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003070
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003071
3072 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3073 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3074 # several APIs are not declared. Since this is also needed in some
3075 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003076
Matthias Kloseb9621712010-04-24 17:59:49 +00003077$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003078
3079
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003080
Matthias Kloseb9621712010-04-24 17:59:49 +00003081$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003082
3083
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003084fi
3085
Guido van Rossum91922671997-10-09 20:24:13 +00003086#
3087# SGI compilers allow the specification of the both the ABI and the
3088# ISA on the command line. Depending on the values of these switches,
3089# different and often incompatable code will be generated.
3090#
3091# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3092# thus supply support for various ABI/ISA combinations. The MACHDEP
3093# variable is also adjusted.
3094#
3095
3096if test ! -z "$SGI_ABI"
3097then
3098 CC="cc $SGI_ABI"
3099 LDFLAGS="$SGI_ABI $LDFLAGS"
3100 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3101fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3103$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003104
Jack Jansen6b08a402004-06-03 12:41:45 +00003105# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3106# it may influence the way we can build extensions, so distutils
3107# needs to check it
3108
Thomas Wouters477c8d52006-05-27 19:21:47 +00003109
Jack Jansen6b08a402004-06-03 12:41:45 +00003110CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003111EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003112
Matthias Kloseb9621712010-04-24 17:59:49 +00003113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3114$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003115ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3117$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003118
Guido van Rossum627b2d71993-12-24 10:39:16 +00003119# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003120
3121# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3122# for debug/optimization stuff. BASECFLAGS is for flags that are required
3123# just to get things to compile and link. Users are free to override OPT
3124# when running configure or make. The build should not break if they do.
3125# BASECFLAGS should generally not be messed with, however.
3126
3127# XXX shouldn't some/most/all of this code be merged with the stuff later
3128# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3130$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003131
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003132# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003133if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003134 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003135 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003136 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003137 without_gcc=yes;;
3138 yes) CC=gcc
3139 without_gcc=no;;
3140 *) CC=$withval
3141 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003142 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003143else
Martin v. Löwis11437992002-04-12 09:54:03 +00003144
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003145 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003146 AIX*) CC=cc_r
3147 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003148 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003149 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003150fi
3151
Matthias Kloseb9621712010-04-24 17:59:49 +00003152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3153$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003154
Guido van Rossum8b131c51995-03-09 14:10:13 +00003155# If the user switches compilers, we can't believe the cache
3156if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3157then
Matthias Kloseb9621712010-04-24 17:59:49 +00003158 as_fn_error "cached CC is different -- throw away $cache_file
3159(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003160fi
3161
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003162# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3163# when the compiler supports them, but we don't always want -O2, and
3164# we set -g later.
3165if test -z "$CFLAGS"; then
3166 CFLAGS=
3167fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003168ac_ext=c
3169ac_cpp='$CPP $CPPFLAGS'
3170ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3171ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3172ac_compiler_gnu=$ac_cv_c_compiler_gnu
3173if test -n "$ac_tool_prefix"; then
3174 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3175set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3177$as_echo_n "checking for $ac_word... " >&6; }
3178if test "${ac_cv_prog_CC+set}" = set; then :
3179 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003180else
3181 if test -n "$CC"; then
3182 ac_cv_prog_CC="$CC" # Let the user override the test.
3183else
Martin v. Löwis11437992002-04-12 09:54:03 +00003184as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3185for as_dir in $PATH
3186do
3187 IFS=$as_save_IFS
3188 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003189 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003190 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 +00003191 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003192 $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 +00003193 break 2
3194 fi
3195done
Matthias Kloseb9621712010-04-24 17:59:49 +00003196 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003197IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003198
Jack Jansendd19cf82001-12-06 22:36:17 +00003199fi
3200fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003201CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003202if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3204$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003205else
Matthias Kloseb9621712010-04-24 17:59:49 +00003206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3207$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003208fi
3209
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003210
Martin v. Löwis11437992002-04-12 09:54:03 +00003211fi
3212if test -z "$ac_cv_prog_CC"; then
3213 ac_ct_CC=$CC
3214 # Extract the first word of "gcc", so it can be a program name with args.
3215set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3217$as_echo_n "checking for $ac_word... " >&6; }
3218if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3219 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003220else
3221 if test -n "$ac_ct_CC"; then
3222 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3223else
3224as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3225for as_dir in $PATH
3226do
3227 IFS=$as_save_IFS
3228 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003229 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003230 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 +00003231 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003232 $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 +00003233 break 2
3234 fi
3235done
Matthias Kloseb9621712010-04-24 17:59:49 +00003236 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003237IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003238
3239fi
3240fi
3241ac_ct_CC=$ac_cv_prog_ac_ct_CC
3242if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3244$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003245else
Matthias Kloseb9621712010-04-24 17:59:49 +00003246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3247$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003248fi
3249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003250 if test "x$ac_ct_CC" = x; then
3251 CC=""
3252 else
3253 case $cross_compiling:$ac_tool_warned in
3254yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003255{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3256$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003257ac_tool_warned=yes ;;
3258esac
3259 CC=$ac_ct_CC
3260 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003261else
3262 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003263fi
3264
Jack Jansendd19cf82001-12-06 22:36:17 +00003265if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003266 if test -n "$ac_tool_prefix"; then
3267 # 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 +00003268set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3270$as_echo_n "checking for $ac_word... " >&6; }
3271if test "${ac_cv_prog_CC+set}" = set; then :
3272 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003273else
3274 if test -n "$CC"; then
3275 ac_cv_prog_CC="$CC" # Let the user override the test.
3276else
Martin v. Löwis11437992002-04-12 09:54:03 +00003277as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3278for as_dir in $PATH
3279do
3280 IFS=$as_save_IFS
3281 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003282 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003283 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 +00003284 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003285 $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 +00003286 break 2
3287 fi
3288done
Matthias Kloseb9621712010-04-24 17:59:49 +00003289 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003290IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003291
3292fi
3293fi
3294CC=$ac_cv_prog_CC
3295if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3297$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003298else
Matthias Kloseb9621712010-04-24 17:59:49 +00003299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3300$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003301fi
3302
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003303
Martin v. Löwis11437992002-04-12 09:54:03 +00003304 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003305fi
3306if test -z "$CC"; then
3307 # Extract the first word of "cc", so it can be a program name with args.
3308set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3310$as_echo_n "checking for $ac_word... " >&6; }
3311if test "${ac_cv_prog_CC+set}" = set; then :
3312 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003313else
3314 if test -n "$CC"; then
3315 ac_cv_prog_CC="$CC" # Let the user override the test.
3316else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003317 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3319for as_dir in $PATH
3320do
3321 IFS=$as_save_IFS
3322 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003323 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003324 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 +00003325 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3326 ac_prog_rejected=yes
3327 continue
3328 fi
3329 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003330 $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 +00003331 break 2
3332 fi
3333done
Matthias Kloseb9621712010-04-24 17:59:49 +00003334 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003335IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003336
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003337if test $ac_prog_rejected = yes; then
3338 # We found a bogon in the path, so make sure we never use it.
3339 set dummy $ac_cv_prog_CC
3340 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003341 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003342 # We chose a different compiler from the bogus one.
3343 # However, it has the same basename, so the bogon will be chosen
3344 # first if we set CC to just the basename; use the full file name.
3345 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003346 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003347 fi
3348fi
3349fi
3350fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003351CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003352if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3354$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003355else
Matthias Kloseb9621712010-04-24 17:59:49 +00003356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3357$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003358fi
3359
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003360
Martin v. Löwis11437992002-04-12 09:54:03 +00003361fi
3362if test -z "$CC"; then
3363 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003364 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003365 do
3366 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3367set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3369$as_echo_n "checking for $ac_word... " >&6; }
3370if test "${ac_cv_prog_CC+set}" = set; then :
3371 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003372else
3373 if test -n "$CC"; then
3374 ac_cv_prog_CC="$CC" # Let the user override the test.
3375else
Martin v. Löwis11437992002-04-12 09:54:03 +00003376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3377for as_dir in $PATH
3378do
3379 IFS=$as_save_IFS
3380 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003381 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003382 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 +00003383 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003384 $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 +00003385 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003386 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003387done
Matthias Kloseb9621712010-04-24 17:59:49 +00003388 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003389IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003390
3391fi
3392fi
3393CC=$ac_cv_prog_CC
3394if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3396$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003397else
Matthias Kloseb9621712010-04-24 17:59:49 +00003398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3399$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003400fi
3401
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003402
Martin v. Löwis11437992002-04-12 09:54:03 +00003403 test -n "$CC" && break
3404 done
3405fi
3406if test -z "$CC"; then
3407 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003408 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003409do
3410 # Extract the first word of "$ac_prog", so it can be a program name with args.
3411set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3413$as_echo_n "checking for $ac_word... " >&6; }
3414if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3415 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003416else
3417 if test -n "$ac_ct_CC"; then
3418 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3419else
3420as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3421for as_dir in $PATH
3422do
3423 IFS=$as_save_IFS
3424 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003425 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003426 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 +00003427 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003428 $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 +00003429 break 2
3430 fi
3431done
Matthias Kloseb9621712010-04-24 17:59:49 +00003432 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003433IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003434
Martin v. Löwis11437992002-04-12 09:54:03 +00003435fi
3436fi
3437ac_ct_CC=$ac_cv_prog_ac_ct_CC
3438if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3440$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003441else
Matthias Kloseb9621712010-04-24 17:59:49 +00003442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3443$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003444fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003445
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003446
Martin v. Löwis11437992002-04-12 09:54:03 +00003447 test -n "$ac_ct_CC" && break
3448done
Michael W. Hudson54241132001-12-07 15:38:26 +00003449
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003450 if test "x$ac_ct_CC" = x; then
3451 CC=""
3452 else
3453 case $cross_compiling:$ac_tool_warned in
3454yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003455{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3456$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003457ac_tool_warned=yes ;;
3458esac
3459 CC=$ac_ct_CC
3460 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003461fi
3462
3463fi
3464
3465
Matthias Kloseb9621712010-04-24 17:59:49 +00003466test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3467$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3468as_fn_error "no acceptable C compiler found in \$PATH
3469See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003470
3471# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003472$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3473set X $ac_compile
3474ac_compiler=$2
3475for ac_option in --version -v -V -qversion; do
3476 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003477case "(($ac_try" in
3478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3479 *) ac_try_echo=$ac_try;;
3480esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003481eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3482$as_echo "$ac_try_echo"; } >&5
3483 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003484 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003485 if test -s conftest.err; then
3486 sed '10a\
3487... rest of stderr output deleted ...
3488 10q' conftest.err >conftest.er1
3489 cat conftest.er1 >&5
3490 fi
3491 rm -f conftest.er1 conftest.err
3492 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3493 test $ac_status = 0; }
3494done
Martin v. Löwis11437992002-04-12 09:54:03 +00003495
Matthias Kloseb9621712010-04-24 17:59:49 +00003496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003497/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003498
Martin v. Löwis11437992002-04-12 09:54:03 +00003499int
3500main ()
3501{
3502
3503 ;
3504 return 0;
3505}
3506_ACEOF
3507ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003508ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003509# Try to create an executable without -o first, disregard a.out.
3510# It will help us diagnose broken compilers, and finding out an intuition
3511# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3513$as_echo_n "checking whether the C compiler works... " >&6; }
3514ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3515
3516# The possible output files:
3517ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3518
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003519ac_rmfiles=
3520for ac_file in $ac_files
3521do
3522 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003523 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003524 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3525 esac
3526done
3527rm -f $ac_rmfiles
3528
Matthias Kloseb9621712010-04-24 17:59:49 +00003529if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003530case "(($ac_try" in
3531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3532 *) ac_try_echo=$ac_try;;
3533esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003534eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3535$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003536 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003537 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003538 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3539 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003540 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3541# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3542# in a Makefile. We should not override ac_cv_exeext if it was cached,
3543# so that the user can short-circuit this test for compilers unknown to
3544# Autoconf.
3545for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003546do
3547 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003548 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003549 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003550 ;;
3551 [ab].out )
3552 # We found the default executable, but exeext='' is most
3553 # certainly right.
3554 break;;
3555 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003556 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003557 then :; else
3558 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3559 fi
3560 # We set ac_cv_exeext here because the later test for it is not
3561 # safe: cross compilers may not add the suffix if given an `-o'
3562 # argument, so we may need to know it at that point already.
3563 # Even if this section looks crufty: it has the advantage of
3564 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003565 break;;
3566 * )
3567 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003568 esac
3569done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003570test "$ac_cv_exeext" = no && ac_cv_exeext=
3571
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003572else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003573 ac_file=''
3574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003575if test -z "$ac_file"; then :
3576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3577$as_echo "no" >&6; }
3578$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003579sed 's/^/| /' conftest.$ac_ext >&5
3580
Matthias Kloseb9621712010-04-24 17:59:49 +00003581{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3582$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3583{ as_fn_set_status 77
3584as_fn_error "C compiler cannot create executables
3585See \`config.log' for more details." "$LINENO" 5; }; }
3586else
3587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3588$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3591$as_echo_n "checking for C compiler default output file name... " >&6; }
3592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3593$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003594ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003595
Matthias Kloseb9621712010-04-24 17:59:49 +00003596rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003597ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3599$as_echo_n "checking for suffix of executables... " >&6; }
3600if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003601case "(($ac_try" in
3602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3603 *) ac_try_echo=$ac_try;;
3604esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003605eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3606$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003607 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003608 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003609 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3610 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003611 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3612# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3613# work properly (i.e., refer to `conftest.exe'), while it won't with
3614# `rm'.
3615for ac_file in conftest.exe conftest conftest.*; do
3616 test -f "$ac_file" || continue
3617 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003619 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3620 break;;
3621 * ) break;;
3622 esac
3623done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003624else
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3626$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3627as_fn_error "cannot compute suffix of executables: cannot compile and link
3628See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003630rm -f conftest conftest$ac_cv_exeext
3631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3632$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003633
3634rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003635EXEEXT=$ac_cv_exeext
3636ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3638/* end confdefs.h. */
3639#include <stdio.h>
3640int
3641main ()
3642{
3643FILE *f = fopen ("conftest.out", "w");
3644 return ferror (f) || fclose (f) != 0;
3645
3646 ;
3647 return 0;
3648}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003650ac_clean_files="$ac_clean_files conftest.out"
3651# Check that the compiler produces executables we can run. If not, either
3652# the compiler is broken, or we cross compile.
3653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3654$as_echo_n "checking whether we are cross compiling... " >&6; }
3655if test "$cross_compiling" != yes; then
3656 { { ac_try="$ac_link"
3657case "(($ac_try" in
3658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3659 *) ac_try_echo=$ac_try;;
3660esac
3661eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3662$as_echo "$ac_try_echo"; } >&5
3663 (eval "$ac_link") 2>&5
3664 ac_status=$?
3665 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3666 test $ac_status = 0; }
3667 if { ac_try='./conftest$ac_cv_exeext'
3668 { { case "(($ac_try" in
3669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3670 *) ac_try_echo=$ac_try;;
3671esac
3672eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3673$as_echo "$ac_try_echo"; } >&5
3674 (eval "$ac_try") 2>&5
3675 ac_status=$?
3676 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3677 test $ac_status = 0; }; }; then
3678 cross_compiling=no
3679 else
3680 if test "$cross_compiling" = maybe; then
3681 cross_compiling=yes
3682 else
3683 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3685as_fn_error "cannot run C compiled programs.
3686If you meant to cross compile, use \`--host'.
3687See \`config.log' for more details." "$LINENO" 5; }
3688 fi
3689 fi
3690fi
3691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3692$as_echo "$cross_compiling" >&6; }
3693
3694rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3695ac_clean_files=$ac_clean_files_save
3696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3697$as_echo_n "checking for suffix of object files... " >&6; }
3698if test "${ac_cv_objext+set}" = set; then :
3699 $as_echo_n "(cached) " >&6
3700else
3701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003702/* end confdefs.h. */
3703
3704int
3705main ()
3706{
3707
3708 ;
3709 return 0;
3710}
3711_ACEOF
3712rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003713if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003714case "(($ac_try" in
3715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3716 *) ac_try_echo=$ac_try;;
3717esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003718eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3719$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003720 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003721 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003722 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3723 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003724 for ac_file in conftest.o conftest.obj conftest.*; do
3725 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003726 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003728 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3729 break;;
3730 esac
3731done
3732else
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003734sed 's/^/| /' conftest.$ac_ext >&5
3735
Matthias Kloseb9621712010-04-24 17:59:49 +00003736{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3737$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3738as_fn_error "cannot compute suffix of object files: cannot compile
3739See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003740fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003741rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3744$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003745OBJEXT=$ac_cv_objext
3746ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3748$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3749if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3750 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003751else
Matthias Kloseb9621712010-04-24 17:59:49 +00003752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003753/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003754
Martin v. Löwis11437992002-04-12 09:54:03 +00003755int
3756main ()
3757{
3758#ifndef __GNUC__
3759 choke me
3760#endif
3761
3762 ;
3763 return 0;
3764}
3765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003766if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003767 ac_compiler_gnu=yes
3768else
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003772ac_cv_c_compiler_gnu=$ac_compiler_gnu
3773
3774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3776$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3777if test $ac_compiler_gnu = yes; then
3778 GCC=yes
3779else
3780 GCC=
3781fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003782ac_test_CFLAGS=${CFLAGS+set}
3783ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3785$as_echo_n "checking whether $CC accepts -g... " >&6; }
3786if test "${ac_cv_prog_cc_g+set}" = set; then :
3787 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003788else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003789 ac_save_c_werror_flag=$ac_c_werror_flag
3790 ac_c_werror_flag=yes
3791 ac_cv_prog_cc_g=no
3792 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003795
Martin v. Löwis11437992002-04-12 09:54:03 +00003796int
3797main ()
3798{
3799
3800 ;
3801 return 0;
3802}
3803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003804if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003805 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003806else
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 CFLAGS=""
3808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003809/* end confdefs.h. */
3810
3811int
3812main ()
3813{
3814
3815 ;
3816 return 0;
3817}
3818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003819if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003820
Matthias Kloseb9621712010-04-24 17:59:49 +00003821else
3822 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003823 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003825/* end confdefs.h. */
3826
3827int
3828main ()
3829{
3830
3831 ;
3832 return 0;
3833}
3834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003835if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003836 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3843 ac_c_werror_flag=$ac_save_c_werror_flag
3844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3846$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003847if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003848 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003849elif test $ac_cv_prog_cc_g = yes; then
3850 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003851 CFLAGS="-g -O2"
3852 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003853 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003854 fi
3855else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003856 if test "$GCC" = yes; then
3857 CFLAGS="-O2"
3858 else
3859 CFLAGS=
3860 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3863$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3864if test "${ac_cv_prog_cc_c89+set}" = set; then :
3865 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003866else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003867 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003868ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003870/* end confdefs.h. */
3871#include <stdarg.h>
3872#include <stdio.h>
3873#include <sys/types.h>
3874#include <sys/stat.h>
3875/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3876struct buf { int x; };
3877FILE * (*rcsopen) (struct buf *, struct stat *, int);
3878static char *e (p, i)
3879 char **p;
3880 int i;
3881{
3882 return p[i];
3883}
3884static char *f (char * (*g) (char **, int), char **p, ...)
3885{
3886 char *s;
3887 va_list v;
3888 va_start (v,p);
3889 s = g (p, va_arg (v,int));
3890 va_end (v);
3891 return s;
3892}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003893
3894/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3895 function prototypes and stuff, but not '\xHH' hex character constants.
3896 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003897 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003898 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3899 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003900 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003901int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3902
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003903/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3904 inside strings and character constants. */
3905#define FOO(x) 'x'
3906int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3907
Skip Montanaro6dead952003-09-25 14:50:04 +00003908int test (int i, double x);
3909struct s1 {int (*f) (int a);};
3910struct s2 {int (*f) (double a);};
3911int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3912int argc;
3913char **argv;
3914int
3915main ()
3916{
3917return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3918 ;
3919 return 0;
3920}
3921_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3923 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003924do
3925 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003926 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003927 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929rm -f core conftest.err conftest.$ac_objext
3930 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003931done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003932rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003933CC=$ac_save_CC
3934
3935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936# AC_CACHE_VAL
3937case "x$ac_cv_prog_cc_c89" in
3938 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3940$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3943$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003944 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3947$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003948esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003949if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003950
Matthias Kloseb9621712010-04-24 17:59:49 +00003951fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003952
Martin v. Löwis11437992002-04-12 09:54:03 +00003953ac_ext=c
3954ac_cpp='$CPP $CPPFLAGS'
3955ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3956ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3957ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003958
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003959
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003960
3961
Matthias Kloseb9621712010-04-24 17:59:49 +00003962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3963$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003964
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003965# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003966if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003967 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003968
3969 case $withval in
3970 no) with_cxx_main=no
3971 MAINCC='$(CC)';;
3972 yes) with_cxx_main=yes
3973 MAINCC='$(CXX)';;
3974 *) with_cxx_main=yes
3975 MAINCC=$withval
3976 if test -z "$CXX"
3977 then
3978 CXX=$withval
3979 fi;;
3980 esac
3981else
3982
3983 with_cxx_main=no
3984 MAINCC='$(CC)'
3985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003986fi
3987
Matthias Kloseb9621712010-04-24 17:59:49 +00003988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
3989$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003990
3991preset_cxx="$CXX"
3992if test -z "$CXX"
3993then
3994 case "$CC" in
3995 gcc) # Extract the first word of "g++", so it can be a program name with args.
3996set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3998$as_echo_n "checking for $ac_word... " >&6; }
3999if test "${ac_cv_path_CXX+set}" = set; then :
4000 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004001else
4002 case $CXX in
4003 [\\/]* | ?:[\\/]*)
4004 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4005 ;;
4006 *)
4007 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4008for as_dir in notfound
4009do
4010 IFS=$as_save_IFS
4011 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004012 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004013 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 +00004014 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004015 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004016 break 2
4017 fi
4018done
Matthias Kloseb9621712010-04-24 17:59:49 +00004019 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004020IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004021
4022 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4023 ;;
4024esac
4025fi
4026CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004027if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4029$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004030else
Matthias Kloseb9621712010-04-24 17:59:49 +00004031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4032$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004034
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004035 ;;
4036 cc) # Extract the first word of "c++", so it can be a program name with args.
4037set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4039$as_echo_n "checking for $ac_word... " >&6; }
4040if test "${ac_cv_path_CXX+set}" = set; then :
4041 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004042else
4043 case $CXX in
4044 [\\/]* | ?:[\\/]*)
4045 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4046 ;;
4047 *)
4048 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4049for as_dir in notfound
4050do
4051 IFS=$as_save_IFS
4052 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004053 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004054 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 +00004055 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004056 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004057 break 2
4058 fi
4059done
Matthias Kloseb9621712010-04-24 17:59:49 +00004060 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004061IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004062
4063 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4064 ;;
4065esac
4066fi
4067CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004068if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4070$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004071else
Matthias Kloseb9621712010-04-24 17:59:49 +00004072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4073$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004075
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004076 ;;
4077 esac
4078 if test "$CXX" = "notfound"
4079 then
4080 CXX=""
4081 fi
4082fi
4083if test -z "$CXX"
4084then
4085 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4086do
4087 # Extract the first word of "$ac_prog", so it can be a program name with args.
4088set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4090$as_echo_n "checking for $ac_word... " >&6; }
4091if test "${ac_cv_prog_CXX+set}" = set; then :
4092 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004093else
4094 if test -n "$CXX"; then
4095 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4096else
4097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4098for as_dir in $PATH
4099do
4100 IFS=$as_save_IFS
4101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004102 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004103 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 +00004104 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004106 break 2
4107 fi
4108done
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004110IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004111
4112fi
4113fi
4114CXX=$ac_cv_prog_CXX
4115if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4117$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004118else
Matthias Kloseb9621712010-04-24 17:59:49 +00004119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4120$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004121fi
4122
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004123
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004124 test -n "$CXX" && break
4125done
4126test -n "$CXX" || CXX="notfound"
4127
4128 if test "$CXX" = "notfound"
4129 then
4130 CXX=""
4131 fi
4132fi
4133if test "$preset_cxx" != "$CXX"
4134then
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004136
4137 By default, distutils will build C++ extension modules with \"$CXX\".
4138 If this is not intended, then set CXX on the configure command line.
4139 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004140$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004141
4142 By default, distutils will build C++ extension modules with \"$CXX\".
4143 If this is not intended, then set CXX on the configure command line.
4144 " >&2;}
4145fi
4146
4147
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004148# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004149
4150ac_ext=c
4151ac_cpp='$CPP $CPPFLAGS'
4152ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4153ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4154ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4156$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004157# On Suns, sometimes $CPP names a directory.
4158if test -n "$CPP" && test -d "$CPP"; then
4159 CPP=
4160fi
4161if test -z "$CPP"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004162 if test "${ac_cv_prog_CPP+set}" = set; then :
4163 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004164else
Martin v. Löwis11437992002-04-12 09:54:03 +00004165 # Double quotes because CPP needs to be expanded
4166 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4167 do
4168 ac_preproc_ok=false
4169for ac_c_preproc_warn_flag in '' yes
4170do
4171 # Use a header file that comes with gcc, so configuring glibc
4172 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004173 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4174 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004175 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004176 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004178/* end confdefs.h. */
4179#ifdef __STDC__
4180# include <limits.h>
4181#else
4182# include <assert.h>
4183#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004184 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004186if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004187
Matthias Kloseb9621712010-04-24 17:59:49 +00004188else
Martin v. Löwis11437992002-04-12 09:54:03 +00004189 # Broken: fails on valid input.
4190continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004191fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004192rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004193
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004194 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004195 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004198#include <ac_nonexistent.h>
4199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004200if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004201 # Broken: success on invalid input.
4202continue
4203else
Martin v. Löwis11437992002-04-12 09:54:03 +00004204 # Passes both tests.
4205ac_preproc_ok=:
4206break
4207fi
4208rm -f conftest.err conftest.$ac_ext
4209
4210done
4211# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4212rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004213if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004214 break
4215fi
4216
4217 done
4218 ac_cv_prog_CPP=$CPP
4219
4220fi
4221 CPP=$ac_cv_prog_CPP
4222else
4223 ac_cv_prog_CPP=$CPP
4224fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4226$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004227ac_preproc_ok=false
4228for ac_c_preproc_warn_flag in '' yes
4229do
4230 # Use a header file that comes with gcc, so configuring glibc
4231 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004232 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4233 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004234 # On the NeXT, cc -E runs the code through the compiler's parser,
4235 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004237/* end confdefs.h. */
4238#ifdef __STDC__
4239# include <limits.h>
4240#else
4241# include <assert.h>
4242#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004243 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004245if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004246
Matthias Kloseb9621712010-04-24 17:59:49 +00004247else
Martin v. Löwis11437992002-04-12 09:54:03 +00004248 # Broken: fails on valid input.
4249continue
4250fi
4251rm -f conftest.err conftest.$ac_ext
4252
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004253 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004254 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004256/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004257#include <ac_nonexistent.h>
4258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004259if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004260 # Broken: success on invalid input.
4261continue
4262else
Martin v. Löwis11437992002-04-12 09:54:03 +00004263 # Passes both tests.
4264ac_preproc_ok=:
4265break
4266fi
4267rm -f conftest.err conftest.$ac_ext
4268
4269done
4270# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4271rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004272if $ac_preproc_ok; then :
4273
Martin v. Löwis11437992002-04-12 09:54:03 +00004274else
Matthias Kloseb9621712010-04-24 17:59:49 +00004275 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4276$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4277as_fn_error "C preprocessor \"$CPP\" fails sanity check
4278See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004279fi
4280
4281ac_ext=c
4282ac_cpp='$CPP $CPPFLAGS'
4283ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4284ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4285ac_compiler_gnu=$ac_cv_c_compiler_gnu
4286
4287
Matthias Kloseb9621712010-04-24 17:59:49 +00004288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4289$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4290if test "${ac_cv_path_GREP+set}" = set; then :
4291 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004292else
Matthias Kloseb9621712010-04-24 17:59:49 +00004293 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004294 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004295 # Loop through the user's path and test for each of PROGNAME-LIST
4296 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004297for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4298do
4299 IFS=$as_save_IFS
4300 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004301 for ac_prog in grep ggrep; do
4302 for ac_exec_ext in '' $ac_executable_extensions; do
4303 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4304 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4305# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004306 # Check for GNU $ac_path_GREP
4307case `"$ac_path_GREP" --version 2>&1` in
4308*GNU*)
4309 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4310*)
4311 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004312 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313 while :
4314 do
4315 cat "conftest.in" "conftest.in" >"conftest.tmp"
4316 mv "conftest.tmp" "conftest.in"
4317 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004318 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4320 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004321 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4323 # Best one so far, save it but keep looking for a better one
4324 ac_cv_path_GREP="$ac_path_GREP"
4325 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004326 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327 # 10*(2^10) chars as input seems more than enough
4328 test $ac_count -gt 10 && break
4329 done
4330 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4331esac
4332
Matthias Kloseb9621712010-04-24 17:59:49 +00004333 $ac_path_GREP_found && break 3
4334 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004335 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004336 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004338 if test -z "$ac_cv_path_GREP"; then
4339 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4340 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004341else
4342 ac_cv_path_GREP=$GREP
4343fi
4344
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4347$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348 GREP="$ac_cv_path_GREP"
4349
4350
Matthias Kloseb9621712010-04-24 17:59:49 +00004351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4352$as_echo_n "checking for egrep... " >&6; }
4353if test "${ac_cv_path_EGREP+set}" = set; then :
4354 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355else
4356 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4357 then ac_cv_path_EGREP="$GREP -E"
4358 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 # Loop through the user's path and test for each of PROGNAME-LIST
4362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4364do
4365 IFS=$as_save_IFS
4366 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004367 for ac_prog in egrep; do
4368 for ac_exec_ext in '' $ac_executable_extensions; do
4369 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4370 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4371# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004372 # Check for GNU $ac_path_EGREP
4373case `"$ac_path_EGREP" --version 2>&1` in
4374*GNU*)
4375 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4376*)
4377 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004378 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379 while :
4380 do
4381 cat "conftest.in" "conftest.in" >"conftest.tmp"
4382 mv "conftest.tmp" "conftest.in"
4383 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004384 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004385 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4386 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004387 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004388 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4389 # Best one so far, save it but keep looking for a better one
4390 ac_cv_path_EGREP="$ac_path_EGREP"
4391 ac_path_EGREP_max=$ac_count
4392 fi
4393 # 10*(2^10) chars as input seems more than enough
4394 test $ac_count -gt 10 && break
4395 done
4396 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4397esac
4398
Matthias Kloseb9621712010-04-24 17:59:49 +00004399 $ac_path_EGREP_found && break 3
4400 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004401 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004402 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004403IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004404 if test -z "$ac_cv_path_EGREP"; then
4405 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4406 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004407else
4408 ac_cv_path_EGREP=$EGREP
4409fi
4410
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004411 fi
4412fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4414$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004415 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004416
4417
Matthias Kloseb9621712010-04-24 17:59:49 +00004418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4419$as_echo_n "checking for ANSI C header files... " >&6; }
4420if test "${ac_cv_header_stdc+set}" = set; then :
4421 $as_echo_n "(cached) " >&6
4422else
4423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004424/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004425#include <stdlib.h>
4426#include <stdarg.h>
4427#include <string.h>
4428#include <float.h>
4429
4430int
4431main ()
4432{
4433
4434 ;
4435 return 0;
4436}
4437_ACEOF
4438if ac_fn_c_try_compile "$LINENO"; then :
4439 ac_cv_header_stdc=yes
4440else
4441 ac_cv_header_stdc=no
4442fi
4443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4444
4445if test $ac_cv_header_stdc = yes; then
4446 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4448/* end confdefs.h. */
4449#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004450
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004451_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004452if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004453 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004454
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004455else
Matthias Kloseb9621712010-04-24 17:59:49 +00004456 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004457fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004458rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004459
Matthias Kloseb9621712010-04-24 17:59:49 +00004460fi
4461
4462if test $ac_cv_header_stdc = yes; then
4463 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4465/* end confdefs.h. */
4466#include <stdlib.h>
4467
4468_ACEOF
4469if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4470 $EGREP "free" >/dev/null 2>&1; then :
4471
4472else
4473 ac_cv_header_stdc=no
4474fi
4475rm -f conftest*
4476
4477fi
4478
4479if test $ac_cv_header_stdc = yes; then
4480 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4481 if test "$cross_compiling" = yes; then :
4482 :
4483else
4484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4485/* end confdefs.h. */
4486#include <ctype.h>
4487#include <stdlib.h>
4488#if ((' ' & 0x0FF) == 0x020)
4489# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4490# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4491#else
4492# define ISLOWER(c) \
4493 (('a' <= (c) && (c) <= 'i') \
4494 || ('j' <= (c) && (c) <= 'r') \
4495 || ('s' <= (c) && (c) <= 'z'))
4496# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4497#endif
4498
4499#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4500int
4501main ()
4502{
4503 int i;
4504 for (i = 0; i < 256; i++)
4505 if (XOR (islower (i), ISLOWER (i))
4506 || toupper (i) != TOUPPER (i))
4507 return 2;
4508 return 0;
4509}
4510_ACEOF
4511if ac_fn_c_try_run "$LINENO"; then :
4512
4513else
4514 ac_cv_header_stdc=no
4515fi
4516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4517 conftest.$ac_objext conftest.beam conftest.$ac_ext
4518fi
4519
4520fi
4521fi
4522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4523$as_echo "$ac_cv_header_stdc" >&6; }
4524if test $ac_cv_header_stdc = yes; then
4525
4526$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4527
4528fi
4529
4530# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4531for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4532 inttypes.h stdint.h unistd.h
4533do :
4534 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4535ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4536"
4537eval as_val=\$$as_ac_Header
4538 if test "x$as_val" = x""yes; then :
4539 cat >>confdefs.h <<_ACEOF
4540#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4541_ACEOF
4542
4543fi
4544
4545done
4546
4547
4548
4549 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4550if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4551 MINIX=yes
4552else
4553 MINIX=
4554fi
4555
4556
4557 if test "$MINIX" = yes; then
4558
4559$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4560
4561
4562$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4563
4564
4565$as_echo "#define _MINIX 1" >>confdefs.h
4566
4567 fi
4568
4569
4570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4571$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4572if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4573 $as_echo_n "(cached) " >&6
4574else
4575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4576/* end confdefs.h. */
4577
4578# define __EXTENSIONS__ 1
4579 $ac_includes_default
4580int
4581main ()
4582{
4583
4584 ;
4585 return 0;
4586}
4587_ACEOF
4588if ac_fn_c_try_compile "$LINENO"; then :
4589 ac_cv_safe_to_define___extensions__=yes
4590else
4591 ac_cv_safe_to_define___extensions__=no
4592fi
4593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4594fi
4595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4596$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4597 test $ac_cv_safe_to_define___extensions__ = yes &&
4598 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4599
4600 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4601
4602 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4603
4604 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4605
4606 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4607
4608
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004609
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004610# Check for unsupported systems
4611case $ac_sys_system/$ac_sys_release in
4612atheos*|Linux*/1*)
4613 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4614 echo See README for details.
4615 exit 1;;
4616esac
4617
4618
Matthias Kloseb9621712010-04-24 17:59:49 +00004619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4620$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004621
4622# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004623if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004624 withval=$with_suffix;
4625 case $withval in
4626 no) EXEEXT=;;
4627 yes) EXEEXT=.exe;;
4628 *) EXEEXT=$withval;;
4629 esac
4630fi
4631
Matthias Kloseb9621712010-04-24 17:59:49 +00004632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4633$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004634
4635# Test whether we're running on a non-case-sensitive system, in which
4636# case we give a warning if no ext is given
4637
Matthias Kloseb9621712010-04-24 17:59:49 +00004638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4639$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004640if test ! -d CaseSensitiveTestDir; then
4641mkdir CaseSensitiveTestDir
4642fi
4643
4644if test -d casesensitivetestdir
4645then
Matthias Kloseb9621712010-04-24 17:59:49 +00004646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4647$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004648 BUILDEXEEXT=.exe
4649else
Matthias Kloseb9621712010-04-24 17:59:49 +00004650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4651$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004652 BUILDEXEEXT=$EXEEXT
4653fi
4654rmdir CaseSensitiveTestDir
4655
4656case $MACHDEP in
4657bsdos*)
4658 case $CC in
4659 gcc) CC="$CC -D_HAVE_BSDI";;
4660 esac;;
4661esac
4662
4663case $ac_sys_system in
4664hp*|HP*)
4665 case $CC in
4666 cc|*/cc) CC="$CC -Ae";;
4667 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004668esac
4669
4670
4671
Matthias Kloseb9621712010-04-24 17:59:49 +00004672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4673$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004674if test -z "$LIBRARY"
4675then
4676 LIBRARY='libpython$(VERSION).a'
4677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4679$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004680
4681# LDLIBRARY is the name of the library to link against (as opposed to the
4682# name of the library into which to insert object files). BLDLIBRARY is also
4683# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4684# is blank as the main program is not linked directly against LDLIBRARY.
4685# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4686# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4687# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4688# DLLLIBRARY is the shared (i.e., DLL) library.
4689#
4690# RUNSHARED is used to run shared python without installed libraries
4691#
4692# INSTSONAME is the name of the shared library that will be use to install
4693# on the system - some systems like version suffix, others don't
4694
4695
4696
4697
4698
4699
4700LDLIBRARY="$LIBRARY"
4701BLDLIBRARY='$(LDLIBRARY)'
4702INSTSONAME='$(LDLIBRARY)'
4703DLLLIBRARY=''
4704LDLIBRARYDIR=''
4705RUNSHARED=''
4706
4707# LINKCC is the command that links the python executable -- default is $(CC).
4708# If CXX is set, and if it is needed to link a main function that was
4709# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4710# python might then depend on the C++ runtime
4711# This is altered for AIX in order to build the export list before
4712# linking.
4713
Matthias Kloseb9621712010-04-24 17:59:49 +00004714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4715$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004716if test -z "$LINKCC"
4717then
4718 LINKCC='$(PURIFY) $(MAINCC)'
4719 case $ac_sys_system in
4720 AIX*)
4721 exp_extra="\"\""
4722 if test $ac_sys_release -ge 5 -o \
4723 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4724 exp_extra="."
4725 fi
4726 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004727 QNX*)
4728 # qcc must be used because the other compilers do not
4729 # support -N.
4730 LINKCC=qcc;;
4731 esac
4732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4734$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004735
4736# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4737# make sure we default having it set to "no": this is used by
4738# distutils.unixccompiler to know if it should add --enable-new-dtags
4739# to linker command lines, and failing to detect GNU ld simply results
4740# in the same bahaviour as before.
4741
Matthias Kloseb9621712010-04-24 17:59:49 +00004742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4743$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004744ac_prog=ld
4745if test "$GCC" = yes; then
4746 ac_prog=`$CC -print-prog-name=ld`
4747fi
4748case `"$ac_prog" -V 2>&1 < /dev/null` in
4749 *GNU*)
4750 GNULD=yes;;
4751 *)
4752 GNULD=no;;
4753esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4755$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004756
Matthias Kloseb9621712010-04-24 17:59:49 +00004757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4758$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004759# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004760if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004761 enableval=$enable_shared;
4762fi
4763
4764
4765if test -z "$enable_shared"
4766then
4767 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004768 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004769 enable_shared="yes";;
4770 *)
4771 enable_shared="no";;
4772 esac
4773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4775$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004776
Matthias Kloseb9621712010-04-24 17:59:49 +00004777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4778$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004779# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004780if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004781 enableval=$enable_profiling; ac_save_cc="$CC"
4782 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004783 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004784 ac_enable_profiling="no"
4785else
Matthias Kloseb9621712010-04-24 17:59:49 +00004786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004787/* end confdefs.h. */
4788int main() { return 0; }
4789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004790if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004791 ac_enable_profiling="yes"
4792else
Matthias Kloseb9621712010-04-24 17:59:49 +00004793 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004795rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4796 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004797fi
4798
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004799 CC="$ac_save_cc"
4800fi
4801
Matthias Kloseb9621712010-04-24 17:59:49 +00004802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4803$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004804
4805case "$ac_enable_profiling" in
4806 "yes")
4807 BASECFLAGS="-pg $BASECFLAGS"
4808 LDFLAGS="-pg $LDFLAGS"
4809 ;;
4810esac
4811
Matthias Kloseb9621712010-04-24 17:59:49 +00004812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4813$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004814
4815# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4816# library that we build, but we do not want to link against it (we
4817# will find it with a -framework option). For this reason there is an
4818# extra variable BLDLIBRARY against which Python and the extension
4819# modules are linked, BLDLIBRARY. This is normally the same as
4820# LDLIBRARY, but empty for MacOSX framework builds.
4821if test "$enable_framework"
4822then
4823 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4824 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4825 BLDLIBRARY=''
4826else
4827 BLDLIBRARY='$(LDLIBRARY)'
4828fi
4829
4830# Other platforms follow
4831if test $enable_shared = "yes"; then
4832
Matthias Kloseb9621712010-04-24 17:59:49 +00004833$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004834
4835 case $ac_sys_system in
4836 CYGWIN*)
4837 LDLIBRARY='libpython$(VERSION).dll.a'
4838 DLLLIBRARY='libpython$(VERSION).dll'
4839 ;;
4840 SunOS*)
4841 LDLIBRARY='libpython$(VERSION).so'
4842 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4843 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4844 INSTSONAME="$LDLIBRARY".$SOVERSION
4845 ;;
4846 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4847 LDLIBRARY='libpython$(VERSION).so'
4848 BLDLIBRARY='-L. -lpython$(VERSION)'
4849 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4850 case $ac_sys_system in
4851 FreeBSD*)
4852 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4853 ;;
4854 esac
4855 INSTSONAME="$LDLIBRARY".$SOVERSION
4856 ;;
4857 hp*|HP*)
4858 case `uname -m` in
4859 ia64)
4860 LDLIBRARY='libpython$(VERSION).so'
4861 ;;
4862 *)
4863 LDLIBRARY='libpython$(VERSION).sl'
4864 ;;
4865 esac
4866 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4867 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4868 ;;
4869 OSF*)
4870 LDLIBRARY='libpython$(VERSION).so'
4871 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4872 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4873 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004874 Darwin*)
4875 LDLIBRARY='libpython$(VERSION).dylib'
4876 BLDLIBRARY='-L. -lpython$(VERSION)'
4877 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4878 ;;
4879
4880 esac
4881else # shared is disabled
4882 case $ac_sys_system in
4883 CYGWIN*)
4884 BLDLIBRARY='$(LIBRARY)'
4885 LDLIBRARY='libpython$(VERSION).dll.a'
4886 ;;
4887 esac
4888fi
4889
Matthias Kloseb9621712010-04-24 17:59:49 +00004890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4891$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004892
4893if test -n "$ac_tool_prefix"; then
4894 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4895set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4897$as_echo_n "checking for $ac_word... " >&6; }
4898if test "${ac_cv_prog_RANLIB+set}" = set; then :
4899 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004900else
4901 if test -n "$RANLIB"; then
4902 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4903else
4904as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4905for as_dir in $PATH
4906do
4907 IFS=$as_save_IFS
4908 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004909 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004910 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4911 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004912 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004913 break 2
4914 fi
4915done
Matthias Kloseb9621712010-04-24 17:59:49 +00004916 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004917IFS=$as_save_IFS
4918
4919fi
4920fi
4921RANLIB=$ac_cv_prog_RANLIB
4922if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4924$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004925else
Matthias Kloseb9621712010-04-24 17:59:49 +00004926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4927$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928fi
4929
4930
4931fi
4932if test -z "$ac_cv_prog_RANLIB"; then
4933 ac_ct_RANLIB=$RANLIB
4934 # Extract the first word of "ranlib", so it can be a program name with args.
4935set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4937$as_echo_n "checking for $ac_word... " >&6; }
4938if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4939 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004940else
4941 if test -n "$ac_ct_RANLIB"; then
4942 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4943else
4944as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4945for as_dir in $PATH
4946do
4947 IFS=$as_save_IFS
4948 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004949 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004950 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4951 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004952 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004953 break 2
4954 fi
4955done
Matthias Kloseb9621712010-04-24 17:59:49 +00004956 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004957IFS=$as_save_IFS
4958
4959fi
4960fi
4961ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4962if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4964$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004965else
Matthias Kloseb9621712010-04-24 17:59:49 +00004966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4967$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004968fi
4969
4970 if test "x$ac_ct_RANLIB" = x; then
4971 RANLIB=":"
4972 else
4973 case $cross_compiling:$ac_tool_warned in
4974yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00004975{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4976$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004977ac_tool_warned=yes ;;
4978esac
4979 RANLIB=$ac_ct_RANLIB
4980 fi
4981else
4982 RANLIB="$ac_cv_prog_RANLIB"
4983fi
4984
4985
4986for ac_prog in ar aal
4987do
4988 # Extract the first word of "$ac_prog", so it can be a program name with args.
4989set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4991$as_echo_n "checking for $ac_word... " >&6; }
4992if test "${ac_cv_prog_AR+set}" = set; then :
4993 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004994else
4995 if test -n "$AR"; then
4996 ac_cv_prog_AR="$AR" # Let the user override the test.
4997else
4998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4999for as_dir in $PATH
5000do
5001 IFS=$as_save_IFS
5002 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005003 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005004 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5005 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005006 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005007 break 2
5008 fi
5009done
Matthias Kloseb9621712010-04-24 17:59:49 +00005010 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005011IFS=$as_save_IFS
5012
5013fi
5014fi
5015AR=$ac_cv_prog_AR
5016if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5018$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005019else
Matthias Kloseb9621712010-04-24 17:59:49 +00005020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5021$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005022fi
5023
5024
5025 test -n "$AR" && break
5026done
5027test -n "$AR" || AR="ar"
5028
5029
5030# tweak ARFLAGS only if the user didn't set it on the command line
5031
5032if test -z "$ARFLAGS"
5033then
5034 ARFLAGS="rc"
5035fi
5036
5037
5038# Extract the first word of "svnversion", so it can be a program name with args.
5039set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5041$as_echo_n "checking for $ac_word... " >&6; }
5042if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5043 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005044else
5045 if test -n "$SVNVERSION"; then
5046 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5047else
5048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5049for as_dir in $PATH
5050do
5051 IFS=$as_save_IFS
5052 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005053 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005054 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5055 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005056 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005057 break 2
5058 fi
5059done
Matthias Kloseb9621712010-04-24 17:59:49 +00005060 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005061IFS=$as_save_IFS
5062
5063 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5064fi
5065fi
5066SVNVERSION=$ac_cv_prog_SVNVERSION
5067if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5069$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005070else
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5072$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005073fi
5074
5075
5076if test $SVNVERSION = found
5077then
5078 SVNVERSION="svnversion \$(srcdir)"
5079else
5080 SVNVERSION="echo Unversioned directory"
5081fi
5082
5083case $MACHDEP in
5084bsdos*|hp*|HP*)
5085 # install -d does not work on BSDI or HP-UX
5086 if test -z "$INSTALL"
5087 then
5088 INSTALL="${srcdir}/install-sh -c"
5089 fi
5090esac
5091ac_aux_dir=
5092for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 for ac_t in install-sh install.sh shtool; do
5094 if test -f "$ac_dir/$ac_t"; then
5095 ac_aux_dir=$ac_dir
5096 ac_install_sh="$ac_aux_dir/$ac_t -c"
5097 break 2
5098 fi
5099 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005100done
5101if test -z "$ac_aux_dir"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005102 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005103fi
5104
5105# These three variables are undocumented and unsupported,
5106# and are intended to be withdrawn in a future Autoconf release.
5107# They can cause serious problems if a builder's source tree is in a directory
5108# whose full name contains unusual characters.
5109ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5110ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5111ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5112
5113
5114# Find a good install program. We prefer a C program (faster),
5115# so one script is as good as another. But avoid the broken or
5116# incompatible versions:
5117# SysV /etc/install, /usr/sbin/install
5118# SunOS /usr/etc/install
5119# IRIX /sbin/install
5120# AIX /bin/install
5121# AmigaOS /C/install, which installs bootblocks on floppy discs
5122# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5123# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5124# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5125# OS/2's system install, which has a completely different semantic
5126# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005127# Reject install programs that cannot install multiple files.
5128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5129$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005130if test -z "$INSTALL"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005131if test "${ac_cv_path_install+set}" = set; then :
5132 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005133else
5134 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5135for as_dir in $PATH
5136do
5137 IFS=$as_save_IFS
5138 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005139 # Account for people who put trailing slashes in PATH elements.
5140case $as_dir/ in #((
5141 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005142 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005143 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005144 /usr/ucb/* ) ;;
5145 *)
5146 # OSF1 and SCO ODT 3.0 have their own names for install.
5147 # Don't use installbsd from OSF since it installs stuff as root
5148 # by default.
5149 for ac_prog in ginstall scoinst install; do
5150 for ac_exec_ext in '' $ac_executable_extensions; do
5151 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5152 if test $ac_prog = install &&
5153 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5154 # AIX install. It has an incompatible calling convention.
5155 :
5156 elif test $ac_prog = install &&
5157 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5158 # program-specific install script used by HP pwplus--don't use.
5159 :
5160 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005161 rm -rf conftest.one conftest.two conftest.dir
5162 echo one > conftest.one
5163 echo two > conftest.two
5164 mkdir conftest.dir
5165 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5166 test -s conftest.one && test -s conftest.two &&
5167 test -s conftest.dir/conftest.one &&
5168 test -s conftest.dir/conftest.two
5169 then
5170 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5171 break 3
5172 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005173 fi
5174 fi
5175 done
5176 done
5177 ;;
5178esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005179
5180 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005181IFS=$as_save_IFS
5182
Matthias Kloseb9621712010-04-24 17:59:49 +00005183rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005184
5185fi
5186 if test "${ac_cv_path_install+set}" = set; then
5187 INSTALL=$ac_cv_path_install
5188 else
5189 # As a last resort, use the slow shell script. Don't cache a
5190 # value for INSTALL within a source directory, because that will
5191 # break other packages using the cache if that directory is
5192 # removed, or if the value is a relative name.
5193 INSTALL=$ac_install_sh
5194 fi
5195fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5197$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005198
5199# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5200# It thinks the first close brace ends the variable substitution.
5201test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5202
5203test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5204
5205test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5206
5207
5208# Not every filesystem supports hard links
5209
5210if test -z "$LN" ; then
5211 case $ac_sys_system in
5212 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005213 *) LN=ln;;
5214 esac
5215fi
5216
5217# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5219$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005220
5221# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005222if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005223 withval=$with_pydebug;
5224if test "$withval" != no
5225then
5226
Matthias Kloseb9621712010-04-24 17:59:49 +00005227$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005228
Matthias Kloseb9621712010-04-24 17:59:49 +00005229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5230$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005231 Py_DEBUG='true'
Matthias Kloseb9621712010-04-24 17:59:49 +00005232else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5233$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005234fi
5235else
Matthias Kloseb9621712010-04-24 17:59:49 +00005236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5237$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005238fi
5239
5240
5241# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5242# merged with this chunk of code?
5243
5244# Optimizer/debugger flags
5245# ------------------------
5246# (The following bit of code is complicated enough - please keep things
5247# indented properly. Just pretend you're editing Python code. ;-)
5248
5249# There are two parallel sets of case statements below, one that checks to
5250# see if OPT was set and one that does BASECFLAGS setting based upon
5251# compiler and platform. BASECFLAGS tweaks need to be made even if the
5252# user set OPT.
5253
5254# tweak OPT based on compiler and platform, only if the user didn't set
5255# it on the command line
5256
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005257if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005258then
5259 case $GCC in
5260 yes)
5261 if test "$CC" != 'g++' ; then
5262 STRICT_PROTO="-Wstrict-prototypes"
5263 fi
5264 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5265 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5266 WRAP="-fwrapv"
5267 fi
5268 case $ac_cv_prog_cc_g in
5269 yes)
5270 if test "$Py_DEBUG" = 'true' ; then
5271 # Optimization messes up debuggers, so turn it off for
5272 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005273 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005274 else
5275 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5276 fi
5277 ;;
5278 *)
5279 OPT="-O3 -Wall $STRICT_PROTO"
5280 ;;
5281 esac
5282 case $ac_sys_system in
5283 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5284 ;;
5285 esac
5286 ;;
5287
5288 *)
5289 OPT="-O"
5290 ;;
5291 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005292fi
5293
5294
5295
5296# The -arch flags for universal builds on OSX
5297UNIVERSAL_ARCH_FLAGS=
5298
5299
5300# tweak BASECFLAGS based on compiler and platform
5301case $GCC in
5302yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005303 # Python doesn't violate C99 aliasing rules, but older versions of
5304 # GCC produce warnings for legal Python code. Enable
5305 # -fno-strict-aliasing on versions of GCC that support but produce
5306 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5308$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005309 ac_save_cc="$CC"
5310 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005311 save_CFLAGS="$CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +00005312 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
5313 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005314else
Matthias Kloseb9621712010-04-24 17:59:49 +00005315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005316/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005317
Matthias Kloseb159a552010-04-25 21:00:44 +00005318
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005319int
5320main ()
5321{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005322
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005323 ;
5324 return 0;
5325}
Matthias Kloseb159a552010-04-25 21:00:44 +00005326
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005328if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005329
5330 CC="$ac_save_cc -fstrict-aliasing"
5331 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005333/* end confdefs.h. */
5334
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005335 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005336int
5337main ()
5338{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005339double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005340 ;
5341 return 0;
5342}
Matthias Kloseb159a552010-04-25 21:00:44 +00005343
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005345if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005346
5347 ac_cv_no_strict_aliasing=no
5348
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005349else
Matthias Kloseb159a552010-04-25 21:00:44 +00005350
5351 ac_cv_no_strict_aliasing=yes
5352
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005353fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005355
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005356else
Matthias Kloseb159a552010-04-25 21:00:44 +00005357
5358 ac_cv_no_strict_aliasing=no
5359
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005360fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005362fi
5363
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005364 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005365 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5367$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005368 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005369 then
5370 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5371 fi
5372
5373 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5374 # support. Without this, treatment of subnormals doesn't follow
5375 # the standard.
5376 case $ac_sys_machine in
5377 alpha*)
5378 BASECFLAGS="$BASECFLAGS -mieee"
5379 ;;
5380 esac
5381
5382 case $ac_sys_system in
5383 SCO_SV*)
5384 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5385 ;;
5386 # is there any other compiler on Darwin besides gcc?
5387 Darwin*)
5388 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5389 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005390 if test "${CC}" = gcc
5391 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5393$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005394 case "${UNIVERSALSDK}" in
5395 */MacOSX10.4u.sdk)
5396 # Build using 10.4 SDK, force usage of gcc when the
5397 # compiler is gcc, otherwise the user will get very
5398 # confusing error messages when building on OSX 10.6
5399 CC=gcc-4.0
5400 CPP=cpp-4.0
5401 ;;
5402 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5404$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005405 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005406
5407
5408 if test "${enable_universalsdk}"; then
5409 UNIVERSAL_ARCH_FLAGS=""
5410 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5411 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5412 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005413 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005414 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5415 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005416 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005417 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418
5419 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5420 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005421 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005422 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005423
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005424 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5425 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005426 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005427 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005428
5429 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5430 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005431 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005432 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005433
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005434 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005435 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 +00005436
5437 fi
5438
5439
Ronald Oussoren666028b2010-04-18 19:07:43 +00005440 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5441 if test "${UNIVERSALSDK}" != "/"
5442 then
5443 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5444 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005445 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005446 fi
5447 fi
5448
5449 # Calculate the right deployment target for this build.
5450 #
5451 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5452 if test ${cur_target} '>' 10.2; then
5453 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005454 if test ${enable_universalsdk}; then
5455 if test "${UNIVERSAL_ARCHS}" = "all"; then
5456 # Ensure that the default platform for a
5457 # 4-way universal build is OSX 10.5,
5458 # that's the first OS release where
5459 # 4-way builds make sense.
5460 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005461
5462 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5463 cur_target='10.5'
5464
5465 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5466 cur_target='10.5'
5467
5468 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5469 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005470 fi
5471 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005472 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005473 # On Intel macs default to a deployment
5474 # target of 10.4, that's the first OSX
5475 # release with Intel support.
5476 cur_target="10.4"
5477 fi
5478 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005479 fi
5480 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5481
5482 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5483 # environment with a value that is the same as what we'll use
5484 # in the Makefile to ensure that we'll get the same compiler
5485 # environment during configure and build time.
5486 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5487 export MACOSX_DEPLOYMENT_TARGET
5488 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5489
5490 ;;
5491 OSF*)
5492 BASECFLAGS="$BASECFLAGS -mieee"
5493 ;;
5494 esac
5495 ;;
5496
5497*)
5498 case $ac_sys_system in
5499 OpenUNIX*|UnixWare*)
5500 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5501 ;;
5502 OSF*)
5503 BASECFLAGS="$BASECFLAGS -ieee -std"
5504 ;;
5505 SCO_SV*)
5506 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5507 ;;
5508 esac
5509 ;;
5510esac
5511
5512if test "$Py_DEBUG" = 'true'; then
5513 :
5514else
5515 OPT="-DNDEBUG $OPT"
5516fi
5517
5518if test "$ac_arch_flags"
5519then
5520 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5521fi
5522
5523# disable check for icc since it seems to pass, but generates a warning
5524if test "$CC" = icc
5525then
5526 ac_cv_opt_olimit_ok=no
5527fi
5528
Matthias Kloseb9621712010-04-24 17:59:49 +00005529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5530$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5531if test "${ac_cv_opt_olimit_ok+set}" = set; then :
5532 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005533else
5534 ac_save_cc="$CC"
5535CC="$CC -OPT:Olimit=0"
Matthias Kloseb9621712010-04-24 17:59:49 +00005536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005537/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005538
5539int
5540main ()
5541{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005542
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005543 ;
5544 return 0;
5545}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005547if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005548 ac_cv_opt_olimit_ok=yes
5549else
Matthias Kloseb9621712010-04-24 17:59:49 +00005550 ac_cv_opt_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005551
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005552fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005554CC="$ac_save_cc"
5555fi
5556
Matthias Kloseb9621712010-04-24 17:59:49 +00005557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5558$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005559if test $ac_cv_opt_olimit_ok = yes; then
5560 case $ac_sys_system in
5561 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5562 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5563 # environment?
5564 Darwin*)
5565 ;;
5566 *)
5567 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5568 ;;
5569 esac
5570else
Matthias Kloseb9621712010-04-24 17:59:49 +00005571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5572$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5573 if test "${ac_cv_olimit_ok+set}" = set; then :
5574 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005575else
5576 ac_save_cc="$CC"
5577 CC="$CC -Olimit 1500"
Matthias Kloseb9621712010-04-24 17:59:49 +00005578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005579/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005580
5581int
5582main ()
5583{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005584
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005585 ;
5586 return 0;
5587}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005589if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590 ac_cv_olimit_ok=yes
5591else
Matthias Kloseb9621712010-04-24 17:59:49 +00005592 ac_cv_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005593
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005594fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005596 CC="$ac_save_cc"
5597fi
5598
Matthias Kloseb9621712010-04-24 17:59:49 +00005599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5600$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601 if test $ac_cv_olimit_ok = yes; then
5602 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5603 fi
5604fi
5605
5606# Check whether GCC supports PyArg_ParseTuple format
5607if test "$GCC" = "yes"
5608then
Matthias Kloseb9621712010-04-24 17:59:49 +00005609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5610$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611 save_CFLAGS=$CFLAGS
5612 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005614/* end confdefs.h. */
5615
5616 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005617int
5618main ()
5619{
5620
5621 ;
5622 return 0;
5623}
Matthias Kloseb159a552010-04-25 21:00:44 +00005624
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005626if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627
Matthias Kloseb159a552010-04-25 21:00:44 +00005628
Matthias Kloseb9621712010-04-24 17:59:49 +00005629$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630
Matthias Kloseb159a552010-04-25 21:00:44 +00005631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005632$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005633
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005634else
Matthias Kloseb159a552010-04-25 21:00:44 +00005635
5636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005637$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638
5639fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5641 CFLAGS=$save_CFLAGS
5642fi
5643
5644# On some compilers, pthreads are available without further options
5645# (e.g. MacOS X). On some of these systems, the compiler will not
5646# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5647# So we have to see first whether pthreads are available without
5648# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5650$as_echo_n "checking whether pthreads are available without options... " >&6; }
5651if test "${ac_cv_pthread_is_default+set}" = set; then :
5652 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653else
Matthias Kloseb9621712010-04-24 17:59:49 +00005654 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655 ac_cv_pthread_is_default=no
5656else
Matthias Kloseb9621712010-04-24 17:59:49 +00005657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658/* end confdefs.h. */
5659
5660#include <pthread.h>
5661
5662void* routine(void* p){return NULL;}
5663
5664int main(){
5665 pthread_t p;
5666 if(pthread_create(&p,NULL,routine,NULL)!=0)
5667 return 1;
5668 (void)pthread_detach(p);
5669 return 0;
5670}
5671
5672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005673if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674
5675 ac_cv_pthread_is_default=yes
5676 ac_cv_kthread=no
5677 ac_cv_pthread=no
5678
5679else
Matthias Kloseb9621712010-04-24 17:59:49 +00005680 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005682rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5683 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684fi
5685
5686
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687fi
5688
Matthias Kloseb9621712010-04-24 17:59:49 +00005689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5690$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691
5692
5693if test $ac_cv_pthread_is_default = yes
5694then
5695 ac_cv_kpthread=no
5696else
5697# -Kpthread, if available, provides the right #defines
5698# and linker options to make pthread_create available
5699# Some compilers won't report that they do not support -Kpthread,
5700# so we need to run a program to see whether it really made the
5701# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5703$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5704if test "${ac_cv_kpthread+set}" = set; then :
5705 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706else
5707 ac_save_cc="$CC"
5708CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005709if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710 ac_cv_kpthread=no
5711else
Matthias Kloseb9621712010-04-24 17:59:49 +00005712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713/* end confdefs.h. */
5714
5715#include <pthread.h>
5716
5717void* routine(void* p){return NULL;}
5718
5719int main(){
5720 pthread_t p;
5721 if(pthread_create(&p,NULL,routine,NULL)!=0)
5722 return 1;
5723 (void)pthread_detach(p);
5724 return 0;
5725}
5726
5727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005728if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729 ac_cv_kpthread=yes
5730else
Matthias Kloseb9621712010-04-24 17:59:49 +00005731 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5734 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735fi
5736
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005737CC="$ac_save_cc"
5738fi
5739
Matthias Kloseb9621712010-04-24 17:59:49 +00005740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5741$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742fi
5743
5744if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5745then
5746# -Kthread, if available, provides the right #defines
5747# and linker options to make pthread_create available
5748# Some compilers won't report that they do not support -Kthread,
5749# so we need to run a program to see whether it really made the
5750# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5752$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5753if test "${ac_cv_kthread+set}" = set; then :
5754 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755else
5756 ac_save_cc="$CC"
5757CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005758if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759 ac_cv_kthread=no
5760else
Matthias Kloseb9621712010-04-24 17:59:49 +00005761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762/* end confdefs.h. */
5763
5764#include <pthread.h>
5765
5766void* routine(void* p){return NULL;}
5767
5768int main(){
5769 pthread_t p;
5770 if(pthread_create(&p,NULL,routine,NULL)!=0)
5771 return 1;
5772 (void)pthread_detach(p);
5773 return 0;
5774}
5775
5776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005777if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778 ac_cv_kthread=yes
5779else
Matthias Kloseb9621712010-04-24 17:59:49 +00005780 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5783 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784fi
5785
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786CC="$ac_save_cc"
5787fi
5788
Matthias Kloseb9621712010-04-24 17:59:49 +00005789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5790$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791fi
5792
5793if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5794then
5795# -pthread, if available, provides the right #defines
5796# and linker options to make pthread_create available
5797# Some compilers won't report that they do not support -pthread,
5798# so we need to run a program to see whether it really made the
5799# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5801$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5802if test "${ac_cv_thread+set}" = set; then :
5803 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804else
5805 ac_save_cc="$CC"
5806CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005807if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808 ac_cv_pthread=no
5809else
Matthias Kloseb9621712010-04-24 17:59:49 +00005810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811/* end confdefs.h. */
5812
5813#include <pthread.h>
5814
5815void* routine(void* p){return NULL;}
5816
5817int main(){
5818 pthread_t p;
5819 if(pthread_create(&p,NULL,routine,NULL)!=0)
5820 return 1;
5821 (void)pthread_detach(p);
5822 return 0;
5823}
5824
5825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005826if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827 ac_cv_pthread=yes
5828else
Matthias Kloseb9621712010-04-24 17:59:49 +00005829 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005831rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5832 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833fi
5834
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835CC="$ac_save_cc"
5836fi
5837
Matthias Kloseb9621712010-04-24 17:59:49 +00005838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5839$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840fi
5841
5842# If we have set a CC compiler flag for thread support then
5843# check if it works for CXX, too.
5844ac_cv_cxx_thread=no
5845if test ! -z "$CXX"
5846then
Matthias Kloseb9621712010-04-24 17:59:49 +00005847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5848$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849ac_save_cxx="$CXX"
5850
5851if test "$ac_cv_kpthread" = "yes"
5852then
5853 CXX="$CXX -Kpthread"
5854 ac_cv_cxx_thread=yes
5855elif test "$ac_cv_kthread" = "yes"
5856then
5857 CXX="$CXX -Kthread"
5858 ac_cv_cxx_thread=yes
5859elif test "$ac_cv_pthread" = "yes"
5860then
5861 CXX="$CXX -pthread"
5862 ac_cv_cxx_thread=yes
5863fi
5864
5865if test $ac_cv_cxx_thread = yes
5866then
5867 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5868 $CXX -c conftest.$ac_ext 2>&5
5869 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5870 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5871 then
5872 ac_cv_cxx_thread=yes
5873 else
5874 ac_cv_cxx_thread=no
5875 fi
5876 rm -fr conftest*
5877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5879$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880fi
5881CXX="$ac_save_cxx"
5882
5883
5884# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5886$as_echo_n "checking for ANSI C header files... " >&6; }
5887if test "${ac_cv_header_stdc+set}" = set; then :
5888 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889else
Matthias Kloseb9621712010-04-24 17:59:49 +00005890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891/* end confdefs.h. */
5892#include <stdlib.h>
5893#include <stdarg.h>
5894#include <string.h>
5895#include <float.h>
5896
5897int
5898main ()
5899{
5900
5901 ;
5902 return 0;
5903}
5904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005905if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906 ac_cv_header_stdc=yes
5907else
Matthias Kloseb9621712010-04-24 17:59:49 +00005908 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5911
5912if test $ac_cv_header_stdc = yes; then
5913 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915/* end confdefs.h. */
5916#include <string.h>
5917
5918_ACEOF
5919if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005920 $EGREP "memchr" >/dev/null 2>&1; then :
5921
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922else
5923 ac_cv_header_stdc=no
5924fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005925rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926
5927fi
5928
5929if test $ac_cv_header_stdc = yes; then
5930 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932/* end confdefs.h. */
5933#include <stdlib.h>
5934
5935_ACEOF
5936if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005937 $EGREP "free" >/dev/null 2>&1; then :
5938
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939else
5940 ac_cv_header_stdc=no
5941fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005942rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943
5944fi
5945
5946if test $ac_cv_header_stdc = yes; then
5947 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005948 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949 :
5950else
Matthias Kloseb9621712010-04-24 17:59:49 +00005951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952/* end confdefs.h. */
5953#include <ctype.h>
5954#include <stdlib.h>
5955#if ((' ' & 0x0FF) == 0x020)
5956# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5957# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5958#else
5959# define ISLOWER(c) \
5960 (('a' <= (c) && (c) <= 'i') \
5961 || ('j' <= (c) && (c) <= 'r') \
5962 || ('s' <= (c) && (c) <= 'z'))
5963# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5964#endif
5965
5966#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5967int
5968main ()
5969{
5970 int i;
5971 for (i = 0; i < 256; i++)
5972 if (XOR (islower (i), ISLOWER (i))
5973 || toupper (i) != TOUPPER (i))
5974 return 2;
5975 return 0;
5976}
5977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005978if ac_fn_c_try_run "$LINENO"; then :
5979
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980else
Matthias Kloseb9621712010-04-24 17:59:49 +00005981 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005983rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5984 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985fi
5986
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987fi
5988fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5990$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991if test $ac_cv_header_stdc = yes; then
5992
Matthias Kloseb9621712010-04-24 17:59:49 +00005993$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994
5995fi
5996
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005997for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5998fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005999ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006000shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006001unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006002sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6003sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006004sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006005sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006006sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00006007sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006008bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006009do :
6010 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6011ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6012eval as_val=\$$as_ac_Header
6013 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006014 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006015#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006016_ACEOF
6017
6018fi
6019
Guido van Rossum627b2d71993-12-24 10:39:16 +00006020done
6021
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006022ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006023for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006024 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6026$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
6027if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
6028 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006029else
Matthias Kloseb9621712010-04-24 17:59:49 +00006030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006031/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006032#include <sys/types.h>
6033#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006034
Martin v. Löwis11437992002-04-12 09:54:03 +00006035int
6036main ()
6037{
6038if ((DIR *) 0)
6039return 0;
6040 ;
6041 return 0;
6042}
6043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006044if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006045 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006046else
Matthias Kloseb9621712010-04-24 17:59:49 +00006047 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006050fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006051eval ac_res=\$$as_ac_Header
6052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6053$as_echo "$ac_res" >&6; }
6054eval as_val=\$$as_ac_Header
6055 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006056 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006057#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006058_ACEOF
6059
6060ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006061fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006062
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006063done
6064# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6065if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6067$as_echo_n "checking for library containing opendir... " >&6; }
6068if test "${ac_cv_search_opendir+set}" = set; then :
6069 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006070else
Martin v. Löwis11437992002-04-12 09:54:03 +00006071 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006073/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006074
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006075/* Override any GCC internal prototype to avoid an error.
6076 Use char because int might match the return type of a GCC
6077 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006078#ifdef __cplusplus
6079extern "C"
6080#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006081char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006082int
6083main ()
6084{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006085return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006086 ;
6087 return 0;
6088}
6089_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006090for ac_lib in '' dir; do
6091 if test -z "$ac_lib"; then
6092 ac_res="none required"
6093 else
6094 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006095 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006096 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006097 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006098 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006099fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006100rm -f core conftest.err conftest.$ac_objext \
6101 conftest$ac_exeext
6102 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006103 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006105done
Matthias Kloseb9621712010-04-24 17:59:49 +00006106if test "${ac_cv_search_opendir+set}" = set; then :
6107
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006108else
6109 ac_cv_search_opendir=no
6110fi
6111rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006112LIBS=$ac_func_search_save_LIBS
6113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6115$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006116ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006117if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006118 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006119
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006120fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006121
Michael W. Hudson54241132001-12-07 15:38:26 +00006122else
Matthias Kloseb9621712010-04-24 17:59:49 +00006123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6124$as_echo_n "checking for library containing opendir... " >&6; }
6125if test "${ac_cv_search_opendir+set}" = set; then :
6126 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006127else
6128 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006131
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006132/* Override any GCC internal prototype to avoid an error.
6133 Use char because int might match the return type of a GCC
6134 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006135#ifdef __cplusplus
6136extern "C"
6137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006138char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006139int
6140main ()
6141{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006142return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006143 ;
6144 return 0;
6145}
6146_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006147for ac_lib in '' x; do
6148 if test -z "$ac_lib"; then
6149 ac_res="none required"
6150 else
6151 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006152 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006153 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006154 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006155 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006156fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006157rm -f core conftest.err conftest.$ac_objext \
6158 conftest$ac_exeext
6159 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006160 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006162done
Matthias Kloseb9621712010-04-24 17:59:49 +00006163if test "${ac_cv_search_opendir+set}" = set; then :
6164
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006165else
6166 ac_cv_search_opendir=no
6167fi
6168rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006169LIBS=$ac_func_search_save_LIBS
6170fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6172$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006173ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006174if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006175 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006176
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006177fi
6178
6179fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006180
Matthias Kloseb9621712010-04-24 17:59:49 +00006181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6182$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6183if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6184 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006185else
Matthias Kloseb9621712010-04-24 17:59:49 +00006186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006187/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006188#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006189int
6190main ()
6191{
6192return makedev(0, 0);
6193 ;
6194 return 0;
6195}
6196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006197if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006198 ac_cv_header_sys_types_h_makedev=yes
6199else
Matthias Kloseb9621712010-04-24 17:59:49 +00006200 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006201fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006202rm -f core conftest.err conftest.$ac_objext \
6203 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006204
6205fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6207$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006208
6209if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006210ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6211if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006212
Matthias Kloseb9621712010-04-24 17:59:49 +00006213$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006214
6215fi
6216
6217
6218
6219 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006220 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6221if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006222
Matthias Kloseb9621712010-04-24 17:59:49 +00006223$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006224
6225fi
6226
6227
6228 fi
6229fi
6230
Michael W. Hudson54241132001-12-07 15:38:26 +00006231
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006232# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006233for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006234do :
6235 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006236#ifdef HAVE_CURSES_H
6237#include <curses.h>
6238#endif
6239
Matthias Kloseb9621712010-04-24 17:59:49 +00006240"
6241if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006242 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006243#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006244_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006245
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006246fi
6247
6248done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006249
6250
Martin v. Löwis11017b12006-01-14 18:12:57 +00006251# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006252for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006253do :
6254 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 +00006255#ifdef HAVE_ASM_TYPES_H
6256#include <asm/types.h>
6257#endif
6258#ifdef HAVE_SYS_SOCKET_H
6259#include <sys/socket.h>
6260#endif
6261
Matthias Kloseb9621712010-04-24 17:59:49 +00006262"
6263if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006264 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006265#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006266_ACEOF
6267
6268fi
6269
6270done
6271
6272
Guido van Rossum627b2d71993-12-24 10:39:16 +00006273# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006274was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6276$as_echo_n "checking for clock_t in time.h... " >&6; }
6277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006278/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006279#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006280
6281_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006282if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006283 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006284 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006285else
Martin v. Löwis11437992002-04-12 09:54:03 +00006286
6287
Matthias Kloseb9621712010-04-24 17:59:49 +00006288$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006289
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006290
Guido van Rossum627b2d71993-12-24 10:39:16 +00006291fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006292rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006293
Matthias Kloseb9621712010-04-24 17:59:49 +00006294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6295$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006296
Neal Norwitz11690112002-07-30 01:08:28 +00006297# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6299$as_echo_n "checking for makedev... " >&6; }
6300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006301/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006302
Jesus Cea740f53a2010-04-28 11:35:30 +00006303#if defined(MAJOR_IN_MKDEV)
6304#include <sys/mkdev.h>
6305#elif defined(MAJOR_IN_SYSMACROS)
6306#include <sys/sysmacros.h>
6307#else
6308#include <sys/types.h>
6309#endif
6310
Neal Norwitz11690112002-07-30 01:08:28 +00006311int
6312main ()
6313{
Jesus Cea740f53a2010-04-28 11:35:30 +00006314
6315 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006316 ;
6317 return 0;
6318}
Matthias Kloseb159a552010-04-25 21:00:44 +00006319
Neal Norwitz11690112002-07-30 01:08:28 +00006320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006321if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006322 ac_cv_has_makedev=yes
6323else
Matthias Kloseb9621712010-04-24 17:59:49 +00006324 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006326rm -f core conftest.err conftest.$ac_objext \
6327 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006328if test "$ac_cv_has_makedev" = "no"; then
6329 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006331/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006332
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006333#define _OSF_SOURCE 1
6334#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006335
Neal Norwitz11690112002-07-30 01:08:28 +00006336int
6337main ()
6338{
6339 makedev(0, 0)
6340 ;
6341 return 0;
6342}
6343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006344if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006345 ac_cv_has_makedev=yes
6346else
Matthias Kloseb9621712010-04-24 17:59:49 +00006347 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006349rm -f core conftest.err conftest.$ac_objext \
6350 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006351 if test "$ac_cv_has_makedev" = "yes"; then
6352
Matthias Kloseb9621712010-04-24 17:59:49 +00006353$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006354
6355 fi
6356fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6358$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006359if test "$ac_cv_has_makedev" = "yes"; then
6360
Matthias Kloseb9621712010-04-24 17:59:49 +00006361$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006362
6363fi
6364
Martin v. Löwis399a6892002-10-04 10:22:02 +00006365# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6366# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6367# defined, but the compiler does not support pragma redefine_extname,
6368# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6369# structures (such as rlimit64) without declaring them. As a
6370# work-around, disable LFS on such configurations
6371
6372use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6374$as_echo_n "checking Solaris LFS bug... " >&6; }
6375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006376/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006377
6378#define _LARGEFILE_SOURCE 1
6379#define _FILE_OFFSET_BITS 64
6380#include <sys/resource.h>
6381
Martin v. Löwis399a6892002-10-04 10:22:02 +00006382int
6383main ()
6384{
6385struct rlimit foo;
6386 ;
6387 return 0;
6388}
6389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006390if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006391 sol_lfs_bug=no
6392else
Matthias Kloseb9621712010-04-24 17:59:49 +00006393 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6397$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006398if test "$sol_lfs_bug" = "yes"; then
6399 use_lfs=no
6400fi
6401
6402if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006403# Two defines needed to enable largefile support on various platforms
6404# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006405
Matthias Kloseb9621712010-04-24 17:59:49 +00006406$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006407
6408
Matthias Kloseb9621712010-04-24 17:59:49 +00006409$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006410
Martin v. Löwis399a6892002-10-04 10:22:02 +00006411fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006412
Guido van Rossum84e7b241996-08-19 21:59:00 +00006413# Add some code to confdefs.h so that the test for off_t works on SCO
6414cat >> confdefs.h <<\EOF
6415#if defined(SCO_DS)
6416#undef _OFF_T
6417#endif
6418EOF
6419
Guido van Rossumef2255b2000-03-10 22:30:29 +00006420# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006421ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6422if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006423
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006424else
Martin v. Löwis11437992002-04-12 09:54:03 +00006425
6426cat >>confdefs.h <<_ACEOF
6427#define mode_t int
6428_ACEOF
6429
6430fi
6431
Matthias Kloseb9621712010-04-24 17:59:49 +00006432ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6433if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006434
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006435else
Martin v. Löwis11437992002-04-12 09:54:03 +00006436
6437cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006438#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006439_ACEOF
6440
6441fi
6442
Matthias Kloseb9621712010-04-24 17:59:49 +00006443ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6444if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006445
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006446else
Martin v. Löwis11437992002-04-12 09:54:03 +00006447
6448cat >>confdefs.h <<_ACEOF
6449#define pid_t int
6450_ACEOF
6451
6452fi
6453
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006454
Martin v. Löwis11437992002-04-12 09:54:03 +00006455cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006456#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006457_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006458
Matthias Kloseb9621712010-04-24 17:59:49 +00006459ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6460if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006461
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006462else
Martin v. Löwis11437992002-04-12 09:54:03 +00006463
6464cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006465#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006466_ACEOF
6467
6468fi
6469
Matthias Kloseb9621712010-04-24 17:59:49 +00006470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6471$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6472if test "${ac_cv_type_uid_t+set}" = set; then :
6473 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006474else
Matthias Kloseb9621712010-04-24 17:59:49 +00006475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006476/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006477#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006478
6479_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006480if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006481 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006482 ac_cv_type_uid_t=yes
6483else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006484 ac_cv_type_uid_t=no
6485fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006486rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006487
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6490$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006491if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006492
Matthias Kloseb9621712010-04-24 17:59:49 +00006493$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006494
6495
Matthias Kloseb9621712010-04-24 17:59:49 +00006496$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006497
6498fi
6499
Matthias Kloseb9621712010-04-24 17:59:49 +00006500ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6501case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006502 no|yes) ;; #(
6503 *)
6504
Matthias Kloseb9621712010-04-24 17:59:49 +00006505$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006506
6507
6508cat >>confdefs.h <<_ACEOF
6509#define uint32_t $ac_cv_c_uint32_t
6510_ACEOF
6511;;
6512 esac
6513
Matthias Kloseb9621712010-04-24 17:59:49 +00006514ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6515case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006516 no|yes) ;; #(
6517 *)
6518
Matthias Kloseb9621712010-04-24 17:59:49 +00006519$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006520
6521
6522cat >>confdefs.h <<_ACEOF
6523#define uint64_t $ac_cv_c_uint64_t
6524_ACEOF
6525;;
6526 esac
6527
Matthias Kloseb9621712010-04-24 17:59:49 +00006528ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6529case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006530 no|yes) ;; #(
6531 *)
6532
6533cat >>confdefs.h <<_ACEOF
6534#define int32_t $ac_cv_c_int32_t
6535_ACEOF
6536;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006537esac
6538
Matthias Kloseb9621712010-04-24 17:59:49 +00006539ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6540case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006541 no|yes) ;; #(
6542 *)
6543
6544cat >>confdefs.h <<_ACEOF
6545#define int64_t $ac_cv_c_int64_t
6546_ACEOF
6547;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006548esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006549
Matthias Kloseb9621712010-04-24 17:59:49 +00006550ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6551if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006552
Matthias Kloseb9621712010-04-24 17:59:49 +00006553$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006554
6555fi
6556
Jack Jansendd19cf82001-12-06 22:36:17 +00006557
Michael W. Hudson54241132001-12-07 15:38:26 +00006558# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006559# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006560# The cast to long int works around a bug in the HP C Compiler
6561# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6562# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6563# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6565$as_echo_n "checking size of int... " >&6; }
6566if test "${ac_cv_sizeof_int+set}" = set; then :
6567 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006568else
Matthias Kloseb9621712010-04-24 17:59:49 +00006569 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 +00006570
Martin v. Löwis11437992002-04-12 09:54:03 +00006571else
Matthias Kloseb9621712010-04-24 17:59:49 +00006572 if test "$ac_cv_type_int" = yes; then
6573 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6574$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6575{ as_fn_set_status 77
6576as_fn_error "cannot compute sizeof (int)
6577See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006578 else
6579 ac_cv_sizeof_int=0
6580 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006582
Martin v. Löwis11437992002-04-12 09:54:03 +00006583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6585$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006586
6587
6588
Martin v. Löwis11437992002-04-12 09:54:03 +00006589cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006590#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006591_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006592
6593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006594# The cast to long int works around a bug in the HP C Compiler
6595# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6596# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6597# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6599$as_echo_n "checking size of long... " >&6; }
6600if test "${ac_cv_sizeof_long+set}" = set; then :
6601 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006602else
Matthias Kloseb9621712010-04-24 17:59:49 +00006603 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 +00006604
Martin v. Löwis11437992002-04-12 09:54:03 +00006605else
Matthias Kloseb9621712010-04-24 17:59:49 +00006606 if test "$ac_cv_type_long" = yes; then
6607 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6608$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6609{ as_fn_set_status 77
6610as_fn_error "cannot compute sizeof (long)
6611See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006612 else
6613 ac_cv_sizeof_long=0
6614 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006615fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006616
Martin v. Löwis11437992002-04-12 09:54:03 +00006617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6619$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006620
6621
6622
Martin v. Löwis11437992002-04-12 09:54:03 +00006623cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006624#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006625_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006626
6627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006628# The cast to long int works around a bug in the HP C Compiler
6629# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6630# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6631# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6633$as_echo_n "checking size of void *... " >&6; }
6634if test "${ac_cv_sizeof_void_p+set}" = set; then :
6635 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006636else
Matthias Kloseb9621712010-04-24 17:59:49 +00006637 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 +00006638
Martin v. Löwis11437992002-04-12 09:54:03 +00006639else
Matthias Kloseb9621712010-04-24 17:59:49 +00006640 if test "$ac_cv_type_void_p" = yes; then
6641 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6642$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6643{ as_fn_set_status 77
6644as_fn_error "cannot compute sizeof (void *)
6645See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006646 else
6647 ac_cv_sizeof_void_p=0
6648 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006650
Martin v. Löwis11437992002-04-12 09:54:03 +00006651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6653$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006654
6655
6656
Martin v. Löwis11437992002-04-12 09:54:03 +00006657cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006658#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006659_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006660
6661
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006662# The cast to long int works around a bug in the HP C Compiler
6663# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6664# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6665# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6667$as_echo_n "checking size of short... " >&6; }
6668if test "${ac_cv_sizeof_short+set}" = set; then :
6669 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006670else
Matthias Kloseb9621712010-04-24 17:59:49 +00006671 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 +00006672
Martin v. Löwis11437992002-04-12 09:54:03 +00006673else
Matthias Kloseb9621712010-04-24 17:59:49 +00006674 if test "$ac_cv_type_short" = yes; then
6675 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6677{ as_fn_set_status 77
6678as_fn_error "cannot compute sizeof (short)
6679See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006680 else
6681 ac_cv_sizeof_short=0
6682 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006684
Martin v. Löwis11437992002-04-12 09:54:03 +00006685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6687$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006688
6689
6690
Martin v. Löwis11437992002-04-12 09:54:03 +00006691cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006692#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006693_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006694
6695
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006696# The cast to long int works around a bug in the HP C Compiler
6697# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6698# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6699# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6701$as_echo_n "checking size of float... " >&6; }
6702if test "${ac_cv_sizeof_float+set}" = set; then :
6703 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006704else
Matthias Kloseb9621712010-04-24 17:59:49 +00006705 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 +00006706
Martin v. Löwis11437992002-04-12 09:54:03 +00006707else
Matthias Kloseb9621712010-04-24 17:59:49 +00006708 if test "$ac_cv_type_float" = yes; then
6709 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6710$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6711{ as_fn_set_status 77
6712as_fn_error "cannot compute sizeof (float)
6713See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006714 else
6715 ac_cv_sizeof_float=0
6716 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006718
Martin v. Löwis11437992002-04-12 09:54:03 +00006719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6721$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006722
6723
6724
Martin v. Löwis11437992002-04-12 09:54:03 +00006725cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006726#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006727_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006728
6729
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006730# The cast to long int works around a bug in the HP C Compiler
6731# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6732# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6733# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6735$as_echo_n "checking size of double... " >&6; }
6736if test "${ac_cv_sizeof_double+set}" = set; then :
6737 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006738else
Matthias Kloseb9621712010-04-24 17:59:49 +00006739 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 +00006740
Martin v. Löwis11437992002-04-12 09:54:03 +00006741else
Matthias Kloseb9621712010-04-24 17:59:49 +00006742 if test "$ac_cv_type_double" = yes; then
6743 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6744$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6745{ as_fn_set_status 77
6746as_fn_error "cannot compute sizeof (double)
6747See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006748 else
6749 ac_cv_sizeof_double=0
6750 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006752
Martin v. Löwis11437992002-04-12 09:54:03 +00006753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6755$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006756
6757
6758
Martin v. Löwis11437992002-04-12 09:54:03 +00006759cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006760#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006761_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006762
6763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006764# The cast to long int works around a bug in the HP C Compiler
6765# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6766# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6767# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6769$as_echo_n "checking size of fpos_t... " >&6; }
6770if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6771 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006772else
Matthias Kloseb9621712010-04-24 17:59:49 +00006773 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 +00006774
Martin v. Löwis11437992002-04-12 09:54:03 +00006775else
Matthias Kloseb9621712010-04-24 17:59:49 +00006776 if test "$ac_cv_type_fpos_t" = yes; then
6777 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6778$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6779{ as_fn_set_status 77
6780as_fn_error "cannot compute sizeof (fpos_t)
6781See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006782 else
6783 ac_cv_sizeof_fpos_t=0
6784 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006786
Martin v. Löwis11437992002-04-12 09:54:03 +00006787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6789$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006790
6791
6792
Martin v. Löwis11437992002-04-12 09:54:03 +00006793cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006794#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006795_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006796
Michael W. Hudson54241132001-12-07 15:38:26 +00006797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006798# The cast to long int works around a bug in the HP C Compiler
6799# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6800# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6801# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6803$as_echo_n "checking size of size_t... " >&6; }
6804if test "${ac_cv_sizeof_size_t+set}" = set; then :
6805 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006806else
Matthias Kloseb9621712010-04-24 17:59:49 +00006807 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 +00006808
Martin v. Löwis18e16552006-02-15 17:27:45 +00006809else
Matthias Kloseb9621712010-04-24 17:59:49 +00006810 if test "$ac_cv_type_size_t" = yes; then
6811 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6812$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6813{ as_fn_set_status 77
6814as_fn_error "cannot compute sizeof (size_t)
6815See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006816 else
6817 ac_cv_sizeof_size_t=0
6818 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006820
Martin v. Löwis18e16552006-02-15 17:27:45 +00006821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6823$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006824
6825
6826
Martin v. Löwis18e16552006-02-15 17:27:45 +00006827cat >>confdefs.h <<_ACEOF
6828#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6829_ACEOF
6830
6831
Christian Heimes400adb02008-02-01 08:12:03 +00006832# The cast to long int works around a bug in the HP C Compiler
6833# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6834# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6835# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6837$as_echo_n "checking size of pid_t... " >&6; }
6838if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6839 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006840else
Matthias Kloseb9621712010-04-24 17:59:49 +00006841 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00006842
Christian Heimes400adb02008-02-01 08:12:03 +00006843else
Matthias Kloseb9621712010-04-24 17:59:49 +00006844 if test "$ac_cv_type_pid_t" = yes; then
6845 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6846$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6847{ as_fn_set_status 77
6848as_fn_error "cannot compute sizeof (pid_t)
6849See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006850 else
6851 ac_cv_sizeof_pid_t=0
6852 fi
6853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006854
Christian Heimes400adb02008-02-01 08:12:03 +00006855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6857$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006858
6859
6860
6861cat >>confdefs.h <<_ACEOF
6862#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6863_ACEOF
6864
6865
Michael W. Hudson54241132001-12-07 15:38:26 +00006866
Matthias Kloseb9621712010-04-24 17:59:49 +00006867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6868$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006869have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006871/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006872
Martin v. Löwis11437992002-04-12 09:54:03 +00006873int
6874main ()
6875{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006876long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006877 ;
6878 return 0;
6879}
6880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006881if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006882
6883
Matthias Kloseb9621712010-04-24 17:59:49 +00006884$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006885
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006886 have_long_long=yes
6887
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6891$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006892if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006893# The cast to long int works around a bug in the HP C Compiler
6894# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6895# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6896# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6898$as_echo_n "checking size of long long... " >&6; }
6899if test "${ac_cv_sizeof_long_long+set}" = set; then :
6900 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006901else
Matthias Kloseb9621712010-04-24 17:59:49 +00006902 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 +00006903
Martin v. Löwis11437992002-04-12 09:54:03 +00006904else
Matthias Kloseb9621712010-04-24 17:59:49 +00006905 if test "$ac_cv_type_long_long" = yes; then
6906 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6907$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6908{ as_fn_set_status 77
6909as_fn_error "cannot compute sizeof (long long)
6910See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006911 else
6912 ac_cv_sizeof_long_long=0
6913 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006915
Martin v. Löwis11437992002-04-12 09:54:03 +00006916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6918$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006919
6920
6921
Martin v. Löwis11437992002-04-12 09:54:03 +00006922cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006923#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006924_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006925
Michael W. Hudson54241132001-12-07 15:38:26 +00006926
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006927fi
6928
Matthias Kloseb9621712010-04-24 17:59:49 +00006929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6930$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006931have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006933/* end confdefs.h. */
6934
6935int
6936main ()
6937{
6938long double x; x = (long double)0;
6939 ;
6940 return 0;
6941}
6942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006943if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006944
6945
Matthias Kloseb9621712010-04-24 17:59:49 +00006946$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006947
6948 have_long_double=yes
6949
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006950fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6953$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006954if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006955# The cast to long int works around a bug in the HP C Compiler
6956# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6957# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6958# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6960$as_echo_n "checking size of long double... " >&6; }
6961if test "${ac_cv_sizeof_long_double+set}" = set; then :
6962 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006963else
Matthias Kloseb9621712010-04-24 17:59:49 +00006964 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 +00006965
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006966else
Matthias Kloseb9621712010-04-24 17:59:49 +00006967 if test "$ac_cv_type_long_double" = yes; then
6968 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6969$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6970{ as_fn_set_status 77
6971as_fn_error "cannot compute sizeof (long double)
6972See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006973 else
6974 ac_cv_sizeof_long_double=0
6975 fi
6976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006977
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6980$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006981
6982
6983
6984cat >>confdefs.h <<_ACEOF
6985#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6986_ACEOF
6987
6988
6989fi
6990
6991
Matthias Kloseb9621712010-04-24 17:59:49 +00006992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6993$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006994have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00006996/* end confdefs.h. */
6997
6998int
6999main ()
7000{
7001_Bool x; x = (_Bool)0;
7002 ;
7003 return 0;
7004}
7005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007006if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007007
7008
Matthias Kloseb9621712010-04-24 17:59:49 +00007009$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007010
7011 have_c99_bool=yes
7012
Thomas Woutersb2137042007-02-01 18:02:27 +00007013fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7016$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007017if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007018# The cast to long int works around a bug in the HP C Compiler
7019# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7020# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7021# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7023$as_echo_n "checking size of _Bool... " >&6; }
7024if test "${ac_cv_sizeof__Bool+set}" = set; then :
7025 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007026else
Matthias Kloseb9621712010-04-24 17:59:49 +00007027 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 +00007028
Thomas Woutersb2137042007-02-01 18:02:27 +00007029else
Matthias Kloseb9621712010-04-24 17:59:49 +00007030 if test "$ac_cv_type__Bool" = yes; then
7031 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7032$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7033{ as_fn_set_status 77
7034as_fn_error "cannot compute sizeof (_Bool)
7035See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007036 else
7037 ac_cv_sizeof__Bool=0
7038 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007040
Thomas Woutersb2137042007-02-01 18:02:27 +00007041fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7043$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007044
7045
7046
Thomas Woutersb2137042007-02-01 18:02:27 +00007047cat >>confdefs.h <<_ACEOF
7048#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7049_ACEOF
7050
7051
7052fi
7053
Matthias Kloseb9621712010-04-24 17:59:49 +00007054ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007055 #include <stdint.h>
7056 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007057"
7058if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007059
7060cat >>confdefs.h <<_ACEOF
7061#define HAVE_UINTPTR_T 1
7062_ACEOF
7063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007064# The cast to long int works around a bug in the HP C Compiler
7065# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7066# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7067# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7069$as_echo_n "checking size of uintptr_t... " >&6; }
7070if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7071 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007072else
Matthias Kloseb9621712010-04-24 17:59:49 +00007073 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 +00007074
Martin v. Löwis11437992002-04-12 09:54:03 +00007075else
Matthias Kloseb9621712010-04-24 17:59:49 +00007076 if test "$ac_cv_type_uintptr_t" = yes; then
7077 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7078$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7079{ as_fn_set_status 77
7080as_fn_error "cannot compute sizeof (uintptr_t)
7081See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007082 else
7083 ac_cv_sizeof_uintptr_t=0
7084 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007085fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007086
Martin v. Löwis11437992002-04-12 09:54:03 +00007087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7089$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007090
7091
7092
Martin v. Löwis11437992002-04-12 09:54:03 +00007093cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007094#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007095_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007096
Michael W. Hudson54241132001-12-07 15:38:26 +00007097
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007098fi
7099
Thomas Wouters89f507f2006-12-13 04:49:30 +00007100
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007101# The cast to long int works around a bug in the HP C Compiler
7102# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7103# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7104# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7106$as_echo_n "checking size of off_t... " >&6; }
7107if test "${ac_cv_sizeof_off_t+set}" = set; then :
7108 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007109else
Matthias Kloseb9621712010-04-24 17:59:49 +00007110 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007111#ifdef HAVE_SYS_TYPES_H
7112#include <sys/types.h>
7113#endif
7114
Matthias Kloseb9621712010-04-24 17:59:49 +00007115"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007116
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007117else
Matthias Kloseb9621712010-04-24 17:59:49 +00007118 if test "$ac_cv_type_off_t" = yes; then
7119 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7120$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7121{ as_fn_set_status 77
7122as_fn_error "cannot compute sizeof (off_t)
7123See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007124 else
7125 ac_cv_sizeof_off_t=0
7126 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007128
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7131$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007132
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007133
7134
Martin v. Löwis11437992002-04-12 09:54:03 +00007135cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007136#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007137_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007138
Michael W. Hudson54241132001-12-07 15:38:26 +00007139
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007140
Matthias Kloseb9621712010-04-24 17:59:49 +00007141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7142$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007143if test "$have_long_long" = yes
7144then
7145if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007146 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007147
Matthias Kloseb9621712010-04-24 17:59:49 +00007148$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007149
Matthias Kloseb9621712010-04-24 17:59:49 +00007150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7151$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007152else
Matthias Kloseb9621712010-04-24 17:59:49 +00007153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7154$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007155fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007156else
Matthias Kloseb9621712010-04-24 17:59:49 +00007157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7158$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007159fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007160
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007161# The cast to long int works around a bug in the HP C Compiler
7162# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7163# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7164# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7166$as_echo_n "checking size of time_t... " >&6; }
7167if test "${ac_cv_sizeof_time_t+set}" = set; then :
7168 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007169else
Matthias Kloseb9621712010-04-24 17:59:49 +00007170 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007171#ifdef HAVE_SYS_TYPES_H
7172#include <sys/types.h>
7173#endif
7174#ifdef HAVE_TIME_H
7175#include <time.h>
7176#endif
7177
Matthias Kloseb9621712010-04-24 17:59:49 +00007178"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007179
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007180else
Matthias Kloseb9621712010-04-24 17:59:49 +00007181 if test "$ac_cv_type_time_t" = yes; then
7182 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7183$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7184{ as_fn_set_status 77
7185as_fn_error "cannot compute sizeof (time_t)
7186See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007187 else
7188 ac_cv_sizeof_time_t=0
7189 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007190fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007191
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7194$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007195
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007196
7197
Martin v. Löwis11437992002-04-12 09:54:03 +00007198cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007199#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007200_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007201
Michael W. Hudson54241132001-12-07 15:38:26 +00007202
7203
Trent Mick635f6fb2000-08-23 21:33:05 +00007204# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007205ac_save_cc="$CC"
7206if test "$ac_cv_kpthread" = "yes"
7207then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007208elif test "$ac_cv_kthread" = "yes"
7209then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007210elif test "$ac_cv_pthread" = "yes"
7211then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007212fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007213
Matthias Kloseb9621712010-04-24 17:59:49 +00007214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7215$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007216have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007218/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007219
7220 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007221int
7222main ()
7223{
Guido van Rossum12580492000-09-24 16:47:19 +00007224pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007225 ;
7226 return 0;
7227}
Matthias Kloseb159a552010-04-25 21:00:44 +00007228
Martin v. Löwis11437992002-04-12 09:54:03 +00007229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007230if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007231 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7235$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007236if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007237 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007238# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7239# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7240# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7242$as_echo_n "checking size of pthread_t... " >&6; }
7243if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7244 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007245else
Matthias Kloseb9621712010-04-24 17:59:49 +00007246 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007247#ifdef HAVE_PTHREAD_H
7248#include <pthread.h>
7249#endif
7250
Matthias Kloseb9621712010-04-24 17:59:49 +00007251"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007252
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007253else
Matthias Kloseb9621712010-04-24 17:59:49 +00007254 if test "$ac_cv_type_pthread_t" = yes; then
7255 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7256$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7257{ as_fn_set_status 77
7258as_fn_error "cannot compute sizeof (pthread_t)
7259See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007260 else
7261 ac_cv_sizeof_pthread_t=0
7262 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007264
Trent Mick635f6fb2000-08-23 21:33:05 +00007265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7267$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007268
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007269
7270
Martin v. Löwis11437992002-04-12 09:54:03 +00007271cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007272#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007273_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007274
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007275
Trent Mick635f6fb2000-08-23 21:33:05 +00007276fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007277CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007278
Michael W. Hudson54241132001-12-07 15:38:26 +00007279
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007280case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007281 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007282 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7283 ;;
7284 Darwin/*)
7285 OTHER_LIBTOOL_OPT=""
7286 ;;
7287esac
7288
7289
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007290ARCH_RUN_32BIT=""
7291
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007292case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007293 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007294 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7295 if test "${enable_universalsdk}"; then
7296 :
7297 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007298 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007299 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007300 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007301 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007302 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007303 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007304 if test ${gcc_version} '<' 4.0
7305 then
7306 LIBTOOL_CRUFT="-lcc_dynamic"
7307 else
7308 LIBTOOL_CRUFT=""
7309 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007310 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007311 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007312else
Matthias Kloseb9621712010-04-24 17:59:49 +00007313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007314/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007315
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007316 #include <unistd.h>
7317 int main(int argc, char*argv[])
7318 {
7319 if (sizeof(long) == 4) {
7320 return 0;
7321 } else {
7322 return 1;
7323 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007324 }
7325
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007327if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007328 ac_osx_32bit=yes
7329else
Matthias Kloseb9621712010-04-24 17:59:49 +00007330 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007331fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007332rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7333 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007334fi
7335
7336
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007337 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007338 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007339 i386)
7340 MACOSX_DEFAULT_ARCH="i386"
7341 ;;
7342 ppc)
7343 MACOSX_DEFAULT_ARCH="ppc"
7344 ;;
7345 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007346 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007347 ;;
7348 esac
7349 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007350 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007351 i386)
7352 MACOSX_DEFAULT_ARCH="x86_64"
7353 ;;
7354 ppc)
7355 MACOSX_DEFAULT_ARCH="ppc64"
7356 ;;
7357 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007358 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007359 ;;
7360 esac
7361
7362 #ARCH_RUN_32BIT="true"
7363 fi
7364
7365 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007366 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007367 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007368esac
7369
Matthias Kloseb9621712010-04-24 17:59:49 +00007370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7371$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007372if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007373then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007374 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007375 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007376 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007377
Matthias Kloseb9621712010-04-24 17:59:49 +00007378$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007379
Matthias Kloseb9621712010-04-24 17:59:49 +00007380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7381$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007382 if test $enable_shared = "yes"
7383 then
Matthias Kloseb9621712010-04-24 17:59:49 +00007384 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 +00007385 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007386else
Matthias Kloseb9621712010-04-24 17:59:49 +00007387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7388$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007389fi
7390
Matthias Kloseb9621712010-04-24 17:59:49 +00007391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7392$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007393case $ac_sys_system/$ac_sys_release in
7394 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007395
Matthias Kloseb9621712010-04-24 17:59:49 +00007396$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007397
Matthias Kloseb9621712010-04-24 17:59:49 +00007398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7399$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007400 ;;
7401 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7403$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007404 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007405esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007406
Guido van Rossum0a516c91994-09-12 10:58:40 +00007407# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007408
Michael W. Hudson54241132001-12-07 15:38:26 +00007409
7410
7411
7412
Benjamin Peterson99f03762010-04-11 22:15:28 +00007413
Guido van Rossum0a516c91994-09-12 10:58:40 +00007414# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007415# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Kloseb9621712010-04-24 17:59:49 +00007416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7417$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007418if test -z "$SO"
7419then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007420 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +00007421 hp*|HP*)
7422 case `uname -m` in
7423 ia64) SO=.so;;
7424 *) SO=.sl;;
7425 esac
7426 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007427 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007428 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007429 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007430else
7431 # this might also be a termcap variable, see #610332
7432 echo
7433 echo '====================================================================='
7434 echo '+ +'
7435 echo '+ WARNING: You have set SO in your environment. +'
7436 echo '+ Do you really mean to change the extension for shared libraries? +'
7437 echo '+ Continuing in 10 seconds to let you to ponder. +'
7438 echo '+ +'
7439 echo '====================================================================='
7440 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007441fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7443$as_echo "$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00007444
Georg Brandlb1441c72009-01-03 22:33:39 +00007445
Thomas Wouters477c8d52006-05-27 19:21:47 +00007446cat >>confdefs.h <<_ACEOF
7447#define SHLIB_EXT "$SO"
7448_ACEOF
7449
Guido van Rossum0a516c91994-09-12 10:58:40 +00007450# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007451# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007452# (Shared libraries in this instance are shared modules to be loaded into
7453# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7455$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007456if test -z "$LDSHARED"
7457then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007458 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007459 AIX*)
7460 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007461 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007462 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007463 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007464 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007465 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007466 if test "$GCC" = "yes" ; then
7467 LDSHARED='$(CC) -shared'
7468 LDCXXSHARED='$(CXX) -shared'
7469 else
7470 LDSHARED='$(CC) -G'
7471 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007472 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007473 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007474 if test "$GCC" = "yes" ; then
7475 LDSHARED='$(CC) -shared'
7476 LDCXXSHARED='$(CXX) -shared'
7477 else
7478 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007479 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007480 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007481 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00007482 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007483 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007484 if test "$enable_framework" ; then
7485 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007486 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7487 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007488 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007489 else
7490 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007491 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007492 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007493 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007494 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +00007495 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007496 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007497 if test "$enable_framework" ; then
7498 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007499 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7500 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007501 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007502 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007503 # No framework, use the Python app as bundle-loader
7504 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007505 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007506 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007507 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007508 Darwin/*)
7509 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7510 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007511
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007512 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007513 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007514 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007515 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007516 fi
Jack Jansen6b08a402004-06-03 12:41:45 +00007517 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007518 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007519 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007520 else
7521 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007522 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007523 if test "$enable_framework" ; then
7524 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007525 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7526 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007527 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007528 else
7529 # No framework, use the Python app as bundle-loader
7530 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7531 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007532 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007533 fi
7534 fi
7535 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007536 Linux*|GNU*|QNX*)
7537 LDSHARED='$(CC) -shared'
7538 LDCXXSHARED='$(CXX) -shared';;
7539 BSD/OS*/4*)
7540 LDSHARED="gcc -shared"
7541 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007542 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007543 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007544 then
Benjamin Petersonab0a7522010-03-14 15:18:25 +00007545 LDSHARED='$(CC) -shared ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007546 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007547 else
7548 LDSHARED="ld -Bshareable ${LDFLAGS}"
7549 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007550 OpenBSD*)
7551 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7552 then
7553 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007554 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007555 else
7556 case `uname -r` in
7557 [01].* | 2.[0-7] | 2.[0-7].*)
7558 LDSHARED="ld -Bshareable ${LDFLAGS}"
7559 ;;
7560 *)
7561 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007562 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007563 ;;
7564 esac
7565 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007566 NetBSD*|DragonFly*)
7567 LDSHARED="cc -shared ${LDFLAGS}"
7568 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007569 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007570 if test "$GCC" = "yes" ; then
7571 LDSHARED='$(CC) -shared'
7572 LDCXXSHARED='$(CXX) -shared'
7573 else
7574 LDSHARED='$(CC) -G'
7575 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007576 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007577 SCO_SV*)
7578 LDSHARED='$(CC) -Wl,-G,-Bexport'
7579 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7580 CYGWIN*)
7581 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7582 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007583 *) LDSHARED="ld";;
7584 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7587$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007588LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007589BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007590# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007591# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7593$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007594if test -z "$CCSHARED"
7595then
Guido van Rossum07397971997-04-29 21:49:50 +00007596 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007597 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007598 then CCSHARED="-fPIC";
7599 elif test `uname -p` = sparc;
7600 then CCSHARED="-xcode=pic32";
7601 else CCSHARED="-Kpic";
7602 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007603 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007604 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007605 else CCSHARED="+z";
7606 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007607 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007608 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007609 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007610 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007611 if test "$GCC" = "yes"
7612 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007613 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007614 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007615 SCO_SV*)
7616 if test "$GCC" = "yes"
7617 then CCSHARED="-fPIC"
7618 else CCSHARED="-Kpic -belf"
7619 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007620 IRIX*/6*) case $CC in
7621 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007622 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007623 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007624 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7627$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007628# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007629# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7631$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007632if test -z "$LINKFORSHARED"
7633then
Guido van Rossum07397971997-04-29 21:49:50 +00007634 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007635 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007636 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007637 LINKFORSHARED="-Wl,-E -Wl,+s";;
7638# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007639 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007640 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007641 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007642 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007643 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007644 if test "$enable_framework"
7645 then
Jack Jansenda49e192005-01-07 13:08:22 +00007646 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007647 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007648 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007649 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007650 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007651 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007652 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007653 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7654 then
7655 LINKFORSHARED="-Wl,--export-dynamic"
7656 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007657 SunOS/5*) case $CC in
7658 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007659 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007660 then
7661 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007662 fi;;
7663 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007664 CYGWIN*)
7665 if test $enable_shared = "no"
7666 then
7667 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7668 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007669 QNX*)
7670 # -Wl,-E causes the symbols to be added to the dynamic
7671 # symbol table so that they can be found when a module
7672 # is loaded. -N 2048K causes the stack size to be set
7673 # to 2048 kilobytes so that the stack doesn't overflow
7674 # when running test_compile.py.
7675 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007676 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7679$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007680
Michael W. Hudson54241132001-12-07 15:38:26 +00007681
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007682
Matthias Kloseb9621712010-04-24 17:59:49 +00007683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7684$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007685if test ! "$LIBRARY" = "$LDLIBRARY"
7686then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007687 case $ac_sys_system in
7688 CYGWIN*)
7689 # Cygwin needs CCSHARED when building extension DLLs
7690 # but not when building the interpreter DLL.
7691 CFLAGSFORSHARED='';;
7692 *)
7693 CFLAGSFORSHARED='$(CCSHARED)'
7694 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7697$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007698
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007699# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7700# library (with --enable-shared).
7701# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007702# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7703# if it is not required, since it creates a dependency of the shared library
7704# to LIBS. This, in turn, means that applications linking the shared libpython
7705# don't need to link LIBS explicitly. The default should be only changed
7706# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007707
Matthias Kloseb9621712010-04-24 17:59:49 +00007708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7709$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007710case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007711 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007712 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007713esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7715$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007716
7717
Guido van Rossum627b2d71993-12-24 10:39:16 +00007718# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7720$as_echo_n "checking for dlopen in -ldl... " >&6; }
7721if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7722 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007723else
Martin v. Löwis11437992002-04-12 09:54:03 +00007724 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007725LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007728
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007729/* Override any GCC internal prototype to avoid an error.
7730 Use char because int might match the return type of a GCC
7731 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007732#ifdef __cplusplus
7733extern "C"
7734#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007735char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007736int
7737main ()
7738{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007739return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007740 ;
7741 return 0;
7742}
7743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007744if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007745 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007746else
Matthias Kloseb9621712010-04-24 17:59:49 +00007747 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007749rm -f core conftest.err conftest.$ac_objext \
7750 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007751LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7754$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7755if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007756 cat >>confdefs.h <<_ACEOF
7757#define HAVE_LIBDL 1
7758_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007759
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007760 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007761
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007762fi
7763 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7765$as_echo_n "checking for shl_load in -ldld... " >&6; }
7766if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7767 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007768else
Martin v. Löwis11437992002-04-12 09:54:03 +00007769 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007770LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007773
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007774/* Override any GCC internal prototype to avoid an error.
7775 Use char because int might match the return type of a GCC
7776 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007777#ifdef __cplusplus
7778extern "C"
7779#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007780char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007781int
7782main ()
7783{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007784return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007785 ;
7786 return 0;
7787}
7788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007789if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007790 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007791else
Matthias Kloseb9621712010-04-24 17:59:49 +00007792 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007794rm -f core conftest.err conftest.$ac_objext \
7795 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007796LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7799$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7800if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007801 cat >>confdefs.h <<_ACEOF
7802#define HAVE_LIBDLD 1
7803_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007804
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007805 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007806
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007807fi
7808 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007809
Georg Brandlb1441c72009-01-03 22:33:39 +00007810# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007811if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7813$as_echo_n "checking for library containing sem_init... " >&6; }
7814if test "${ac_cv_search_sem_init+set}" = set; then :
7815 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007816else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007817 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007821/* Override any GCC internal prototype to avoid an error.
7822 Use char because int might match the return type of a GCC
7823 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007824#ifdef __cplusplus
7825extern "C"
7826#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007827char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007828int
7829main ()
7830{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007832 ;
7833 return 0;
7834}
7835_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007836for ac_lib in '' pthread rt posix4; do
7837 if test -z "$ac_lib"; then
7838 ac_res="none required"
7839 else
7840 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007841 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007842 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007843 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007844 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007846rm -f core conftest.err conftest.$ac_objext \
7847 conftest$ac_exeext
7848 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007849 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007851done
Matthias Kloseb9621712010-04-24 17:59:49 +00007852if test "${ac_cv_search_sem_init+set}" = set; then :
7853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007854else
7855 ac_cv_search_sem_init=no
7856fi
7857rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007858LIBS=$ac_func_search_save_LIBS
7859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7861$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007862ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007863if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007864 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007865
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007866fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007867 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007868 # posix4 on Solaris 2.6
7869 # pthread (first!) on Linux
7870fi
7871
Martin v. Löwis19d17342003-06-14 21:03:05 +00007872# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7874$as_echo_n "checking for textdomain in -lintl... " >&6; }
7875if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
7876 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007877else
7878 ac_check_lib_save_LIBS=$LIBS
7879LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007881/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007883/* Override any GCC internal prototype to avoid an error.
7884 Use char because int might match the return type of a GCC
7885 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007886#ifdef __cplusplus
7887extern "C"
7888#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007889char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007890int
7891main ()
7892{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007893return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007894 ;
7895 return 0;
7896}
7897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007898if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007899 ac_cv_lib_intl_textdomain=yes
7900else
Matthias Kloseb9621712010-04-24 17:59:49 +00007901 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007903rm -f core conftest.err conftest.$ac_objext \
7904 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007905LIBS=$ac_check_lib_save_LIBS
7906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7908$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
7909if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007910
Matthias Kloseb9621712010-04-24 17:59:49 +00007911$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007912
Brett Cannonc6d936e2009-06-07 20:09:53 +00007913 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007914fi
7915
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007916
7917# checks for system dependent C++ extensions support
7918case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007919 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7920$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007922/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007923
7924 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007925int
7926main ()
7927{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007928loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007929 ;
7930 return 0;
7931}
Matthias Kloseb159a552010-04-25 21:00:44 +00007932
Martin v. Löwis11437992002-04-12 09:54:03 +00007933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007934if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007935
Matthias Kloseb159a552010-04-25 21:00:44 +00007936
Matthias Kloseb9621712010-04-24 17:59:49 +00007937$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007938
Matthias Kloseb159a552010-04-25 21:00:44 +00007939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007940$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007941
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007942else
Matthias Kloseb159a552010-04-25 21:00:44 +00007943
7944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007945$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007946
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007947fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007948rm -f core conftest.err conftest.$ac_objext \
7949 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007950 *) ;;
7951esac
7952
Guido van Rossum70c7f481998-03-26 18:44:10 +00007953# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7955$as_echo_n "checking for t_open in -lnsl... " >&6; }
7956if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
7957 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007958else
Martin v. Löwis11437992002-04-12 09:54:03 +00007959 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007960LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964/* Override any GCC internal prototype to avoid an error.
7965 Use char because int might match the return type of a GCC
7966 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007967#ifdef __cplusplus
7968extern "C"
7969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007970char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007971int
7972main ()
7973{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007974return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007975 ;
7976 return 0;
7977}
7978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007979if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007980 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007981else
Matthias Kloseb9621712010-04-24 17:59:49 +00007982 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007984rm -f core conftest.err conftest.$ac_objext \
7985 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007986LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
7989$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
7990if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007991 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007992fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00007993 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00007994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7995$as_echo_n "checking for socket in -lsocket... " >&6; }
7996if test "${ac_cv_lib_socket_socket+set}" = set; then :
7997 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007998else
Martin v. Löwis11437992002-04-12 09:54:03 +00007999 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008000LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008002/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008003
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008004/* Override any GCC internal prototype to avoid an error.
8005 Use char because int might match the return type of a GCC
8006 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008007#ifdef __cplusplus
8008extern "C"
8009#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008010char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008011int
8012main ()
8013{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008014return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008015 ;
8016 return 0;
8017}
8018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008019if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008020 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008021else
Matthias Kloseb9621712010-04-24 17:59:49 +00008022 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008024rm -f core conftest.err conftest.$ac_objext \
8025 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008026LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008027fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8029$as_echo "$ac_cv_lib_socket_socket" >&6; }
8030if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008031 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008032fi
8033 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008034
Matthias Kloseb9621712010-04-24 17:59:49 +00008035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8036$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008037
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008038# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008039if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008040 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8042$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008043LIBS="$withval $LIBS"
8044
8045else
Matthias Kloseb9621712010-04-24 17:59:49 +00008046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8047$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008048fi
8049
Guido van Rossum7f43da71994-08-01 12:15:30 +00008050
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008051if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008052 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8053set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8055$as_echo_n "checking for $ac_word... " >&6; }
8056if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8057 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008058else
8059 case $PKG_CONFIG in
8060 [\\/]* | ?:[\\/]*)
8061 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8062 ;;
8063 *)
8064 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8065for as_dir in $PATH
8066do
8067 IFS=$as_save_IFS
8068 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008069 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008070 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8071 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008072 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008073 break 2
8074 fi
8075done
Matthias Kloseb9621712010-04-24 17:59:49 +00008076 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008077IFS=$as_save_IFS
8078
8079 ;;
8080esac
8081fi
8082PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8083if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8085$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008086else
Matthias Kloseb9621712010-04-24 17:59:49 +00008087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8088$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008089fi
8090
8091
8092fi
8093if test -z "$ac_cv_path_PKG_CONFIG"; then
8094 ac_pt_PKG_CONFIG=$PKG_CONFIG
8095 # Extract the first word of "pkg-config", so it can be a program name with args.
8096set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8098$as_echo_n "checking for $ac_word... " >&6; }
8099if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8100 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008101else
8102 case $ac_pt_PKG_CONFIG in
8103 [\\/]* | ?:[\\/]*)
8104 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8105 ;;
8106 *)
8107 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8108for as_dir in $PATH
8109do
8110 IFS=$as_save_IFS
8111 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008112 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008113 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8114 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008115 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008116 break 2
8117 fi
8118done
Matthias Kloseb9621712010-04-24 17:59:49 +00008119 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008120IFS=$as_save_IFS
8121
8122 ;;
8123esac
8124fi
8125ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8126if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8128$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008129else
Matthias Kloseb9621712010-04-24 17:59:49 +00008130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8131$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008132fi
8133
8134 if test "x$ac_pt_PKG_CONFIG" = x; then
8135 PKG_CONFIG=""
8136 else
8137 case $cross_compiling:$ac_tool_warned in
8138yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008139{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8140$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008141ac_tool_warned=yes ;;
8142esac
8143 PKG_CONFIG=$ac_pt_PKG_CONFIG
8144 fi
8145else
8146 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8147fi
8148
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008149
8150# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8152$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008153
8154# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008155if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008156 withval=$with_system_expat;
8157fi
8158
8159
Matthias Kloseb9621712010-04-24 17:59:49 +00008160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8161$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008162
8163# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8165$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008166
8167# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008168if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008169 withval=$with_system_ffi;
8170fi
8171
8172
8173if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008174 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8175else
8176 LIBFFI_INCLUDEDIR=""
8177fi
8178
8179
Matthias Kloseb9621712010-04-24 17:59:49 +00008180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8181$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008182
Matthias Klose55708cc2009-04-30 08:06:49 +00008183# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8185$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008186
8187# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008188if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008189 withval=$with_dbmliborder;
8190if test x$with_dbmliborder = xyes
8191then
Matthias Kloseb9621712010-04-24 17:59:49 +00008192as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008193else
8194 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8195 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8196 then
Matthias Kloseb9621712010-04-24 17:59:49 +00008197 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008198 fi
8199 done
8200fi
8201fi
8202
Matthias Kloseb9621712010-04-24 17:59:49 +00008203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8204$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008205
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008206# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008207
8208
Matthias Kloseb9621712010-04-24 17:59:49 +00008209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8210$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008211
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008212# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008213if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008214 withval=$with_signal_module;
8215fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008216
8217
8218if test -z "$with_signal_module"
8219then with_signal_module="yes"
8220fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8222$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008223
8224if test "${with_signal_module}" = "yes"; then
8225 USE_SIGNAL_MODULE=""
8226 SIGNAL_OBJS=""
8227else
8228 USE_SIGNAL_MODULE="#"
8229 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8230fi
8231
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008232# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008233
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008234USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008235
Matthias Kloseb9621712010-04-24 17:59:49 +00008236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8237$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008238
Guido van Rossumec2f0731997-01-22 20:54:01 +00008239
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008240# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008241if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008242 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8244$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008245LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008246if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008247 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008248fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008249else
Matthias Kloseb9621712010-04-24 17:59:49 +00008250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8251$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008252fi
8253
Martin v. Löwis11437992002-04-12 09:54:03 +00008254
8255# Templates for things AC_DEFINEd more than once.
8256# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008257
8258
Martin v. Löwis11437992002-04-12 09:54:03 +00008259
8260
Matthias Kloseb9621712010-04-24 17:59:49 +00008261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8262$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008263
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008264# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008265if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008266 withval=$with_threads;
8267fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008268
8269
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008270# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008272# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008273if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008274 withval=$with_thread; with_threads=$with_thread
8275fi
8276
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008277
8278if test -z "$with_threads"
8279then with_threads="yes"
8280fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8282$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008283
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008284
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008285if test "$with_threads" = "no"
8286then
8287 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008288elif test "$ac_cv_pthread_is_default" = yes
8289then
Matthias Kloseb9621712010-04-24 17:59:49 +00008290 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008291
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008292 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008293 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008294
8295 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008296 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008297elif test "$ac_cv_kpthread" = "yes"
8298then
8299 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008300 if test "$ac_cv_cxx_thread" = "yes"; then
8301 CXX="$CXX -Kpthread"
8302 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008303 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008304
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008305 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008306 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008307elif test "$ac_cv_kthread" = "yes"
8308then
8309 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008310 if test "$ac_cv_cxx_thread" = "yes"; then
8311 CXX="$CXX -Kthread"
8312 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008313 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008314
8315 posix_threads=yes
8316 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008317elif test "$ac_cv_pthread" = "yes"
8318then
8319 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008320 if test "$ac_cv_cxx_thread" = "yes"; then
8321 CXX="$CXX -pthread"
8322 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008323 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008324
8325 posix_threads=yes
8326 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008327else
8328 if test ! -z "$with_threads" -a -d "$with_threads"
8329 then LDFLAGS="$LDFLAGS -L$with_threads"
8330 fi
8331 if test ! -z "$withval" -a -d "$withval"
8332 then LDFLAGS="$LDFLAGS -L$withval"
8333 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008334
8335 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008336 # define _POSIX_THREADS in unistd.h. Some apparently don't
8337 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8339$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008341/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008342
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008343#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008344#ifdef _POSIX_THREADS
8345yes
8346#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008347
8348_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008349if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008350 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008351 unistd_defines_pthreads=yes
8352else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008353 unistd_defines_pthreads=no
8354fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008355rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008356
Matthias Kloseb9621712010-04-24 17:59:49 +00008357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8358$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008359
Matthias Kloseb9621712010-04-24 17:59:49 +00008360 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008361
Matthias Kloseb9621712010-04-24 17:59:49 +00008362 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8363if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8364 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008365
Matthias Kloseb9621712010-04-24 17:59:49 +00008366 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008367
Martin v. Löwis11437992002-04-12 09:54:03 +00008368
Matthias Kloseb9621712010-04-24 17:59:49 +00008369$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008370
8371 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008372 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008373else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008374
Matthias Kloseb9621712010-04-24 17:59:49 +00008375 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8376if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8377 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008378
Matthias Kloseb9621712010-04-24 17:59:49 +00008379 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008380
Martin v. Löwis11437992002-04-12 09:54:03 +00008381
Matthias Kloseb9621712010-04-24 17:59:49 +00008382$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008383
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008384 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008385else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008386
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008387 # Just looking for pthread_create in libpthread is not enough:
8388 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8389 # So we really have to include pthread.h, and then link.
8390 _libs=$LIBS
8391 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8393$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008395/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008396#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008397
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008398void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008399int
8400main ()
8401{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008402
8403pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008404 ;
8405 return 0;
8406}
8407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008408if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008409
Matthias Kloseb9621712010-04-24 17:59:49 +00008410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8411$as_echo "yes" >&6; }
8412 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008413
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008414 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008415 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008416else
Martin v. Löwis11437992002-04-12 09:54:03 +00008417
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008418 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008419 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8420if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8421 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008422
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008423 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008424 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008425else
Guido van Rossumad678af1998-10-02 14:42:15 +00008426
Matthias Kloseb9621712010-04-24 17:59:49 +00008427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8428$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8429if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8430 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008431else
Martin v. Löwis11437992002-04-12 09:54:03 +00008432 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008433LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008435/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008436
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008437/* Override any GCC internal prototype to avoid an error.
8438 Use char because int might match the return type of a GCC
8439 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008440#ifdef __cplusplus
8441extern "C"
8442#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008443char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008444int
8445main ()
8446{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008447return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008448 ;
8449 return 0;
8450}
8451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008452if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008453 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008454else
Matthias Kloseb9621712010-04-24 17:59:49 +00008455 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008456fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008457rm -f core conftest.err conftest.$ac_objext \
8458 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008459LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008460fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8462$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8463if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8464 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008465
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008466 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008467 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008468 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008469else
Greg Steinadf63d62000-07-05 10:38:09 +00008470
Matthias Kloseb9621712010-04-24 17:59:49 +00008471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8472$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8473if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8474 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008475else
Martin v. Löwis11437992002-04-12 09:54:03 +00008476 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008477LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008479/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008480
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008481/* Override any GCC internal prototype to avoid an error.
8482 Use char because int might match the return type of a GCC
8483 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008484#ifdef __cplusplus
8485extern "C"
8486#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008487char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008488int
8489main ()
8490{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008491return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008492 ;
8493 return 0;
8494}
8495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008496if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008497 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008498else
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008500fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008501rm -f core conftest.err conftest.$ac_objext \
8502 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008503LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008504fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8506$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8507if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8508 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008509
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008510 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008511 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008512 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008513else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008514
Matthias Kloseb9621712010-04-24 17:59:49 +00008515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8516$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8517if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8518 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008519else
Martin v. Löwis11437992002-04-12 09:54:03 +00008520 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008521LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008524
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008525/* Override any GCC internal prototype to avoid an error.
8526 Use char because int might match the return type of a GCC
8527 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008528#ifdef __cplusplus
8529extern "C"
8530#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008531char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008532int
8533main ()
8534{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008535return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008536 ;
8537 return 0;
8538}
8539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008540if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008541 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008542else
Matthias Kloseb9621712010-04-24 17:59:49 +00008543 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008544fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008545rm -f core conftest.err conftest.$ac_objext \
8546 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008547LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008548fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8550$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8551if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8552 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008553
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008554 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008555 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008556 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008557else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008558
Matthias Kloseb9621712010-04-24 17:59:49 +00008559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8560$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8561if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8562 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008563else
Martin v. Löwis11437992002-04-12 09:54:03 +00008564 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008565LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008567/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008568
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008569/* Override any GCC internal prototype to avoid an error.
8570 Use char because int might match the return type of a GCC
8571 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008572#ifdef __cplusplus
8573extern "C"
8574#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008575char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008576int
8577main ()
8578{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008579return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008580 ;
8581 return 0;
8582}
8583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008584if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008585 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008586else
Matthias Kloseb9621712010-04-24 17:59:49 +00008587 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008589rm -f core conftest.err conftest.$ac_objext \
8590 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008591LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8594$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8595if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8596 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008597
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008598 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008599 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008600 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008601else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008602
Martin v. Löwis130fb172001-07-19 11:00:41 +00008603 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008604fi
8605
Guido van Rossum627b2d71993-12-24 10:39:16 +00008606
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008607fi
8608
Guido van Rossum0be3e491997-05-22 20:33:33 +00008609fi
8610
Guido van Rossum49545951997-12-02 19:28:29 +00008611fi
8612
Guido van Rossumb93a8621998-05-07 13:27:32 +00008613fi
8614
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008615fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008616rm -f core conftest.err conftest.$ac_objext \
8617 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008618fi
8619
Martin v. Löwis11437992002-04-12 09:54:03 +00008620
8621fi
8622
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008623
Michael W. Hudson54241132001-12-07 15:38:26 +00008624
Matthias Kloseb9621712010-04-24 17:59:49 +00008625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8626$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8627if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8628 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008629else
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008631LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008633/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008634
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008635/* Override any GCC internal prototype to avoid an error.
8636 Use char because int might match the return type of a GCC
8637 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008638#ifdef __cplusplus
8639extern "C"
8640#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008641char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008642int
8643main ()
8644{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008645return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008646 ;
8647 return 0;
8648}
8649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008650if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008651 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008652else
Matthias Kloseb9621712010-04-24 17:59:49 +00008653 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008655rm -f core conftest.err conftest.$ac_objext \
8656 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008657LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008658fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8660$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8661if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8662 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008663
Martin v. Löwis130fb172001-07-19 11:00:41 +00008664 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008665 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008666 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008667fi
8668
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008669
Neal Norwitza978ab02002-11-02 16:58:05 +00008670 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8672$as_echo_n "checking for thr_create in -lthread... " >&6; }
8673if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8674 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008675else
Martin v. Löwis11437992002-04-12 09:54:03 +00008676 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008677LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008679/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008680
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008681/* Override any GCC internal prototype to avoid an error.
8682 Use char because int might match the return type of a GCC
8683 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008684#ifdef __cplusplus
8685extern "C"
8686#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008687char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008688int
8689main ()
8690{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008691return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008692 ;
8693 return 0;
8694}
8695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008696if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008697 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008698else
Matthias Kloseb9621712010-04-24 17:59:49 +00008699 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008701rm -f core conftest.err conftest.$ac_objext \
8702 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008703LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8706$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8707if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8708 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008709
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008710 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008711 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008712 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008713fi
8714
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008715 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008716
Martin v. Löwis130fb172001-07-19 11:00:41 +00008717 if test "$USE_THREAD_MODULE" != "#"
8718 then
8719 # If the above checks didn't disable threads, (at least) OSF1
8720 # needs this '-threads' argument during linking.
8721 case $ac_sys_system in
8722 OSF1) LDLAST=-threads;;
8723 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008724 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008725fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008726
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008727if test "$posix_threads" = "yes"; then
8728 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008729
Matthias Kloseb9621712010-04-24 17:59:49 +00008730$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008731
8732 fi
8733
8734 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8735 case $ac_sys_system/$ac_sys_release in
8736 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008737$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008738
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008739 ;;
8740 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008741$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008742
8743 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008744 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008745$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008746
8747 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008748 AIX/6)
8749$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8750
8751 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008752 esac
8753
Matthias Kloseb9621712010-04-24 17:59:49 +00008754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8755$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8756 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8757 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008758else
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008760 ac_cv_pthread_system_supported=no
8761else
Matthias Kloseb9621712010-04-24 17:59:49 +00008762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008763/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008764#include <pthread.h>
8765 void *foo(void *parm) {
8766 return NULL;
8767 }
8768 main() {
8769 pthread_attr_t attr;
8770 pthread_t id;
8771 if (pthread_attr_init(&attr)) exit(-1);
8772 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8773 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8774 exit(0);
8775 }
8776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008777if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008778 ac_cv_pthread_system_supported=yes
8779else
Matthias Kloseb9621712010-04-24 17:59:49 +00008780 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8783 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008784fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008785
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008786
Guido van Rossum627b2d71993-12-24 10:39:16 +00008787fi
8788
Matthias Kloseb9621712010-04-24 17:59:49 +00008789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8790$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008791 if test "$ac_cv_pthread_system_supported" = "yes"; then
8792
Matthias Kloseb9621712010-04-24 17:59:49 +00008793$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008794
8795 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008796 for ac_func in pthread_sigmask
8797do :
8798 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8799if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008800 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008801#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008802_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008803 case $ac_sys_system in
8804 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008805
Matthias Kloseb9621712010-04-24 17:59:49 +00008806$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008807
8808 ;;
8809 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008810fi
8811done
8812
8813fi
8814
8815
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008816# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008817
Matthias Kloseb9621712010-04-24 17:59:49 +00008818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8819$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008820# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008821if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008822 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008823 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8825$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008826 ipv6=no
8827 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008828 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8829$as_echo "yes" >&6; }
8830 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008831
8832 ipv6=yes
8833 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008834 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008835else
Martin v. Löwis11437992002-04-12 09:54:03 +00008836
Matthias Kloseb9621712010-04-24 17:59:49 +00008837 if test "$cross_compiling" = yes; 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: no" >&5
8840$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008841 ipv6=no
8842
8843else
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008845/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008846 /* AF_INET6 available check */
8847#include <sys/types.h>
8848#include <sys/socket.h>
8849main()
8850{
8851 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8852 exit(1);
8853 else
8854 exit(0);
8855}
8856
Martin v. Löwis11437992002-04-12 09:54:03 +00008857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008858if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008859
Matthias Kloseb9621712010-04-24 17:59:49 +00008860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8861$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008862 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008863
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008864else
Matthias Kloseb159a552010-04-25 21:00:44 +00008865
Matthias Kloseb9621712010-04-24 17:59:49 +00008866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8867$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008868 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008869
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008871rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8872 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008873fi
8874
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008875
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008876if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8878$as_echo_n "checking if RFC2553 API is available... " >&6; }
8879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008880/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008881
8882 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008883#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008884int
8885main ()
8886{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008887struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008888 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008889 ;
8890 return 0;
8891}
Matthias Kloseb159a552010-04-25 21:00:44 +00008892
Martin v. Löwis11437992002-04-12 09:54:03 +00008893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008894if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008895
8896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008897$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008898 ipv6=yes
8899
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008900else
Matthias Kloseb159a552010-04-25 21:00:44 +00008901
8902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008903$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008904 ipv6=no
8905
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008908fi
8909
8910if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008911 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008912
8913fi
8914
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008915fi
8916
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008917
8918ipv6type=unknown
8919ipv6lib=none
8920ipv6trylibc=no
8921
8922if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8924$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008925 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8926 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008927 case $i in
8928 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008930/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008931
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008932#include <netinet/in.h>
8933#ifdef IPV6_INRIA_VERSION
8934yes
8935#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008936_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008937if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008938 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008939 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008940fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008941rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008942
8943 ;;
8944 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008946/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008947
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008948#include <netinet/in.h>
8949#ifdef __KAME__
8950yes
8951#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008952_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008953if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008954 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008955 ipv6type=$i;
8956 ipv6lib=inet6
8957 ipv6libdir=/usr/local/v6/lib
8958 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008959fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008960rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008961
8962 ;;
8963 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008965/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008966
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008967#include <features.h>
8968#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8969yes
8970#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008971_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008972if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008973 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008974 ipv6type=$i;
8975 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008976fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008977rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008978
8979 ;;
8980 linux-inet6)
8981 if test -d /usr/inet6; then
8982 ipv6type=$i
8983 ipv6lib=inet6
8984 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008985 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008986 fi
8987 ;;
8988 solaris)
8989 if test -f /etc/netconfig; then
8990 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
8991 ipv6type=$i
8992 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008993 fi
8994 fi
8995 ;;
8996 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00008997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008998/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008999
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009000#include <sys/param.h>
9001#ifdef _TOSHIBA_INET6
9002yes
9003#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009004_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009005if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009006 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009007 ipv6type=$i;
9008 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009009 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009010fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009011rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009012
9013 ;;
9014 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009016/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009017
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009018#include </usr/local/v6/include/sys/v6config.h>
9019#ifdef __V6D__
9020yes
9021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009022_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009023if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009024 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009025 ipv6type=$i;
9026 ipv6lib=v6;
9027 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009028 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009029fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009030rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009031
9032 ;;
9033 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009035/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009036
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009037#include <sys/param.h>
9038#ifdef _ZETA_MINAMI_INET6
9039yes
9040#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009041_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009042if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009043 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009044 ipv6type=$i;
9045 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009046 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009047fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009048rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009049
9050 ;;
9051 esac
9052 if test "$ipv6type" != "unknown"; then
9053 break
9054 fi
9055 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9057$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009058fi
9059
9060if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9061 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9062 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9063 echo "using lib$ipv6lib"
9064 else
9065 if test $ipv6trylibc = "yes"; then
9066 echo "using libc"
9067 else
9068 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9069 echo "You need to fetch lib$ipv6lib.a from appropriate"
9070 echo 'ipv6 kit and compile beforehand.'
9071 exit 1
9072 fi
9073 fi
9074fi
9075
Matthias Kloseb9621712010-04-24 17:59:49 +00009076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9077$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009079/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009080
9081 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009082int
9083main ()
9084{
9085FSIORefNum fRef = 0
9086 ;
9087 return 0;
9088}
Matthias Kloseb159a552010-04-25 21:00:44 +00009089
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009091if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009092
Matthias Kloseb159a552010-04-25 21:00:44 +00009093
Matthias Kloseb9621712010-04-24 17:59:49 +00009094$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009095
Matthias Kloseb9621712010-04-24 17:59:49 +00009096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9097$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009098
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009099else
Matthias Kloseb159a552010-04-25 21:00:44 +00009100
Matthias Kloseb9621712010-04-24 17:59:49 +00009101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9102$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009103
9104fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9106
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009107# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9109$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009110
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009111# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009112if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009113 withval=$with_doc_strings;
9114fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009115
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009116
9117if test -z "$with_doc_strings"
9118then with_doc_strings="yes"
9119fi
9120if test "$with_doc_strings" != "no"
9121then
9122
Matthias Kloseb9621712010-04-24 17:59:49 +00009123$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009124
9125fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9127$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009128
Antoine Pitrou042b1282010-08-13 21:15:58 +00009129# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9131$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009133# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009134if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009135 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009136if test "$withval" != no
9137then
9138
Matthias Kloseb9621712010-04-24 17:59:49 +00009139$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009140
Matthias Kloseb9621712010-04-24 17:59:49 +00009141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9142$as_echo "yes" >&6; }
9143else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9144$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009145fi
9146else
Matthias Kloseb9621712010-04-24 17:59:49 +00009147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9148$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009149fi
9150
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009151
9152# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9154$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009155
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009156# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009157if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009158 withval=$with_pymalloc;
9159fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009160
Neil Schemenauera35c6882001-02-27 04:45:05 +00009161
Neil Schemenauer16c22972002-03-22 15:34:49 +00009162if test -z "$with_pymalloc"
9163then with_pymalloc="yes"
9164fi
9165if test "$with_pymalloc" != "no"
9166then
Martin v. Löwis11437992002-04-12 09:54:03 +00009167
Matthias Kloseb9621712010-04-24 17:59:49 +00009168$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009169
9170fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9172$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009173
Benjamin Peterson05159c42009-12-03 03:01:27 +00009174# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9176$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009177
9178# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009179if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009180 withval=$with_valgrind;
9181else
9182 with_valgrind=no
9183fi
9184
Matthias Kloseb9621712010-04-24 17:59:49 +00009185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9186$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009187if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009188 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9189if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009190
Matthias Kloseb9621712010-04-24 17:59:49 +00009191$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009192
9193else
Matthias Kloseb9621712010-04-24 17:59:49 +00009194 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009195
9196fi
9197
9198
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009199 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009200fi
9201
Barry Warsawef82cd72000-06-30 16:21:01 +00009202# Check for --with-wctype-functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9204$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009205
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009206# Check whether --with-wctype-functions was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009207if test "${with_wctype_functions+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009208 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009209if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009210then
9211
Matthias Kloseb9621712010-04-24 17:59:49 +00009212$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009213
Matthias Kloseb9621712010-04-24 17:59:49 +00009214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9215$as_echo "yes" >&6; }
9216else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9217$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009218fi
9219else
Matthias Kloseb9621712010-04-24 17:59:49 +00009220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9221$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009222fi
9223
Barry Warsawef82cd72000-06-30 16:21:01 +00009224
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009225# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009226
Guido van Rossum98935bf2001-09-05 19:13:16 +00009227DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009228
Guido van Rossume97ee181999-12-20 21:27:22 +00009229# the dlopen() function means we might want to use dynload_shlib.o. some
9230# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009231for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009232do :
9233 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9234if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009235 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009236#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009237_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009238
Guido van Rossume97ee181999-12-20 21:27:22 +00009239fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009240done
Guido van Rossume97ee181999-12-20 21:27:22 +00009241
Michael W. Hudson54241132001-12-07 15:38:26 +00009242
Guido van Rossume97ee181999-12-20 21:27:22 +00009243# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9244# loading of modules.
9245
Matthias Kloseb9621712010-04-24 17:59:49 +00009246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9247$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009248if test -z "$DYNLOADFILE"
9249then
9250 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009251 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9252 if test "$ac_cv_func_dlopen" = yes
9253 then DYNLOADFILE="dynload_shlib.o"
9254 else DYNLOADFILE="dynload_aix.o"
9255 fi
9256 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009257 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009258 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9259 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009260 *)
9261 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9262 # out any dynamic loading
9263 if test "$ac_cv_func_dlopen" = yes
9264 then DYNLOADFILE="dynload_shlib.o"
9265 else DYNLOADFILE="dynload_stub.o"
9266 fi
9267 ;;
9268 esac
9269fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9271$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009272if test "$DYNLOADFILE" != "dynload_stub.o"
9273then
Martin v. Löwis11437992002-04-12 09:54:03 +00009274
Matthias Kloseb9621712010-04-24 17:59:49 +00009275$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009276
9277fi
9278
Neil Schemenauer4e425612001-06-19 15:44:15 +00009279# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9280
Michael W. Hudson54241132001-12-07 15:38:26 +00009281
Matthias Kloseb9621712010-04-24 17:59:49 +00009282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9283$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009284if test -z "$MACHDEP_OBJS"
9285then
Jack Jansene578a632001-08-15 01:27:14 +00009286 MACHDEP_OBJS=$extra_machdep_objs
9287else
9288 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009289fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9291$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009292
Guido van Rossum627b2d71993-12-24 10:39:16 +00009293# checks for library functions
Martin v. Löwis823725e2008-03-24 13:39:54 +00009294for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9295 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009296 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009297 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009298 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009299 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009300 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009301 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9302 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009303 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009304 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009305 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009306 truncate uname unsetenv utimes waitpid wait3 wait4 \
9307 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009308do :
9309 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9310ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9311eval as_val=\$$as_ac_var
9312 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009313 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009314#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009315_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009316
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009317fi
9318done
9319
Michael W. Hudson54241132001-12-07 15:38:26 +00009320
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009321# For some functions, having a definition is not sufficient, since
9322# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9324$as_echo_n "checking for chroot... " >&6; }
9325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009326/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009327#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009328int
9329main ()
9330{
9331void *x=chroot
9332 ;
9333 return 0;
9334}
9335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009336if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009337
Matthias Kloseb9621712010-04-24 17:59:49 +00009338$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009339
Matthias Kloseb159a552010-04-25 21:00:44 +00009340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009341$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009342else
Matthias Kloseb9621712010-04-24 17:59:49 +00009343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9344$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009345
9346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9349$as_echo_n "checking for link... " >&6; }
9350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009351/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009352#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009353int
9354main ()
9355{
9356void *x=link
9357 ;
9358 return 0;
9359}
9360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009361if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009362
Matthias Kloseb9621712010-04-24 17:59:49 +00009363$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009364
Matthias Kloseb159a552010-04-25 21:00:44 +00009365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009366$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009367else
Matthias Kloseb9621712010-04-24 17:59:49 +00009368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9369$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009370
9371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9374$as_echo_n "checking for symlink... " >&6; }
9375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009376/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009377#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009378int
9379main ()
9380{
9381void *x=symlink
9382 ;
9383 return 0;
9384}
9385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009386if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009387
Matthias Kloseb9621712010-04-24 17:59:49 +00009388$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009389
Matthias Kloseb159a552010-04-25 21:00:44 +00009390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009391$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009392else
Matthias Kloseb9621712010-04-24 17:59:49 +00009393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9394$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009395
9396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9399$as_echo_n "checking for fchdir... " >&6; }
9400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009401/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009402#include <unistd.h>
9403int
9404main ()
9405{
9406void *x=fchdir
9407 ;
9408 return 0;
9409}
9410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009411if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009412
Matthias Kloseb9621712010-04-24 17:59:49 +00009413$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009414
Matthias Kloseb159a552010-04-25 21:00:44 +00009415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009416$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009417else
Matthias Kloseb9621712010-04-24 17:59:49 +00009418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9419$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009420
9421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9424$as_echo_n "checking for fsync... " >&6; }
9425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009426/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009427#include <unistd.h>
9428int
9429main ()
9430{
9431void *x=fsync
9432 ;
9433 return 0;
9434}
9435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009436if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009437
Matthias Kloseb9621712010-04-24 17:59:49 +00009438$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009439
Matthias Kloseb159a552010-04-25 21:00:44 +00009440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009441$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009442else
Matthias Kloseb9621712010-04-24 17:59:49 +00009443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9444$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009445
9446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9449$as_echo_n "checking for fdatasync... " >&6; }
9450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009451/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009452#include <unistd.h>
9453int
9454main ()
9455{
9456void *x=fdatasync
9457 ;
9458 return 0;
9459}
9460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009461if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009462
Matthias Kloseb9621712010-04-24 17:59:49 +00009463$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009464
Matthias Kloseb159a552010-04-25 21:00:44 +00009465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009466$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009467else
Matthias Kloseb9621712010-04-24 17:59:49 +00009468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9469$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009470
9471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9474$as_echo_n "checking for epoll... " >&6; }
9475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009476/* end confdefs.h. */
9477#include <sys/epoll.h>
9478int
9479main ()
9480{
9481void *x=epoll_create
9482 ;
9483 return 0;
9484}
9485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009486if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009487
Matthias Kloseb9621712010-04-24 17:59:49 +00009488$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009489
Matthias Kloseb159a552010-04-25 21:00:44 +00009490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009491$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009492else
Matthias Kloseb9621712010-04-24 17:59:49 +00009493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9494$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009495
9496fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9499$as_echo_n "checking for kqueue... " >&6; }
9500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009501/* end confdefs.h. */
9502
9503#include <sys/types.h>
9504#include <sys/event.h>
9505
9506int
9507main ()
9508{
9509int x=kqueue()
9510 ;
9511 return 0;
9512}
9513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009514if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009515
Matthias Kloseb9621712010-04-24 17:59:49 +00009516$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009517
Matthias Kloseb159a552010-04-25 21:00:44 +00009518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009519$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009520else
Matthias Kloseb9621712010-04-24 17:59:49 +00009521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9522$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009523
9524fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009526# On some systems (eg. FreeBSD 5), we would find a definition of the
9527# functions ctermid_r, setgroups in the library, but no prototype
9528# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9529# address to avoid compiler warnings and potential miscompilations
9530# because of the missing prototypes.
9531
Matthias Kloseb9621712010-04-24 17:59:49 +00009532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9533$as_echo_n "checking for ctermid_r... " >&6; }
9534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009535/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009536
Martin v. Löwisd5843682002-11-21 20:41:28 +00009537#include <stdio.h>
9538
Martin v. Löwisd5843682002-11-21 20:41:28 +00009539int
9540main ()
9541{
9542void* p = ctermid_r
9543 ;
9544 return 0;
9545}
9546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009547if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009548
Matthias Kloseb9621712010-04-24 17:59:49 +00009549$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009550
Matthias Kloseb159a552010-04-25 21:00:44 +00009551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009552$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009553else
Matthias Kloseb9621712010-04-24 17:59:49 +00009554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9555$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009556
9557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9559
Matthias Kloseb9621712010-04-24 17:59:49 +00009560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
9561$as_echo_n "checking for flock... " >&6; }
9562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009563/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009564
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009565#include <sys/file.h>
9566
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009567int
9568main ()
9569{
9570void* p = flock
9571 ;
9572 return 0;
9573}
9574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009575if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009576
Matthias Kloseb9621712010-04-24 17:59:49 +00009577$as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009578
Matthias Kloseb159a552010-04-25 21:00:44 +00009579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009580$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009581else
Matthias Kloseb9621712010-04-24 17:59:49 +00009582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9583$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009584
9585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9587
Matthias Kloseb9621712010-04-24 17:59:49 +00009588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9589$as_echo_n "checking for getpagesize... " >&6; }
9590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009591/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009592
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009593#include <unistd.h>
9594
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009595int
9596main ()
9597{
9598void* p = getpagesize
9599 ;
9600 return 0;
9601}
9602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009603if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009604
Matthias Kloseb9621712010-04-24 17:59:49 +00009605$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009606
Matthias Kloseb159a552010-04-25 21:00:44 +00009607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009608$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009609else
Matthias Kloseb9621712010-04-24 17:59:49 +00009610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9611$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009612
9613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009615
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009616for ac_prog in true
9617do
9618 # Extract the first word of "$ac_prog", so it can be a program name with args.
9619set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9621$as_echo_n "checking for $ac_word... " >&6; }
9622if test "${ac_cv_prog_TRUE+set}" = set; then :
9623 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009624else
9625 if test -n "$TRUE"; then
9626 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9627else
9628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9629for as_dir in $PATH
9630do
9631 IFS=$as_save_IFS
9632 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009633 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634 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 +00009635 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009636 $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 +00009637 break 2
9638 fi
9639done
Matthias Kloseb9621712010-04-24 17:59:49 +00009640 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009641IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009642
9643fi
9644fi
9645TRUE=$ac_cv_prog_TRUE
9646if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9648$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009649else
Matthias Kloseb9621712010-04-24 17:59:49 +00009650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9651$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009652fi
9653
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009654
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009655 test -n "$TRUE" && break
9656done
9657test -n "$TRUE" || TRUE="/bin/true"
9658
9659
Matthias Kloseb9621712010-04-24 17:59:49 +00009660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9661$as_echo_n "checking for inet_aton in -lc... " >&6; }
9662if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
9663 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009664else
9665 ac_check_lib_save_LIBS=$LIBS
9666LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009668/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009669
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009670/* Override any GCC internal prototype to avoid an error.
9671 Use char because int might match the return type of a GCC
9672 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009673#ifdef __cplusplus
9674extern "C"
9675#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009676char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009677int
9678main ()
9679{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009680return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009681 ;
9682 return 0;
9683}
9684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009685if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009686 ac_cv_lib_c_inet_aton=yes
9687else
Matthias Kloseb9621712010-04-24 17:59:49 +00009688 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009690rm -f core conftest.err conftest.$ac_objext \
9691 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009692LIBS=$ac_check_lib_save_LIBS
9693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9695$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
9696if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009697 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009698else
Matthias Kloseb9621712010-04-24 17:59:49 +00009699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9700$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
9701if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
9702 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009703else
9704 ac_check_lib_save_LIBS=$LIBS
9705LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009707/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009708
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009709/* Override any GCC internal prototype to avoid an error.
9710 Use char because int might match the return type of a GCC
9711 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009712#ifdef __cplusplus
9713extern "C"
9714#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009715char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009716int
9717main ()
9718{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009719return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009720 ;
9721 return 0;
9722}
9723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009724if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009725 ac_cv_lib_resolv_inet_aton=yes
9726else
Matthias Kloseb9621712010-04-24 17:59:49 +00009727 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009729rm -f core conftest.err conftest.$ac_objext \
9730 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009731LIBS=$ac_check_lib_save_LIBS
9732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9734$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
9735if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009736 cat >>confdefs.h <<_ACEOF
9737#define HAVE_LIBRESOLV 1
9738_ACEOF
9739
9740 LIBS="-lresolv $LIBS"
9741
9742fi
9743
9744
9745fi
9746
9747
Christian Heimesd0764e22007-12-04 15:00:33 +00009748# On Tru64, chflags seems to be present, but calling it will
9749# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9751$as_echo_n "checking for chflags... " >&6; }
9752if test "${ac_cv_have_chflags+set}" = set; then :
9753 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009754else
Matthias Kloseb9621712010-04-24 17:59:49 +00009755 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009756 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009757else
Matthias Kloseb9621712010-04-24 17:59:49 +00009758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009759/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009760[
Christian Heimesd0764e22007-12-04 15:00:33 +00009761#include <sys/stat.h>
9762#include <unistd.h>
9763int main(int argc, char*argv[])
9764{
9765 if(chflags(argv[0], 0) != 0)
9766 return 1;
9767 return 0;
9768}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009769]
Christian Heimesd0764e22007-12-04 15:00:33 +00009770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009771if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009772 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009773else
Matthias Kloseb9621712010-04-24 17:59:49 +00009774 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009776rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9777 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009778fi
9779
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009780
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9783$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009784if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009785 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
9786if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009787 ac_cv_have_chflags="yes"
9788else
9789 ac_cv_have_chflags="no"
9790fi
9791
9792fi
9793if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009794
Matthias Kloseb9621712010-04-24 17:59:49 +00009795$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009796
9797fi
9798
Matthias Kloseb9621712010-04-24 17:59:49 +00009799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9800$as_echo_n "checking for lchflags... " >&6; }
9801if test "${ac_cv_have_lchflags+set}" = set; then :
9802 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009803else
Matthias Kloseb9621712010-04-24 17:59:49 +00009804 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009805 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009806else
Matthias Kloseb9621712010-04-24 17:59:49 +00009807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009808/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009809[
Christian Heimesd0764e22007-12-04 15:00:33 +00009810#include <sys/stat.h>
9811#include <unistd.h>
9812int main(int argc, char*argv[])
9813{
9814 if(lchflags(argv[0], 0) != 0)
9815 return 1;
9816 return 0;
9817}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009818]
Christian Heimesd0764e22007-12-04 15:00:33 +00009819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009820if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009821 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009822else
Matthias Kloseb9621712010-04-24 17:59:49 +00009823 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009825rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9826 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009827fi
9828
9829
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9832$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009833if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009834 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
9835if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009836 ac_cv_have_lchflags="yes"
9837else
9838 ac_cv_have_lchflags="no"
9839fi
9840
9841fi
9842if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009843
Matthias Kloseb9621712010-04-24 17:59:49 +00009844$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009845
9846fi
9847
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009848case $ac_sys_system/$ac_sys_release in
9849Darwin/*)
9850 _CUR_CFLAGS="${CFLAGS}"
9851 _CUR_LDFLAGS="${LDFLAGS}"
9852 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9853 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9854 ;;
9855esac
9856
Matthias Kloseb9621712010-04-24 17:59:49 +00009857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9858$as_echo_n "checking for inflateCopy in -lz... " >&6; }
9859if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
9860 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009861else
9862 ac_check_lib_save_LIBS=$LIBS
9863LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009865/* end confdefs.h. */
9866
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009867/* Override any GCC internal prototype to avoid an error.
9868 Use char because int might match the return type of a GCC
9869 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009870#ifdef __cplusplus
9871extern "C"
9872#endif
9873char inflateCopy ();
9874int
9875main ()
9876{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009877return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009878 ;
9879 return 0;
9880}
9881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009882if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009883 ac_cv_lib_z_inflateCopy=yes
9884else
Matthias Kloseb9621712010-04-24 17:59:49 +00009885 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009887rm -f core conftest.err conftest.$ac_objext \
9888 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009889LIBS=$ac_check_lib_save_LIBS
9890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9892$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
9893if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009894
Matthias Kloseb9621712010-04-24 17:59:49 +00009895$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009896
9897fi
9898
9899
9900case $ac_sys_system/$ac_sys_release in
9901Darwin/*)
9902 CFLAGS="${_CUR_CFLAGS}"
9903 LDFLAGS="${_CUR_LDFLAGS}"
9904 ;;
9905esac
9906
Matthias Kloseb9621712010-04-24 17:59:49 +00009907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9908$as_echo_n "checking for hstrerror... " >&6; }
9909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009910/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009911
Martin v. Löwise9416172003-05-03 10:12:45 +00009912#include <netdb.h>
9913
Martin v. Löwise9416172003-05-03 10:12:45 +00009914int
9915main ()
9916{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009917void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009918 ;
9919 return 0;
9920}
9921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009922if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009923
Matthias Kloseb9621712010-04-24 17:59:49 +00009924$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009925
Matthias Kloseb159a552010-04-25 21:00:44 +00009926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009927$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009928else
Matthias Kloseb9621712010-04-24 17:59:49 +00009929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9930$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009931
9932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009933rm -f core conftest.err conftest.$ac_objext \
9934 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009935
Matthias Kloseb9621712010-04-24 17:59:49 +00009936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9937$as_echo_n "checking for inet_aton... " >&6; }
9938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009939/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009940
Martin v. Löwis86d66262006-02-17 08:40:11 +00009941#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009942#include <sys/socket.h>
9943#include <netinet/in.h>
9944#include <arpa/inet.h>
9945
Martin v. Löwise9416172003-05-03 10:12:45 +00009946int
9947main ()
9948{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009949void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009950 ;
9951 return 0;
9952}
9953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009954if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009955
Matthias Kloseb9621712010-04-24 17:59:49 +00009956$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009957
Matthias Kloseb159a552010-04-25 21:00:44 +00009958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009959$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009960else
Matthias Kloseb9621712010-04-24 17:59:49 +00009961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9962$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009963
9964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009965rm -f core conftest.err conftest.$ac_objext \
9966 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009967
Matthias Kloseb9621712010-04-24 17:59:49 +00009968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
9969$as_echo_n "checking for inet_pton... " >&6; }
9970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009971/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009972
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009973#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009974#include <sys/socket.h>
9975#include <netinet/in.h>
9976#include <arpa/inet.h>
9977
Martin v. Löwise9416172003-05-03 10:12:45 +00009978int
9979main ()
9980{
9981void* p = inet_pton
9982 ;
9983 return 0;
9984}
9985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009986if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009987
Matthias Kloseb9621712010-04-24 17:59:49 +00009988$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009989
Matthias Kloseb159a552010-04-25 21:00:44 +00009990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009991$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009992else
Matthias Kloseb9621712010-04-24 17:59:49 +00009993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9994$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009995
9996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +00009998
Martin v. Löwisd6640d42003-07-06 09:29:52 +00009999# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10001$as_echo_n "checking for setgroups... " >&6; }
10002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010003/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010004
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010005#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010006#ifdef HAVE_GRP_H
10007#include <grp.h>
10008#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010009
Martin v. Löwisd5843682002-11-21 20:41:28 +000010010int
10011main ()
10012{
10013void* p = setgroups
10014 ;
10015 return 0;
10016}
10017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010018if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010019
Matthias Kloseb9621712010-04-24 17:59:49 +000010020$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010021
Matthias Kloseb159a552010-04-25 21:00:44 +000010022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010023$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010024else
Matthias Kloseb9621712010-04-24 17:59:49 +000010025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10026$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010027
10028fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010030
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010031# check for openpty and forkpty
10032
10033for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010034do :
10035 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
10036if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010037 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010038#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010039_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010040
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010041else
Matthias Kloseb9621712010-04-24 17:59:49 +000010042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10043$as_echo_n "checking for openpty in -lutil... " >&6; }
10044if test "${ac_cv_lib_util_openpty+set}" = set; then :
10045 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010046else
Martin v. Löwis11437992002-04-12 09:54:03 +000010047 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010048LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010050/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010051
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010052/* Override any GCC internal prototype to avoid an error.
10053 Use char because int might match the return type of a GCC
10054 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010055#ifdef __cplusplus
10056extern "C"
10057#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010058char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010059int
10060main ()
10061{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010062return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010063 ;
10064 return 0;
10065}
10066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010067if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010068 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010069else
Matthias Kloseb9621712010-04-24 17:59:49 +000010070 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010072rm -f core conftest.err conftest.$ac_objext \
10073 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010074LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10077$as_echo "$ac_cv_lib_util_openpty" >&6; }
10078if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10079 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010080 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010081else
Matthias Kloseb9621712010-04-24 17:59:49 +000010082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10083$as_echo_n "checking for openpty in -lbsd... " >&6; }
10084if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
10085 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010086else
10087 ac_check_lib_save_LIBS=$LIBS
10088LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010090/* end confdefs.h. */
10091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010092/* Override any GCC internal prototype to avoid an error.
10093 Use char because int might match the return type of a GCC
10094 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010095#ifdef __cplusplus
10096extern "C"
10097#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010098char openpty ();
10099int
10100main ()
10101{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010102return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010103 ;
10104 return 0;
10105}
10106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010107if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010108 ac_cv_lib_bsd_openpty=yes
10109else
Matthias Kloseb9621712010-04-24 17:59:49 +000010110 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010111fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010112rm -f core conftest.err conftest.$ac_objext \
10113 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010114LIBS=$ac_check_lib_save_LIBS
10115fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10117$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10118if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10119 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010120 LIBS="$LIBS -lbsd"
10121fi
10122
10123
10124fi
10125
Fred Drake8cef4cf2000-06-28 16:40:38 +000010126
10127fi
10128done
10129
10130for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010131do :
10132 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10133if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010134 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010135#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010136_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010137
Fred Drake8cef4cf2000-06-28 16:40:38 +000010138else
Matthias Kloseb9621712010-04-24 17:59:49 +000010139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10140$as_echo_n "checking for forkpty in -lutil... " >&6; }
10141if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10142 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010143else
Martin v. Löwis11437992002-04-12 09:54:03 +000010144 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010145LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010148
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010149/* Override any GCC internal prototype to avoid an error.
10150 Use char because int might match the return type of a GCC
10151 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010152#ifdef __cplusplus
10153extern "C"
10154#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010155char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010156int
10157main ()
10158{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010159return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010160 ;
10161 return 0;
10162}
10163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010164if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010165 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010166else
Matthias Kloseb9621712010-04-24 17:59:49 +000010167 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010169rm -f core conftest.err conftest.$ac_objext \
10170 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010171LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10174$as_echo "$ac_cv_lib_util_forkpty" >&6; }
10175if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10176 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010177 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010178else
Matthias Kloseb9621712010-04-24 17:59:49 +000010179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10180$as_echo_n "checking for forkpty in -lbsd... " >&6; }
10181if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10182 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010183else
10184 ac_check_lib_save_LIBS=$LIBS
10185LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010187/* end confdefs.h. */
10188
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010189/* Override any GCC internal prototype to avoid an error.
10190 Use char because int might match the return type of a GCC
10191 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010192#ifdef __cplusplus
10193extern "C"
10194#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010195char forkpty ();
10196int
10197main ()
10198{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010199return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010200 ;
10201 return 0;
10202}
10203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010204if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010205 ac_cv_lib_bsd_forkpty=yes
10206else
Matthias Kloseb9621712010-04-24 17:59:49 +000010207 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010209rm -f core conftest.err conftest.$ac_objext \
10210 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010211LIBS=$ac_check_lib_save_LIBS
10212fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10214$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10215if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10216 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010217 LIBS="$LIBS -lbsd"
10218fi
10219
10220
10221fi
10222
Fred Drake8cef4cf2000-06-28 16:40:38 +000010223
10224fi
10225done
10226
Jack Jansendd19cf82001-12-06 22:36:17 +000010227
Christian Heimesb186d002008-03-18 15:15:01 +000010228# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010229for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010230do :
10231 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10232if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010233 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010234#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010235_ACEOF
10236
10237fi
10238done
10239
10240
Michael W. Hudson54241132001-12-07 15:38:26 +000010241# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010242for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010243do :
10244 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10245ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10246eval as_val=\$$as_ac_var
10247 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010248 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010249#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010250_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010251
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010252fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010253done
10254
Michael W. Hudson54241132001-12-07 15:38:26 +000010255
Christian Heimesb186d002008-03-18 15:15:01 +000010256for ac_func in dup2 getcwd strdup
Matthias Kloseb9621712010-04-24 17:59:49 +000010257do :
10258 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10259ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10260eval as_val=\$$as_ac_var
10261 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010262 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010263#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010264_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010265
Martin v. Löwis1142de32002-03-29 16:28:31 +000010266else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010267 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010268 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010269 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
10270 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010271esac
10272
Martin v. Löwis1142de32002-03-29 16:28:31 +000010273fi
10274done
10275
10276
10277for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010278do :
10279 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10280if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010281 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010282#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010285/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010286#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010287int
10288main ()
10289{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010290getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010291 ;
10292 return 0;
10293}
10294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010295if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010296
Matthias Kloseb9621712010-04-24 17:59:49 +000010297$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010298
Guido van Rossum627b2d71993-12-24 10:39:16 +000010299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010301
Guido van Rossum627b2d71993-12-24 10:39:16 +000010302fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010303done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010304
Jack Jansen150753c2003-03-29 22:07:47 +000010305for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010306do :
10307 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10308if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010309 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010310#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010313/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010314#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010315int
10316main ()
10317{
10318setpgrp(0,0);
10319 ;
10320 return 0;
10321}
10322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010323if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010324
Matthias Kloseb9621712010-04-24 17:59:49 +000010325$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010326
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010329
10330fi
10331done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010332
Thomas Wouters3a584202000-08-05 23:28:51 +000010333for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010334do :
10335 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10336if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010337 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010338#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010341/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010342#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010343int
10344main ()
10345{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010346gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010347 ;
10348 return 0;
10349}
10350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010351if ac_fn_c_try_compile "$LINENO"; then :
10352
Guido van Rossum627b2d71993-12-24 10:39:16 +000010353else
Skip Montanaro6dead952003-09-25 14:50:04 +000010354
Matthias Kloseb9621712010-04-24 17:59:49 +000010355$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010356
Martin v. Löwis11437992002-04-12 09:54:03 +000010357
Guido van Rossum627b2d71993-12-24 10:39:16 +000010358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010360
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010361fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010362done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010363
Michael W. Hudson54241132001-12-07 15:38:26 +000010364
Matthias Kloseb9621712010-04-24 17:59:49 +000010365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10366$as_echo_n "checking for major... " >&6; }
10367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010368/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010369
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010370#if defined(MAJOR_IN_MKDEV)
10371#include <sys/mkdev.h>
10372#elif defined(MAJOR_IN_SYSMACROS)
10373#include <sys/sysmacros.h>
10374#else
10375#include <sys/types.h>
10376#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010377
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010378int
10379main ()
10380{
10381
10382 makedev(major(0),minor(0));
10383
10384 ;
10385 return 0;
10386}
10387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010388if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010389
10390
Matthias Kloseb9621712010-04-24 17:59:49 +000010391$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010392
Matthias Kloseb9621712010-04-24 17:59:49 +000010393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10394$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010395
10396else
Skip Montanaro6dead952003-09-25 14:50:04 +000010397
Matthias Kloseb9621712010-04-24 17:59:49 +000010398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10399$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010400
10401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010402rm -f core conftest.err conftest.$ac_objext \
10403 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010404
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010405# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010406# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10408$as_echo_n "checking for getaddrinfo... " >&6; }
10409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010410/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010411
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010412#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010413#include <sys/socket.h>
10414#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010415#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010416
Martin v. Löwis11437992002-04-12 09:54:03 +000010417int
10418main ()
10419{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010420getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010421 ;
10422 return 0;
10423}
10424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010425if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010426 have_getaddrinfo=yes
10427else
Matthias Kloseb9621712010-04-24 17:59:49 +000010428 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010429fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010430rm -f core conftest.err conftest.$ac_objext \
10431 conftest$ac_exeext conftest.$ac_ext
10432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10433$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010434if test $have_getaddrinfo = yes
10435then
Matthias Kloseb9621712010-04-24 17:59:49 +000010436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10437$as_echo_n "checking getaddrinfo bug... " >&6; }
10438 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10439 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010440else
Matthias Kloseb9621712010-04-24 17:59:49 +000010441 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010442 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010443else
Matthias Kloseb9621712010-04-24 17:59:49 +000010444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010445/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010446
10447#include <sys/types.h>
10448#include <netdb.h>
10449#include <string.h>
10450#include <sys/socket.h>
10451#include <netinet/in.h>
10452
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010453int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010454{
10455 int passive, gaierr, inet4 = 0, inet6 = 0;
10456 struct addrinfo hints, *ai, *aitop;
10457 char straddr[INET6_ADDRSTRLEN], strport[16];
10458
10459 for (passive = 0; passive <= 1; passive++) {
10460 memset(&hints, 0, sizeof(hints));
10461 hints.ai_family = AF_UNSPEC;
10462 hints.ai_flags = passive ? AI_PASSIVE : 0;
10463 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010464 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010465 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10466 (void)gai_strerror(gaierr);
10467 goto bad;
10468 }
10469 for (ai = aitop; ai; ai = ai->ai_next) {
10470 if (ai->ai_addr == NULL ||
10471 ai->ai_addrlen == 0 ||
10472 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10473 straddr, sizeof(straddr), strport, sizeof(strport),
10474 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10475 goto bad;
10476 }
10477 switch (ai->ai_family) {
10478 case AF_INET:
10479 if (strcmp(strport, "54321") != 0) {
10480 goto bad;
10481 }
10482 if (passive) {
10483 if (strcmp(straddr, "0.0.0.0") != 0) {
10484 goto bad;
10485 }
10486 } else {
10487 if (strcmp(straddr, "127.0.0.1") != 0) {
10488 goto bad;
10489 }
10490 }
10491 inet4++;
10492 break;
10493 case AF_INET6:
10494 if (strcmp(strport, "54321") != 0) {
10495 goto bad;
10496 }
10497 if (passive) {
10498 if (strcmp(straddr, "::") != 0) {
10499 goto bad;
10500 }
10501 } else {
10502 if (strcmp(straddr, "::1") != 0) {
10503 goto bad;
10504 }
10505 }
10506 inet6++;
10507 break;
10508 case AF_UNSPEC:
10509 goto bad;
10510 break;
10511 default:
10512 /* another family support? */
10513 break;
10514 }
10515 }
10516 }
10517
10518 if (!(inet4 == 0 || inet4 == 2))
10519 goto bad;
10520 if (!(inet6 == 0 || inet6 == 2))
10521 goto bad;
10522
10523 if (aitop)
10524 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010525 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010526
10527 bad:
10528 if (aitop)
10529 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010530 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010531}
10532
Martin v. Löwis11437992002-04-12 09:54:03 +000010533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010534if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010535 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010536else
Matthias Kloseb9621712010-04-24 17:59:49 +000010537 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010538fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010539rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10540 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010542
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010543fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010544
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010546
Mark Dickinson2df5d282009-12-31 21:22:50 +000010547if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010548then
10549 if test $ipv6 = yes
10550 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010551 echo 'Fatal: You must get working getaddrinfo() function.'
10552 echo ' or you can specify "--disable-ipv6"'.
10553 exit 1
10554 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010555else
Martin v. Löwis11437992002-04-12 09:54:03 +000010556
Matthias Kloseb9621712010-04-24 17:59:49 +000010557$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010558
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010559fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010560for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010561do :
10562 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10563if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010564 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010565#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010566_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010567
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010568fi
10569done
10570
Michael W. Hudson54241132001-12-07 15:38:26 +000010571
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010572# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10574$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10575if test "${ac_cv_header_time+set}" = set; then :
10576 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010577else
Matthias Kloseb9621712010-04-24 17:59:49 +000010578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010579/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010580#include <sys/types.h>
10581#include <sys/time.h>
10582#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010583
Martin v. Löwis11437992002-04-12 09:54:03 +000010584int
10585main ()
10586{
10587if ((struct tm *) 0)
10588return 0;
10589 ;
10590 return 0;
10591}
10592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010593if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010594 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010595else
Matthias Kloseb9621712010-04-24 17:59:49 +000010596 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010599fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10601$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010602if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010603
Matthias Kloseb9621712010-04-24 17:59:49 +000010604$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010605
10606fi
10607
Matthias Kloseb9621712010-04-24 17:59:49 +000010608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10609$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10610if test "${ac_cv_struct_tm+set}" = set; then :
10611 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010612else
Matthias Kloseb9621712010-04-24 17:59:49 +000010613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010614/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010615#include <sys/types.h>
10616#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010617
Martin v. Löwis11437992002-04-12 09:54:03 +000010618int
10619main ()
10620{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010621struct tm tm;
10622 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010623 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010624 ;
10625 return 0;
10626}
10627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010628if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010629 ac_cv_struct_tm=time.h
10630else
Matthias Kloseb9621712010-04-24 17:59:49 +000010631 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010634fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10636$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010637if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010638
Matthias Kloseb9621712010-04-24 17:59:49 +000010639$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010640
10641fi
10642
Matthias Kloseb9621712010-04-24 17:59:49 +000010643ac_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 +000010644#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010645
Matthias Kloseb9621712010-04-24 17:59:49 +000010646"
10647if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010648
10649cat >>confdefs.h <<_ACEOF
10650#define HAVE_STRUCT_TM_TM_ZONE 1
10651_ACEOF
10652
10653
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010654fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010655
Martin v. Löwis11437992002-04-12 09:54:03 +000010656if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10657
Matthias Kloseb9621712010-04-24 17:59:49 +000010658$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010659
10660else
Matthias Kloseb9621712010-04-24 17:59:49 +000010661 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10662"
10663if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10664 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010665else
Matthias Kloseb9621712010-04-24 17:59:49 +000010666 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010667fi
10668
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010669cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010670#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010671_ACEOF
10672
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10674$as_echo_n "checking for tzname... " >&6; }
10675if test "${ac_cv_var_tzname+set}" = set; then :
10676 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010677else
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010679/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010680#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010681#if !HAVE_DECL_TZNAME
10682extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010683#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010684
Martin v. Löwis11437992002-04-12 09:54:03 +000010685int
10686main ()
10687{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010688return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010689 ;
10690 return 0;
10691}
10692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010693if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010694 ac_cv_var_tzname=yes
10695else
Matthias Kloseb9621712010-04-24 17:59:49 +000010696 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010698rm -f core conftest.err conftest.$ac_objext \
10699 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010700fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10702$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010703 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010704
Matthias Kloseb9621712010-04-24 17:59:49 +000010705$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010706
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010707 fi
10708fi
10709
Matthias Kloseb9621712010-04-24 17:59:49 +000010710ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10711if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010712
10713cat >>confdefs.h <<_ACEOF
10714#define HAVE_STRUCT_STAT_ST_RDEV 1
10715_ACEOF
10716
10717
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010718fi
10719
Matthias Kloseb9621712010-04-24 17:59:49 +000010720ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10721if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010722
Martin v. Löwis11437992002-04-12 09:54:03 +000010723cat >>confdefs.h <<_ACEOF
10724#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10725_ACEOF
10726
10727
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010728fi
10729
Matthias Kloseb9621712010-04-24 17:59:49 +000010730ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10731if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010732
10733cat >>confdefs.h <<_ACEOF
10734#define HAVE_STRUCT_STAT_ST_FLAGS 1
10735_ACEOF
10736
10737
10738fi
10739
Matthias Kloseb9621712010-04-24 17:59:49 +000010740ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10741if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010742
10743cat >>confdefs.h <<_ACEOF
10744#define HAVE_STRUCT_STAT_ST_GEN 1
10745_ACEOF
10746
10747
10748fi
10749
Matthias Kloseb9621712010-04-24 17:59:49 +000010750ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10751if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010752
10753cat >>confdefs.h <<_ACEOF
10754#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10755_ACEOF
10756
10757
10758fi
10759
Matthias Kloseb9621712010-04-24 17:59:49 +000010760ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10761if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010762
Martin v. Löwis11437992002-04-12 09:54:03 +000010763cat >>confdefs.h <<_ACEOF
10764#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10765_ACEOF
10766
10767
Matthias Kloseb9621712010-04-24 17:59:49 +000010768$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010769
10770else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010771 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010772 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010773 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10774 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010775esac
10776
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010777fi
10778
Michael W. Hudson54241132001-12-07 15:38:26 +000010779
Martin v. Löwis11437992002-04-12 09:54:03 +000010780
Matthias Kloseb9621712010-04-24 17:59:49 +000010781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10782$as_echo_n "checking for time.h that defines altzone... " >&6; }
10783if test "${ac_cv_header_time_altzone+set}" = set; then :
10784 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010785else
Matthias Kloseb159a552010-04-25 21:00:44 +000010786
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010788/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010789#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010790int
10791main ()
10792{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010793return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010794 ;
10795 return 0;
10796}
10797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010798if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010799 ac_cv_header_time_altzone=yes
10800else
Matthias Kloseb9621712010-04-24 17:59:49 +000010801 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010804
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010805fi
10806
Matthias Kloseb9621712010-04-24 17:59:49 +000010807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10808$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010809if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010810
Matthias Kloseb9621712010-04-24 17:59:49 +000010811$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010812
10813fi
10814
Guido van Rossumda88dad1995-01-26 00:46:29 +000010815was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10817$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010819/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010820
10821#include <sys/types.h>
10822#include <sys/select.h>
10823#include <sys/time.h>
10824
Martin v. Löwis11437992002-04-12 09:54:03 +000010825int
10826main ()
10827{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010828;
Martin v. Löwis11437992002-04-12 09:54:03 +000010829 ;
10830 return 0;
10831}
10832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010833if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010834
10835
Matthias Kloseb9621712010-04-24 17:59:49 +000010836$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010837
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010838 was_it_defined=yes
10839
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10843$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010844
Matthias Kloseb9621712010-04-24 17:59:49 +000010845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10846$as_echo_n "checking for addrinfo... " >&6; }
10847if test "${ac_cv_struct_addrinfo+set}" = set; then :
10848 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010849else
Matthias Kloseb9621712010-04-24 17:59:49 +000010850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010851/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010852#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010853int
10854main ()
10855{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010856struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010857 ;
10858 return 0;
10859}
10860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010861if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010862 ac_cv_struct_addrinfo=yes
10863else
Matthias Kloseb9621712010-04-24 17:59:49 +000010864 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10867fi
10868
Matthias Kloseb9621712010-04-24 17:59:49 +000010869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10870$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010871if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010872
Matthias Kloseb9621712010-04-24 17:59:49 +000010873$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010874
10875fi
10876
Matthias Kloseb9621712010-04-24 17:59:49 +000010877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10878$as_echo_n "checking for sockaddr_storage... " >&6; }
10879if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
10880 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010881else
Matthias Kloseb9621712010-04-24 17:59:49 +000010882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010883/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010884
10885# include <sys/types.h>
10886# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010887int
10888main ()
10889{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010890struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010891 ;
10892 return 0;
10893}
10894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010895if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010896 ac_cv_struct_sockaddr_storage=yes
10897else
Matthias Kloseb9621712010-04-24 17:59:49 +000010898 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010899fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10901fi
10902
Matthias Kloseb9621712010-04-24 17:59:49 +000010903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10904$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010905if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010906
Matthias Kloseb9621712010-04-24 17:59:49 +000010907$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010908
10909fi
10910
Guido van Rossum627b2d71993-12-24 10:39:16 +000010911# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010912
Matthias Kloseb9621712010-04-24 17:59:49 +000010913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10914$as_echo_n "checking whether char is unsigned... " >&6; }
10915if test "${ac_cv_c_char_unsigned+set}" = set; then :
10916 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010917else
Matthias Kloseb9621712010-04-24 17:59:49 +000010918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010919/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010920$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010921int
10922main ()
10923{
10924static int test_array [1 - 2 * !(((char) -1) < 0)];
10925test_array [0] = 0
10926
10927 ;
10928 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010929}
Martin v. Löwis11437992002-04-12 09:54:03 +000010930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010931if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010932 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010933else
Matthias Kloseb9621712010-04-24 17:59:49 +000010934 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010937fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10939$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010940if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010941 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010942
10943fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010944
Matthias Kloseb9621712010-04-24 17:59:49 +000010945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10946$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10947if test "${ac_cv_c_const+set}" = set; then :
10948 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010949else
Matthias Kloseb9621712010-04-24 17:59:49 +000010950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010951/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010952
Martin v. Löwis11437992002-04-12 09:54:03 +000010953int
10954main ()
10955{
10956/* FIXME: Include the comments suggested by Paul. */
10957#ifndef __cplusplus
10958 /* Ultrix mips cc rejects this. */
10959 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010960 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000010961 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010962 char const *const *pcpcc;
10963 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010964 /* NEC SVR4.0.2 mips cc rejects this. */
10965 struct point {int x, y;};
10966 static struct point const zero = {0,0};
10967 /* AIX XL C 1.02.0.0 rejects this.
10968 It does not let you subtract one const X* pointer from another in
10969 an arm of an if-expression whose if-part is not a constant
10970 expression */
10971 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010972 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010973 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010974 ++pcpcc;
10975 ppc = (char**) pcpcc;
10976 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010977 { /* SCO 3.2v4 cc rejects this. */
10978 char *t;
10979 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010980
Martin v. Löwis11437992002-04-12 09:54:03 +000010981 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010982 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010983 }
10984 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
10985 int x[] = {25, 17};
10986 const int *foo = &x[0];
10987 ++foo;
10988 }
10989 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10990 typedef const int *iptr;
10991 iptr p = 0;
10992 ++p;
10993 }
10994 { /* AIX XL C 1.02.0.0 rejects this saying
10995 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10996 struct s { int j; const int *ap[3]; };
10997 struct s *b; b->j = 5;
10998 }
10999 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11000 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011001 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011002 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011003 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011004#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011005
Martin v. Löwis11437992002-04-12 09:54:03 +000011006 ;
11007 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011008}
Martin v. Löwis11437992002-04-12 09:54:03 +000011009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011010if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011011 ac_cv_c_const=yes
11012else
Matthias Kloseb9621712010-04-24 17:59:49 +000011013 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011016fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11018$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011019if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011020
Matthias Kloseb9621712010-04-24 17:59:49 +000011021$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011022
11023fi
11024
Michael W. Hudson54241132001-12-07 15:38:26 +000011025
Guido van Rossumda88dad1995-01-26 00:46:29 +000011026works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11028$as_echo_n "checking for working volatile... " >&6; }
11029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011030/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011031
Martin v. Löwis11437992002-04-12 09:54:03 +000011032int
11033main ()
11034{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011035volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011036 ;
11037 return 0;
11038}
11039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011040if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011041 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011042else
Skip Montanaro6dead952003-09-25 14:50:04 +000011043
Matthias Kloseb9621712010-04-24 17:59:49 +000011044$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011045
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011046
Guido van Rossum627b2d71993-12-24 10:39:16 +000011047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11050$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011051
Guido van Rossumda88dad1995-01-26 00:46:29 +000011052works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11054$as_echo_n "checking for working signed char... " >&6; }
11055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011056/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011057
Martin v. Löwis11437992002-04-12 09:54:03 +000011058int
11059main ()
11060{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011061signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011062 ;
11063 return 0;
11064}
11065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011066if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011067 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011068else
Skip Montanaro6dead952003-09-25 14:50:04 +000011069
Matthias Kloseb9621712010-04-24 17:59:49 +000011070$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011071
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011072
Guido van Rossum7f43da71994-08-01 12:15:30 +000011073fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11076$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011077
Guido van Rossumda88dad1995-01-26 00:46:29 +000011078have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11080$as_echo_n "checking for prototypes... " >&6; }
11081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011082/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011083int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011084int
11085main ()
11086{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011087return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011088 ;
11089 return 0;
11090}
11091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011092if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011093
Matthias Kloseb9621712010-04-24 17:59:49 +000011094$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011095
Matthias Kloseb159a552010-04-25 21:00:44 +000011096 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11100$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011101
Guido van Rossumda88dad1995-01-26 00:46:29 +000011102works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11104$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011106/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011107
11108#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011109int foo(int x, ...) {
11110 va_list va;
11111 va_start(va, x);
11112 va_arg(va, int);
11113 va_arg(va, char *);
11114 va_arg(va, double);
11115 return 0;
11116}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011117
Martin v. Löwis11437992002-04-12 09:54:03 +000011118int
11119main ()
11120{
Guido van Rossum90eea071996-08-30 20:58:57 +000011121return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011122 ;
11123 return 0;
11124}
11125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011126if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011127
11128
Matthias Kloseb9621712010-04-24 17:59:49 +000011129$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011130
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011131 works=yes
11132
Guido van Rossum627b2d71993-12-24 10:39:16 +000011133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11136$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011137
Martin v. Löwisd6320502004-08-12 13:45:08 +000011138# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11140$as_echo_n "checking for socketpair... " >&6; }
11141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011142/* end confdefs.h. */
11143
11144#include <sys/types.h>
11145#include <sys/socket.h>
11146
11147int
11148main ()
11149{
11150void *x=socketpair
11151 ;
11152 return 0;
11153}
11154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011155if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011156
Matthias Kloseb9621712010-04-24 17:59:49 +000011157$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011158
Matthias Kloseb159a552010-04-25 21:00:44 +000011159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011160$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011161else
Matthias Kloseb9621712010-04-24 17:59:49 +000011162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11163$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011164
11165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011167
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011168# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11170$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011172/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011173#include <sys/types.h>
11174#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011175int
11176main ()
11177{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011178struct sockaddr x;
11179x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011180 ;
11181 return 0;
11182}
11183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011184if ac_fn_c_try_compile "$LINENO"; then :
11185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11186$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011187
Matthias Kloseb9621712010-04-24 17:59:49 +000011188$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011189
11190else
Matthias Kloseb9621712010-04-24 17:59:49 +000011191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11192$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011193
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011196
Guido van Rossumda88dad1995-01-26 00:46:29 +000011197va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11199$as_echo_n "checking whether va_list is an array... " >&6; }
11200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011201/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011202
11203#ifdef HAVE_STDARG_PROTOTYPES
11204#include <stdarg.h>
11205#else
11206#include <varargs.h>
11207#endif
11208
Martin v. Löwis11437992002-04-12 09:54:03 +000011209int
11210main ()
11211{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011212va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011213 ;
11214 return 0;
11215}
11216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011217if ac_fn_c_try_compile "$LINENO"; then :
11218
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011219else
Skip Montanaro6dead952003-09-25 14:50:04 +000011220
Martin v. Löwis11437992002-04-12 09:54:03 +000011221
Matthias Kloseb9621712010-04-24 17:59:49 +000011222$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011223
Guido van Rossumda88dad1995-01-26 00:46:29 +000011224 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011225
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11229$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011230
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011231# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011232
11233
Matthias Kloseb9621712010-04-24 17:59:49 +000011234ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11235if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011236
Matthias Kloseb9621712010-04-24 17:59:49 +000011237 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011238
Matthias Kloseb9621712010-04-24 17:59:49 +000011239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11240$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011241 OLD_CFLAGS=$CFLAGS
11242 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011244/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011245
11246# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011247
Martin v. Löwis11437992002-04-12 09:54:03 +000011248int
11249main ()
11250{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011251
11252 char *name;
11253 struct hostent *he, *res;
11254 char buffer[2048];
11255 int buflen = 2048;
11256 int h_errnop;
11257
11258 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011259
11260 ;
11261 return 0;
11262}
11263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011264if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011265
Matthias Kloseb9621712010-04-24 17:59:49 +000011266 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011267
Martin v. Löwis11437992002-04-12 09:54:03 +000011268
Matthias Kloseb9621712010-04-24 17:59:49 +000011269$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011270
Matthias Kloseb9621712010-04-24 17:59:49 +000011271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11272$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011273
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011274else
Skip Montanaro6dead952003-09-25 14:50:04 +000011275
Matthias Kloseb9621712010-04-24 17:59:49 +000011276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11277$as_echo "no" >&6; }
11278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11279$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011281/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011282
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011283# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011284
Martin v. Löwis11437992002-04-12 09:54:03 +000011285int
11286main ()
11287{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011288
11289 char *name;
11290 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011291 char buffer[2048];
11292 int buflen = 2048;
11293 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011294
Matthias Kloseb159a552010-04-25 21:00:44 +000011295 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011296
11297 ;
11298 return 0;
11299}
11300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011301if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011302
Matthias Kloseb9621712010-04-24 17:59:49 +000011303 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011304
Martin v. Löwis11437992002-04-12 09:54:03 +000011305
Matthias Kloseb159a552010-04-25 21:00:44 +000011306$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011307
Matthias Kloseb9621712010-04-24 17:59:49 +000011308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11309$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011310
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011311else
Skip Montanaro6dead952003-09-25 14:50:04 +000011312
Matthias Kloseb9621712010-04-24 17:59:49 +000011313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11314$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11316$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11318/* end confdefs.h. */
11319
11320# include <netdb.h>
11321
11322int
11323main ()
11324{
11325
11326 char *name;
11327 struct hostent *he;
11328 struct hostent_data data;
11329
11330 (void) gethostbyname_r(name, he, &data);
11331
11332 ;
11333 return 0;
11334}
11335_ACEOF
11336if ac_fn_c_try_compile "$LINENO"; then :
11337
11338 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11339
11340
11341$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11342
11343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11344$as_echo "yes" >&6; }
11345
11346else
11347
11348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11349$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011350
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011353
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011356
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011359 CFLAGS=$OLD_CFLAGS
11360
11361else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011362
Matthias Kloseb9621712010-04-24 17:59:49 +000011363 for ac_func in gethostbyname
11364do :
11365 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11366if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011367 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011368#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011369_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011370
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011371fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011372done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011373
Michael W. Hudson54241132001-12-07 15:38:26 +000011374
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011375fi
11376
Michael W. Hudson54241132001-12-07 15:38:26 +000011377
11378
11379
11380
11381
11382
Guido van Rossum627b2d71993-12-24 10:39:16 +000011383# checks for system services
11384# (none yet)
11385
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011386# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011387ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11388if test "x$ac_cv_func___fpu_control" = x""yes; then :
11389
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011390else
Matthias Kloseb9621712010-04-24 17:59:49 +000011391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11392$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11393if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11394 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011395else
Martin v. Löwis11437992002-04-12 09:54:03 +000011396 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011397LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011399/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011400
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011401/* Override any GCC internal prototype to avoid an error.
11402 Use char because int might match the return type of a GCC
11403 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011404#ifdef __cplusplus
11405extern "C"
11406#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011407char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011408int
11409main ()
11410{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011411return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011412 ;
11413 return 0;
11414}
11415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011416if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011417 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011418else
Matthias Kloseb9621712010-04-24 17:59:49 +000011419 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011421rm -f core conftest.err conftest.$ac_objext \
11422 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011423LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011424fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11426$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11427if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011428 cat >>confdefs.h <<_ACEOF
11429#define HAVE_LIBIEEE 1
11430_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011431
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011432 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011433
Guido van Rossum627b2d71993-12-24 10:39:16 +000011434fi
11435
Michael W. Hudson54241132001-12-07 15:38:26 +000011436
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011437fi
11438
Michael W. Hudson54241132001-12-07 15:38:26 +000011439
Guido van Rossum7f253911997-05-09 02:42:48 +000011440# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11442$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011444# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011445if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011446 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011447if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011448then
11449
Matthias Kloseb9621712010-04-24 17:59:49 +000011450$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011451
Matthias Kloseb9621712010-04-24 17:59:49 +000011452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11453$as_echo "yes" >&6; }
11454else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11455$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011456fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011457else
Matthias Kloseb9621712010-04-24 17:59:49 +000011458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11459$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011460fi
11461
Guido van Rossum7f253911997-05-09 02:42:48 +000011462
Guido van Rossum7f43da71994-08-01 12:15:30 +000011463# check for --with-libm=...
11464
Guido van Rossum563e7081996-09-10 18:20:48 +000011465case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011466Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011467*) LIBM=-lm
11468esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11470$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011471
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011472# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011473if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011474 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011475if test "$withval" = no
11476then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11478$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011479elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011480then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11482$as_echo "set LIBM=\"$withval\"" >&6; }
11483else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011484fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011485else
Matthias Kloseb9621712010-04-24 17:59:49 +000011486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11487$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011488fi
11489
Guido van Rossum7f43da71994-08-01 12:15:30 +000011490
11491# check for --with-libc=...
11492
Matthias Kloseb9621712010-04-24 17:59:49 +000011493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11494$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011495
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011497if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011498 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011499if test "$withval" = no
11500then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11502$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011503elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011504then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11506$as_echo "set LIBC=\"$withval\"" >&6; }
11507else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011508fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011509else
Matthias Kloseb9621712010-04-24 17:59:49 +000011510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11511$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011512fi
11513
Guido van Rossum7f43da71994-08-01 12:15:30 +000011514
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011515# **************************************************
11516# * Check for various properties of floating point *
11517# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011518
Matthias Kloseb9621712010-04-24 17:59:49 +000011519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11520$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11521if test "${ac_cv_little_endian_double+set}" = set; then :
11522 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011523else
11524
Matthias Kloseb9621712010-04-24 17:59:49 +000011525if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011526 ac_cv_little_endian_double=no
11527else
Matthias Kloseb9621712010-04-24 17:59:49 +000011528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011529/* end confdefs.h. */
11530
11531#include <string.h>
11532int main() {
11533 double x = 9006104071832581.0;
11534 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11535 return 0;
11536 else
11537 return 1;
11538}
11539
11540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011541if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011542 ac_cv_little_endian_double=yes
11543else
Matthias Kloseb9621712010-04-24 17:59:49 +000011544 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011545fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011546rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11547 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011548fi
11549
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011550fi
11551
Matthias Kloseb9621712010-04-24 17:59:49 +000011552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11553$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011554if test "$ac_cv_little_endian_double" = yes
11555then
11556
Matthias Kloseb9621712010-04-24 17:59:49 +000011557$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011558
11559fi
11560
Matthias Kloseb9621712010-04-24 17:59:49 +000011561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11562$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11563if test "${ac_cv_big_endian_double+set}" = set; then :
11564 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011565else
11566
Matthias Kloseb9621712010-04-24 17:59:49 +000011567if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011568 ac_cv_big_endian_double=no
11569else
Matthias Kloseb9621712010-04-24 17:59:49 +000011570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011571/* end confdefs.h. */
11572
11573#include <string.h>
11574int main() {
11575 double x = 9006104071832581.0;
11576 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11577 return 0;
11578 else
11579 return 1;
11580}
11581
11582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011583if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011584 ac_cv_big_endian_double=yes
11585else
Matthias Kloseb9621712010-04-24 17:59:49 +000011586 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11589 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011590fi
11591
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011592fi
11593
Matthias Kloseb9621712010-04-24 17:59:49 +000011594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11595$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011596if test "$ac_cv_big_endian_double" = yes
11597then
11598
Matthias Kloseb9621712010-04-24 17:59:49 +000011599$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011600
11601fi
11602
11603# Some ARM platforms use a mixed-endian representation for doubles.
11604# While Python doesn't currently have full support for these platforms
11605# (see e.g., issue 1762561), we can at least make sure that float <-> string
11606# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11608$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11609if test "${ac_cv_mixed_endian_double+set}" = set; then :
11610 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011611else
11612
Matthias Kloseb9621712010-04-24 17:59:49 +000011613if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011614 ac_cv_mixed_endian_double=no
11615else
Matthias Kloseb9621712010-04-24 17:59:49 +000011616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011617/* end confdefs.h. */
11618
11619#include <string.h>
11620int main() {
11621 double x = 9006104071832581.0;
11622 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11623 return 0;
11624 else
11625 return 1;
11626}
11627
11628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011629if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011630 ac_cv_mixed_endian_double=yes
11631else
Matthias Kloseb9621712010-04-24 17:59:49 +000011632 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011633fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011634rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11635 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011636fi
11637
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011638fi
11639
Matthias Kloseb9621712010-04-24 17:59:49 +000011640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11641$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011642if test "$ac_cv_mixed_endian_double" = yes
11643then
11644
Matthias Kloseb9621712010-04-24 17:59:49 +000011645$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011646
11647fi
11648
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011649# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011650# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011651# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011652# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011653# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011654# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011655
11656# This inline assembler syntax may also work for suncc and icc,
11657# so we try it on all platforms.
11658
Matthias Kloseb9621712010-04-24 17:59:49 +000011659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11660$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011662/* end confdefs.h. */
11663
11664int
11665main ()
11666{
11667
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011668 unsigned short cw;
11669 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11670 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011671
11672 ;
11673 return 0;
11674}
11675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011676if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011677 have_gcc_asm_for_x87=yes
11678else
Matthias Kloseb9621712010-04-24 17:59:49 +000011679 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011680fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11683$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011684if test "$have_gcc_asm_for_x87" = yes
11685then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011686
Matthias Kloseb9621712010-04-24 17:59:49 +000011687$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011688
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011689fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011690
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011691# Detect whether system arithmetic is subject to x87-style double
11692# rounding issues. The result of this test has little meaning on non
11693# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11694# mode is round-to-nearest and double rounding issues are present, and
11695# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11697$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011698# $BASECFLAGS may affect the result
11699ac_save_cc="$CC"
11700CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011701if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011702 ac_cv_x87_double_rounding=no
11703else
Matthias Kloseb9621712010-04-24 17:59:49 +000011704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011705/* end confdefs.h. */
11706
11707#include <stdlib.h>
11708#include <math.h>
11709int main() {
11710 volatile double x, y, z;
11711 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11712 x = 0.99999999999999989; /* 1-2**-53 */
11713 y = 1./x;
11714 if (y != 1.)
11715 exit(0);
11716 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11717 x = 1e16;
11718 y = 2.99999;
11719 z = x + y;
11720 if (z != 1e16+4.)
11721 exit(0);
11722 /* both tests show evidence of double rounding */
11723 exit(1);
11724}
11725
11726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011727if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011728 ac_cv_x87_double_rounding=no
11729else
Matthias Kloseb9621712010-04-24 17:59:49 +000011730 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011731fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11733 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011734fi
11735
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011736CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11738$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011739if test "$ac_cv_x87_double_rounding" = yes
11740then
11741
Matthias Kloseb9621712010-04-24 17:59:49 +000011742$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011743
11744fi
11745
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011746# ************************************
11747# * Check for mathematical functions *
11748# ************************************
11749
11750LIBS_SAVE=$LIBS
11751LIBS="$LIBS $LIBM"
11752
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011753# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11754# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11756$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
11757if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
11758 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011759else
11760
Matthias Kloseb9621712010-04-24 17:59:49 +000011761if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011762 ac_cv_tanh_preserves_zero_sign=no
11763else
Matthias Kloseb9621712010-04-24 17:59:49 +000011764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011765/* end confdefs.h. */
11766
11767#include <math.h>
11768#include <stdlib.h>
11769int main() {
11770 /* return 0 if either negative zeros don't exist
11771 on this platform or if negative zeros exist
11772 and tanh(-0.) == -0. */
11773 if (atan2(0., -1.) == atan2(-0., -1.) ||
11774 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11775 else exit(1);
11776}
11777
11778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011779if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011780 ac_cv_tanh_preserves_zero_sign=yes
11781else
Matthias Kloseb9621712010-04-24 17:59:49 +000011782 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11785 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011786fi
11787
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011788fi
11789
Matthias Kloseb9621712010-04-24 17:59:49 +000011790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11791$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011792if test "$ac_cv_tanh_preserves_zero_sign" = yes
11793then
11794
Matthias Kloseb9621712010-04-24 17:59:49 +000011795$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011796
11797fi
11798
Mark Dickinson9c113362009-09-05 10:36:23 +000011799for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011800do :
11801 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11802ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11803eval as_val=\$$as_ac_var
11804 if test "x$as_val" = x""yes; then :
Mark Dickinson9c113362009-09-05 10:36:23 +000011805 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011806#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000011807_ACEOF
11808
11809fi
11810done
11811
Mark Dickinson9c113362009-09-05 10:36:23 +000011812for ac_func in hypot lgamma log1p round tgamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011813do :
11814 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11815ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11816eval as_val=\$$as_ac_var
11817 if test "x$as_val" = x""yes; then :
Christian Heimes99170a52007-12-19 02:07:34 +000011818 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011819#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000011820_ACEOF
11821
11822fi
11823done
11824
Matthias Kloseb9621712010-04-24 17:59:49 +000011825ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11826"
11827if test "x$ac_cv_have_decl_isinf" = x""yes; then :
11828 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011829else
Matthias Kloseb9621712010-04-24 17:59:49 +000011830 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011831fi
11832
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011833cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011834#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011836ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11837"
11838if test "x$ac_cv_have_decl_isnan" = x""yes; then :
11839 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011840else
Matthias Kloseb9621712010-04-24 17:59:49 +000011841 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011842fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011843
11844cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011845#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011847ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11848"
11849if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
11850 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011851else
Matthias Kloseb9621712010-04-24 17:59:49 +000011852 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011853fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011854
11855cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011856#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011857_ACEOF
11858
11859
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011860LIBS=$LIBS_SAVE
11861
Mark Dickinsona614f042009-11-28 12:48:43 +000011862# For multiprocessing module, check that sem_open
11863# actually works. For FreeBSD versions <= 7.2,
11864# the kernel module that provides POSIX semaphores
11865# isn't loaded by default, so an attempt to call
11866# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11868$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
11869if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
11870 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011871else
Matthias Kloseb9621712010-04-24 17:59:49 +000011872 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011873 ac_cv_posix_semaphores_enabled=yes
11874else
Matthias Kloseb9621712010-04-24 17:59:49 +000011875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011876/* end confdefs.h. */
11877
11878#include <unistd.h>
11879#include <fcntl.h>
11880#include <stdio.h>
11881#include <semaphore.h>
11882#include <sys/stat.h>
11883
11884int main(void) {
11885 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11886 if (a == SEM_FAILED) {
11887 perror("sem_open");
11888 return 1;
11889 }
11890 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011891 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011892 return 0;
11893}
11894
11895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011896if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011897 ac_cv_posix_semaphores_enabled=yes
11898else
Matthias Kloseb9621712010-04-24 17:59:49 +000011899 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11902 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011903fi
11904
11905
Mark Dickinsona614f042009-11-28 12:48:43 +000011906fi
11907
Matthias Kloseb9621712010-04-24 17:59:49 +000011908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11909$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011910if test $ac_cv_posix_semaphores_enabled = no
11911then
11912
Matthias Kloseb9621712010-04-24 17:59:49 +000011913$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000011914
11915fi
11916
Mark Dickinson10683072009-04-18 21:18:19 +000011917# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000011918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
11919$as_echo_n "checking for broken sem_getvalue... " >&6; }
11920if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
11921 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011922else
Matthias Kloseb9621712010-04-24 17:59:49 +000011923 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011924 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000011925else
Matthias Kloseb9621712010-04-24 17:59:49 +000011926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000011927/* end confdefs.h. */
11928
11929#include <unistd.h>
11930#include <fcntl.h>
11931#include <stdio.h>
11932#include <semaphore.h>
11933#include <sys/stat.h>
11934
11935int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000011936 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000011937 int count;
11938 int res;
11939 if(a==SEM_FAILED){
11940 perror("sem_open");
11941 return 1;
11942
11943 }
11944 res = sem_getvalue(a, &count);
11945 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011946 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000011947 return res==-1 ? 1 : 0;
11948}
11949
Mark Dickinson10683072009-04-18 21:18:19 +000011950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011951if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011952 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000011953else
Matthias Kloseb9621712010-04-24 17:59:49 +000011954 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011955fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011956rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11957 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011958fi
11959
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011960
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011961fi
11962
Matthias Kloseb9621712010-04-24 17:59:49 +000011963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
11964$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011965if test $ac_cv_broken_sem_getvalue = yes
11966then
11967
Matthias Kloseb9621712010-04-24 17:59:49 +000011968$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011969
11970fi
11971
Mark Dickinsonbd792642009-03-18 20:06:12 +000011972# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000011973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
11974$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011975# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011976if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000011977 enableval=$enable_big_digits; case $enable_big_digits in
11978yes)
11979 enable_big_digits=30 ;;
11980no)
11981 enable_big_digits=15 ;;
1198215|30)
11983 ;;
11984*)
Matthias Kloseb9621712010-04-24 17:59:49 +000011985 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 +000011986esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
11988$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011989
11990cat >>confdefs.h <<_ACEOF
11991#define PYLONG_BITS_IN_DIGIT $enable_big_digits
11992_ACEOF
11993
11994
11995else
Matthias Kloseb9621712010-04-24 17:59:49 +000011996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
11997$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011998fi
11999
12000
Guido van Rossumef2255b2000-03-10 22:30:29 +000012001# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012002ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
12003if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012004
12005
Matthias Kloseb9621712010-04-24 17:59:49 +000012006$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012007
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012008 wchar_h="yes"
12009
Guido van Rossumef2255b2000-03-10 22:30:29 +000012010else
Martin v. Löwis11437992002-04-12 09:54:03 +000012011 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012012
12013fi
12014
Michael W. Hudson54241132001-12-07 15:38:26 +000012015
Martin v. Löwis11437992002-04-12 09:54:03 +000012016
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012017# determine wchar_t size
12018if test "$wchar_h" = yes
12019then
Matthias Kloseb9621712010-04-24 17:59:49 +000012020 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012021# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12022# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12023# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12025$as_echo_n "checking size of wchar_t... " >&6; }
12026if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
12027 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012028else
Matthias Kloseb9621712010-04-24 17:59:49 +000012029 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12030"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012031
Martin v. Löwis11437992002-04-12 09:54:03 +000012032else
Matthias Kloseb9621712010-04-24 17:59:49 +000012033 if test "$ac_cv_type_wchar_t" = yes; then
12034 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12035$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12036{ as_fn_set_status 77
12037as_fn_error "cannot compute sizeof (wchar_t)
12038See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012039 else
12040 ac_cv_sizeof_wchar_t=0
12041 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012042fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012043
Martin v. Löwis11437992002-04-12 09:54:03 +000012044fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12046$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012047
12048
12049
Martin v. Löwis11437992002-04-12 09:54:03 +000012050cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012051#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012052_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012053
Michael W. Hudson54241132001-12-07 15:38:26 +000012054
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012055fi
12056
Matthias Kloseb9621712010-04-24 17:59:49 +000012057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12058$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012059have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012061/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012062
12063#include <tcl.h>
12064#if TCL_UTF_MAX != 6
12065# error "NOT UCS4_TCL"
12066#endif
12067int
12068main ()
12069{
12070
12071 ;
12072 return 0;
12073}
12074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012075if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012076
12077
Matthias Kloseb9621712010-04-24 17:59:49 +000012078$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012079
12080 have_ucs4_tcl=yes
12081
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12085$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012086
Skip Montanaro6dead952003-09-25 14:50:04 +000012087# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012088if test "$wchar_h" = yes
12089then
12090 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12092$as_echo_n "checking whether wchar_t is signed... " >&6; }
12093 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12094 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012095else
12096
Matthias Kloseb9621712010-04-24 17:59:49 +000012097 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012098 ac_cv_wchar_t_signed=yes
12099else
Matthias Kloseb9621712010-04-24 17:59:49 +000012100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012101/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012102
12103 #include <wchar.h>
12104 int main()
12105 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012106 /* Success: exit code 0 */
12107 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012108 }
12109
12110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012111if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012112 ac_cv_wchar_t_signed=yes
12113else
Matthias Kloseb9621712010-04-24 17:59:49 +000012114 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012115fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12117 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012118fi
12119
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012120fi
12121
Matthias Kloseb9621712010-04-24 17:59:49 +000012122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12123$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012124fi
12125
Matthias Kloseb9621712010-04-24 17:59:49 +000012126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12127$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012128
12129# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012130if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012131 withval=$with_wide_unicode;
12132if test "$withval" != no
12133then unicode_size="4"
12134else unicode_size="2"
12135fi
12136
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012137else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012138
Georg Brandl52d168a2008-01-07 18:10:24 +000012139case "$have_ucs4_tcl" in
12140 yes) unicode_size="4" ;;
12141 *) unicode_size="2" ;;
12142esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012143
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012144fi
12145
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012146
12147
Georg Brandl52d168a2008-01-07 18:10:24 +000012148case "$unicode_size" in
Matthias Kloseb9621712010-04-24 17:59:49 +000012149 4) $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012150 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012151 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012152 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012153esac
12154
Michael W. Hudson54241132001-12-07 15:38:26 +000012155
Martin v. Löwis11437992002-04-12 09:54:03 +000012156
Georg Brandl52d168a2008-01-07 18:10:24 +000012157# wchar_t is only usable if it maps to an unsigned type
12158if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012159 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012160then
12161 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012162
Matthias Kloseb9621712010-04-24 17:59:49 +000012163$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012164
Matthias Kloseb9621712010-04-24 17:59:49 +000012165 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012166
Georg Brandl52d168a2008-01-07 18:10:24 +000012167elif test "$ac_cv_sizeof_short" = "$unicode_size"
12168then
12169 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012171
Georg Brandl52d168a2008-01-07 18:10:24 +000012172elif test "$ac_cv_sizeof_long" = "$unicode_size"
12173then
12174 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012175 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012176
Georg Brandl52d168a2008-01-07 18:10:24 +000012177else
12178 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012179fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12181$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012182
12183# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12185$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12186if test "${ac_cv_c_bigendian+set}" = set; then :
12187 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012188else
Matthias Kloseb9621712010-04-24 17:59:49 +000012189 ac_cv_c_bigendian=unknown
12190 # See if we're dealing with a universal compiler.
12191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12192/* end confdefs.h. */
12193#ifndef __APPLE_CC__
12194 not a universal capable compiler
12195 #endif
12196 typedef int dummy;
12197
Skip Montanaro6dead952003-09-25 14:50:04 +000012198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012199if ac_fn_c_try_compile "$LINENO"; then :
12200
12201 # Check for potential -arch flags. It is not universal unless
12202 # there are at least two -arch flags with different values.
12203 ac_arch=
12204 ac_prev=
12205 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12206 if test -n "$ac_prev"; then
12207 case $ac_word in
12208 i?86 | x86_64 | ppc | ppc64)
12209 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12210 ac_arch=$ac_word
12211 else
12212 ac_cv_c_bigendian=universal
12213 break
12214 fi
12215 ;;
12216 esac
12217 ac_prev=
12218 elif test "x$ac_word" = "x-arch"; then
12219 ac_prev=arch
12220 fi
12221 done
12222fi
12223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12224 if test $ac_cv_c_bigendian = unknown; then
12225 # See if sys/param.h defines the BYTE_ORDER macro.
12226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012227/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012228#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012229 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012230
Martin v. Löwis11437992002-04-12 09:54:03 +000012231int
12232main ()
12233{
Matthias Kloseb9621712010-04-24 17:59:49 +000012234#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12235 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12236 && LITTLE_ENDIAN)
12237 bogus endian macros
12238 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012239
12240 ;
12241 return 0;
12242}
12243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012244if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012245 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012247/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012248#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012249 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012250
Martin v. Löwis11437992002-04-12 09:54:03 +000012251int
12252main ()
12253{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012254#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012255 not big endian
12256 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012257
12258 ;
12259 return 0;
12260}
12261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012262if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012263 ac_cv_c_bigendian=yes
12264else
Matthias Kloseb9621712010-04-24 17:59:49 +000012265 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012268fi
12269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12270 fi
12271 if test $ac_cv_c_bigendian = unknown; then
12272 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012274/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012275#include <limits.h>
12276
Martin v. Löwis11437992002-04-12 09:54:03 +000012277int
12278main ()
12279{
Matthias Kloseb9621712010-04-24 17:59:49 +000012280#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12281 bogus endian macros
12282 #endif
12283
Martin v. Löwis11437992002-04-12 09:54:03 +000012284 ;
12285 return 0;
12286}
12287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012288if ac_fn_c_try_compile "$LINENO"; then :
12289 # It does; now see whether it defined to _BIG_ENDIAN or not.
12290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12291/* end confdefs.h. */
12292#include <limits.h>
12293
12294int
12295main ()
12296{
12297#ifndef _BIG_ENDIAN
12298 not big endian
12299 #endif
12300
12301 ;
12302 return 0;
12303}
12304_ACEOF
12305if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012306 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012307else
Matthias Kloseb9621712010-04-24 17:59:49 +000012308 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012309fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12311fi
12312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12313 fi
12314 if test $ac_cv_c_bigendian = unknown; then
12315 # Compile a test program.
12316 if test "$cross_compiling" = yes; then :
12317 # Try to guess by grepping values from an object file.
12318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12319/* end confdefs.h. */
12320short int ascii_mm[] =
12321 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12322 short int ascii_ii[] =
12323 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12324 int use_ascii (int i) {
12325 return ascii_mm[i] + ascii_ii[i];
12326 }
12327 short int ebcdic_ii[] =
12328 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12329 short int ebcdic_mm[] =
12330 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12331 int use_ebcdic (int i) {
12332 return ebcdic_mm[i] + ebcdic_ii[i];
12333 }
12334 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012335
Matthias Kloseb9621712010-04-24 17:59:49 +000012336int
12337main ()
12338{
12339return use_ascii (foo) == use_ebcdic (foo);
12340 ;
12341 return 0;
12342}
12343_ACEOF
12344if ac_fn_c_try_compile "$LINENO"; then :
12345 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12346 ac_cv_c_bigendian=yes
12347 fi
12348 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12349 if test "$ac_cv_c_bigendian" = unknown; then
12350 ac_cv_c_bigendian=no
12351 else
12352 # finding both strings is unlikely to happen, but who knows?
12353 ac_cv_c_bigendian=unknown
12354 fi
12355 fi
12356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012358else
Matthias Kloseb9621712010-04-24 17:59:49 +000012359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012360/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012361$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012362int
12363main ()
12364{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012365
Matthias Kloseb9621712010-04-24 17:59:49 +000012366 /* Are we little or big endian? From Harbison&Steele. */
12367 union
12368 {
12369 long int l;
12370 char c[sizeof (long int)];
12371 } u;
12372 u.l = 1;
12373 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012374
12375 ;
12376 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012377}
Martin v. Löwis11437992002-04-12 09:54:03 +000012378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012379if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012380 ac_cv_c_bigendian=no
12381else
Matthias Kloseb9621712010-04-24 17:59:49 +000012382 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012383fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012384rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12385 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012386fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012387
Matthias Kloseb9621712010-04-24 17:59:49 +000012388 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12391$as_echo "$ac_cv_c_bigendian" >&6; }
12392 case $ac_cv_c_bigendian in #(
12393 yes)
12394 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12395;; #(
12396 no)
12397 ;; #(
12398 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012399
Matthias Kloseb9621712010-04-24 17:59:49 +000012400$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012401
Matthias Kloseb9621712010-04-24 17:59:49 +000012402 ;; #(
12403 *)
12404 as_fn_error "unknown endianness
12405 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12406 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012407
Michael W. Hudson54241132001-12-07 15:38:26 +000012408
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012409# Check whether right shifting a negative integer extends the sign bit
12410# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12412$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12413if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12414 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012415else
Martin v. Löwis11437992002-04-12 09:54:03 +000012416
Matthias Kloseb9621712010-04-24 17:59:49 +000012417if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012418 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012419else
Matthias Kloseb9621712010-04-24 17:59:49 +000012420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012421/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012422
12423int main()
12424{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012425 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012426}
12427
Martin v. Löwis11437992002-04-12 09:54:03 +000012428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012429if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012430 ac_cv_rshift_extends_sign=yes
12431else
Matthias Kloseb9621712010-04-24 17:59:49 +000012432 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012433fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012434rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12435 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012436fi
12437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012438fi
12439
Matthias Kloseb9621712010-04-24 17:59:49 +000012440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12441$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012442if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012443then
Martin v. Löwis11437992002-04-12 09:54:03 +000012444
Matthias Kloseb9621712010-04-24 17:59:49 +000012445$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012446
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012447fi
12448
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012449# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12451$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12452if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12453 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012454else
Martin v. Löwis11437992002-04-12 09:54:03 +000012455
Matthias Kloseb9621712010-04-24 17:59:49 +000012456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012457/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012458#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012459int
12460main ()
12461{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012462
12463 FILE *f = fopen("/dev/null", "r");
12464 flockfile(f);
12465 getc_unlocked(f);
12466 funlockfile(f);
12467
Martin v. Löwis11437992002-04-12 09:54:03 +000012468 ;
12469 return 0;
12470}
12471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012472if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012473 ac_cv_have_getc_unlocked=yes
12474else
Matthias Kloseb9621712010-04-24 17:59:49 +000012475 ac_cv_have_getc_unlocked=no
12476fi
12477rm -f core conftest.err conftest.$ac_objext \
12478 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012480
Matthias Kloseb9621712010-04-24 17:59:49 +000012481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12482$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012483if test "$ac_cv_have_getc_unlocked" = yes
12484then
Martin v. Löwis11437992002-04-12 09:54:03 +000012485
Matthias Kloseb9621712010-04-24 17:59:49 +000012486$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012487
12488fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012489
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012490# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012491# save the value of LIBS so we don't actually link Python with readline
12492LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012493
Gregory P. Smith18820942008-09-07 06:24:49 +000012494# On some systems we need to link readline to a termcap compatible
12495# library. NOTE: Keep the precedence of listed libraries synchronised
12496# with setup.py.
12497py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12499$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012500for py_libtermcap in "" ncursesw ncurses curses termcap; do
12501 if test -z "$py_libtermcap"; then
12502 READLINE_LIBS="-lreadline"
12503 else
12504 READLINE_LIBS="-lreadline -l$py_libtermcap"
12505 fi
12506 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012508/* end confdefs.h. */
12509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012510/* Override any GCC internal prototype to avoid an error.
12511 Use char because int might match the return type of a GCC
12512 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012513#ifdef __cplusplus
12514extern "C"
12515#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012516char readline ();
12517int
12518main ()
12519{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012520return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012521 ;
12522 return 0;
12523}
12524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012525if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012526 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012527fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012528rm -f core conftest.err conftest.$ac_objext \
12529 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012530 if test $py_cv_lib_readline = yes; then
12531 break
12532 fi
12533done
12534# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12535#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012536if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12538$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012539else
Matthias Kloseb9621712010-04-24 17:59:49 +000012540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12541$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012542
Matthias Kloseb9621712010-04-24 17:59:49 +000012543$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012544
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012545fi
12546
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012547# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12549$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12550if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12551 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012552else
12553 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012554LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012556/* end confdefs.h. */
12557
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012558/* Override any GCC internal prototype to avoid an error.
12559 Use char because int might match the return type of a GCC
12560 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012561#ifdef __cplusplus
12562extern "C"
12563#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012564char rl_callback_handler_install ();
12565int
12566main ()
12567{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012568return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012569 ;
12570 return 0;
12571}
12572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012573if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012574 ac_cv_lib_readline_rl_callback_handler_install=yes
12575else
Matthias Kloseb9621712010-04-24 17:59:49 +000012576 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012578rm -f core conftest.err conftest.$ac_objext \
12579 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012580LIBS=$ac_check_lib_save_LIBS
12581fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12583$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12584if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012585
Matthias Kloseb9621712010-04-24 17:59:49 +000012586$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012587
12588fi
12589
12590
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012591# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012593/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012594#include <readline/readline.h>
12595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012596if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012597 have_readline=yes
12598else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012599 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012600
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012601fi
12602rm -f conftest.err conftest.$ac_ext
12603if test $have_readline = yes
12604then
Matthias Kloseb9621712010-04-24 17:59:49 +000012605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012606/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012607#include <readline/readline.h>
12608
12609_ACEOF
12610if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012611 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012612
Matthias Kloseb9621712010-04-24 17:59:49 +000012613$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012614
12615fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012616rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012617
Matthias Kloseb9621712010-04-24 17:59:49 +000012618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012619/* end confdefs.h. */
12620#include <readline/readline.h>
12621
12622_ACEOF
12623if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012624 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012625
Matthias Kloseb9621712010-04-24 17:59:49 +000012626$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012627
12628fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012629rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012630
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012631fi
12632
Martin v. Löwis0daad592001-09-30 21:09:59 +000012633# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12635$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12636if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12637 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012638else
Martin v. Löwis11437992002-04-12 09:54:03 +000012639 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012640LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012642/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012643
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012644/* Override any GCC internal prototype to avoid an error.
12645 Use char because int might match the return type of a GCC
12646 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012647#ifdef __cplusplus
12648extern "C"
12649#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012650char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012651int
12652main ()
12653{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012654return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012655 ;
12656 return 0;
12657}
12658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012659if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012660 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012661else
Matthias Kloseb9621712010-04-24 17:59:49 +000012662 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012663fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012664rm -f core conftest.err conftest.$ac_objext \
12665 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012666LIBS=$ac_check_lib_save_LIBS
12667fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12669$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12670if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012671
Matthias Kloseb9621712010-04-24 17:59:49 +000012672$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012673
Martin v. Löwis0daad592001-09-30 21:09:59 +000012674fi
12675
Michael W. Hudson54241132001-12-07 15:38:26 +000012676
Thomas Wouters89d996e2007-09-08 17:39:28 +000012677# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12679$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12680if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12681 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012682else
12683 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012684LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012686/* end confdefs.h. */
12687
12688/* Override any GCC internal prototype to avoid an error.
12689 Use char because int might match the return type of a GCC
12690 builtin and then its argument prototype would still apply. */
12691#ifdef __cplusplus
12692extern "C"
12693#endif
12694char rl_completion_display_matches_hook ();
12695int
12696main ()
12697{
12698return rl_completion_display_matches_hook ();
12699 ;
12700 return 0;
12701}
12702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012703if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012704 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12705else
Matthias Kloseb9621712010-04-24 17:59:49 +000012706 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012707fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012708rm -f core conftest.err conftest.$ac_objext \
12709 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012710LIBS=$ac_check_lib_save_LIBS
12711fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12713$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12714if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012715
Matthias Kloseb9621712010-04-24 17:59:49 +000012716$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012717
12718fi
12719
12720
Martin v. Löwis0daad592001-09-30 21:09:59 +000012721# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12723$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12724if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12725 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012726else
Martin v. Löwis11437992002-04-12 09:54:03 +000012727 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012728LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012730/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012731
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012732/* Override any GCC internal prototype to avoid an error.
12733 Use char because int might match the return type of a GCC
12734 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012735#ifdef __cplusplus
12736extern "C"
12737#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012738char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012739int
12740main ()
12741{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012742return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012743 ;
12744 return 0;
12745}
12746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012747if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012748 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012749else
Matthias Kloseb9621712010-04-24 17:59:49 +000012750 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012751fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012752rm -f core conftest.err conftest.$ac_objext \
12753 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012754LIBS=$ac_check_lib_save_LIBS
12755fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12757$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
12758if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012759
Matthias Kloseb9621712010-04-24 17:59:49 +000012760$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012761
Guido van Rossum353ae582001-07-10 16:45:32 +000012762fi
12763
Jack Jansendd19cf82001-12-06 22:36:17 +000012764
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012765# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012767/* end confdefs.h. */
12768#include <readline/readline.h>
12769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012770if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012771 have_readline=yes
12772else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012773 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012774
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012775fi
12776rm -f conftest.err conftest.$ac_ext
12777if test $have_readline = yes
12778then
Matthias Kloseb9621712010-04-24 17:59:49 +000012779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012780/* end confdefs.h. */
12781#include <readline/readline.h>
12782
12783_ACEOF
12784if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012785 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012786
Matthias Kloseb9621712010-04-24 17:59:49 +000012787$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012788
12789fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012790rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012791
12792fi
12793
Martin v. Löwis82bca632006-02-10 20:49:30 +000012794# End of readline checks: restore LIBS
12795LIBS=$LIBS_no_readline
12796
Matthias Kloseb9621712010-04-24 17:59:49 +000012797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12798$as_echo_n "checking for broken nice()... " >&6; }
12799if test "${ac_cv_broken_nice+set}" = set; then :
12800 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012801else
Martin v. Löwis11437992002-04-12 09:54:03 +000012802
Matthias Kloseb9621712010-04-24 17:59:49 +000012803if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012804 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012805else
Matthias Kloseb9621712010-04-24 17:59:49 +000012806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012807/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012808
12809int main()
12810{
12811 int val1 = nice(1);
12812 if (val1 != -1 && val1 == nice(2))
12813 exit(0);
12814 exit(1);
12815}
12816
Martin v. Löwis11437992002-04-12 09:54:03 +000012817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012818if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012819 ac_cv_broken_nice=yes
12820else
Matthias Kloseb9621712010-04-24 17:59:49 +000012821 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012822fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012823rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12824 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012825fi
12826
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012827fi
12828
Matthias Kloseb9621712010-04-24 17:59:49 +000012829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12830$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012831if test "$ac_cv_broken_nice" = yes
12832then
Martin v. Löwis11437992002-04-12 09:54:03 +000012833
Matthias Kloseb9621712010-04-24 17:59:49 +000012834$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012835
12836fi
12837
Matthias Kloseb9621712010-04-24 17:59:49 +000012838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12839$as_echo_n "checking for broken poll()... " >&6; }
12840if test "${ac_cv_broken_poll+set}" = set; then :
12841 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012842else
Matthias Kloseb9621712010-04-24 17:59:49 +000012843 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012844 ac_cv_broken_poll=no
12845else
Matthias Kloseb9621712010-04-24 17:59:49 +000012846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012847/* end confdefs.h. */
12848
12849#include <poll.h>
12850
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012851int main()
12852{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012853 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012854 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012855
12856 close (42);
12857
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012858 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012859 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012860 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012861 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012862 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012863 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012864 return 1;
12865}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012866
12867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012868if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012869 ac_cv_broken_poll=yes
12870else
Matthias Kloseb9621712010-04-24 17:59:49 +000012871 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012872fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012873rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12874 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012876
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012877fi
12878
Matthias Kloseb9621712010-04-24 17:59:49 +000012879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
12880$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012881if test "$ac_cv_broken_poll" = yes
12882then
12883
Matthias Kloseb9621712010-04-24 17:59:49 +000012884$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012885
12886fi
12887
Brett Cannon43802422005-02-10 20:48:03 +000012888# 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 +000012889# (which is not required by ISO C or UNIX spec) and/or if we support
12890# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000012891ac_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 +000012892#include <$ac_cv_struct_tm>
12893
Matthias Kloseb9621712010-04-24 17:59:49 +000012894"
12895if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000012896
12897cat >>confdefs.h <<_ACEOF
12898#define HAVE_STRUCT_TM_TM_ZONE 1
12899_ACEOF
12900
12901
12902fi
12903
12904if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12905
Matthias Kloseb9621712010-04-24 17:59:49 +000012906$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012907
12908else
Matthias Kloseb9621712010-04-24 17:59:49 +000012909 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12910"
12911if test "x$ac_cv_have_decl_tzname" = x""yes; then :
12912 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012913else
Matthias Kloseb9621712010-04-24 17:59:49 +000012914 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012915fi
12916
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012917cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012918#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012919_ACEOF
12920
Matthias Kloseb9621712010-04-24 17:59:49 +000012921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12922$as_echo_n "checking for tzname... " >&6; }
12923if test "${ac_cv_var_tzname+set}" = set; then :
12924 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012925else
Matthias Kloseb9621712010-04-24 17:59:49 +000012926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012927/* end confdefs.h. */
12928#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012929#if !HAVE_DECL_TZNAME
12930extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000012931#endif
12932
12933int
12934main ()
12935{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012936return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000012937 ;
12938 return 0;
12939}
12940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012941if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000012942 ac_cv_var_tzname=yes
12943else
Matthias Kloseb9621712010-04-24 17:59:49 +000012944 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000012945fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012946rm -f core conftest.err conftest.$ac_objext \
12947 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012948fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12950$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000012951 if test $ac_cv_var_tzname = yes; then
12952
Matthias Kloseb9621712010-04-24 17:59:49 +000012953$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012954
12955 fi
12956fi
12957
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012958
Martin v. Löwis1d459062005-03-14 21:23:33 +000012959# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000012960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
12961$as_echo_n "checking for working tzset()... " >&6; }
12962if test "${ac_cv_working_tzset+set}" = set; then :
12963 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012964else
12965
Matthias Kloseb9621712010-04-24 17:59:49 +000012966if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012967 ac_cv_working_tzset=no
12968else
Matthias Kloseb9621712010-04-24 17:59:49 +000012969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012970/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012971
12972#include <stdlib.h>
12973#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000012974#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000012975
12976#if HAVE_TZNAME
12977extern char *tzname[];
12978#endif
12979
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012980int main()
12981{
Brett Cannon18367812003-09-19 00:59:16 +000012982 /* Note that we need to ensure that not only does tzset(3)
12983 do 'something' with localtime, but it works as documented
12984 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000012985 This includes making sure that tzname is set properly if
12986 tm->tm_zone does not exist since it is the alternative way
12987 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000012988
12989 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000012990 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000012991 */
12992
Martin v. Löwis1d459062005-03-14 21:23:33 +000012993 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000012994 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
12995
Neal Norwitz7f2588c2003-04-11 15:35:53 +000012996 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012997 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000012998 if (localtime(&groundhogday)->tm_hour != 0)
12999 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013000#if HAVE_TZNAME
13001 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13002 if (strcmp(tzname[0], "UTC") ||
13003 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13004 exit(1);
13005#endif
Brett Cannon18367812003-09-19 00:59:16 +000013006
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013007 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013008 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013009 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013010 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013011#if HAVE_TZNAME
13012 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13013 exit(1);
13014#endif
Brett Cannon18367812003-09-19 00:59:16 +000013015
13016 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13017 tzset();
13018 if (localtime(&groundhogday)->tm_hour != 11)
13019 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013020#if HAVE_TZNAME
13021 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13022 exit(1);
13023#endif
13024
13025#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013026 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13027 exit(1);
13028 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13029 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013030#endif
Brett Cannon18367812003-09-19 00:59:16 +000013031
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013032 exit(0);
13033}
13034
13035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013036if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013037 ac_cv_working_tzset=yes
13038else
Matthias Kloseb9621712010-04-24 17:59:49 +000013039 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013041rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13042 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013043fi
13044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013045fi
13046
Matthias Kloseb9621712010-04-24 17:59:49 +000013047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13048$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013049if test "$ac_cv_working_tzset" = yes
13050then
13051
Matthias Kloseb9621712010-04-24 17:59:49 +000013052$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013053
13054fi
13055
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013056# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13058$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13059if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13060 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013061else
Matthias Kloseb9621712010-04-24 17:59:49 +000013062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013063/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013064#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013065int
13066main ()
13067{
13068
13069struct stat st;
13070st.st_mtim.tv_nsec = 1;
13071
13072 ;
13073 return 0;
13074}
13075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013076if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013077 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013078else
Matthias Kloseb9621712010-04-24 17:59:49 +000013079 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13082fi
13083
Matthias Kloseb9621712010-04-24 17:59:49 +000013084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13085$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013086if test "$ac_cv_stat_tv_nsec" = yes
13087then
13088
Matthias Kloseb9621712010-04-24 17:59:49 +000013089$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013090
13091fi
13092
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013093# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13095$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13096if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13097 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013098else
Matthias Kloseb9621712010-04-24 17:59:49 +000013099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013100/* end confdefs.h. */
13101#include <sys/stat.h>
13102int
13103main ()
13104{
13105
13106struct stat st;
13107st.st_mtimespec.tv_nsec = 1;
13108
13109 ;
13110 return 0;
13111}
13112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013113if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013114 ac_cv_stat_tv_nsec2=yes
13115else
Matthias Kloseb9621712010-04-24 17:59:49 +000013116 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13119fi
13120
Matthias Kloseb9621712010-04-24 17:59:49 +000013121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13122$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013123if test "$ac_cv_stat_tv_nsec2" = yes
13124then
13125
Matthias Kloseb9621712010-04-24 17:59:49 +000013126$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013127
13128fi
13129
Jack Jansen666b1e72001-10-31 12:11:48 +000013130# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13132$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13133if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13134 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013135else
Matthias Kloseb9621712010-04-24 17:59:49 +000013136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013137/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013138#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013139int
13140main ()
13141{
Jack Jansen666b1e72001-10-31 12:11:48 +000013142
13143 int rtn;
13144 rtn = mvwdelch(0,0,0);
13145
Martin v. Löwis11437992002-04-12 09:54:03 +000013146 ;
13147 return 0;
13148}
13149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013150if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013151 ac_cv_mvwdelch_is_expression=yes
13152else
Matthias Kloseb9621712010-04-24 17:59:49 +000013153 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13156fi
13157
Matthias Kloseb9621712010-04-24 17:59:49 +000013158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13159$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013160
13161if test "$ac_cv_mvwdelch_is_expression" = yes
13162then
Martin v. Löwis11437992002-04-12 09:54:03 +000013163
Matthias Kloseb9621712010-04-24 17:59:49 +000013164$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013165
13166fi
13167
Matthias Kloseb9621712010-04-24 17:59:49 +000013168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13169$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13170if test "${ac_cv_window_has_flags+set}" = set; then :
13171 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013172else
Matthias Kloseb9621712010-04-24 17:59:49 +000013173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013174/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013175#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013176int
13177main ()
13178{
Jack Jansen666b1e72001-10-31 12:11:48 +000013179
13180 WINDOW *w;
13181 w->_flags = 0;
13182
Martin v. Löwis11437992002-04-12 09:54:03 +000013183 ;
13184 return 0;
13185}
13186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013187if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013188 ac_cv_window_has_flags=yes
13189else
Matthias Kloseb9621712010-04-24 17:59:49 +000013190 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13193fi
13194
Matthias Kloseb9621712010-04-24 17:59:49 +000013195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13196$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013197
Jack Jansen666b1e72001-10-31 12:11:48 +000013198
13199if test "$ac_cv_window_has_flags" = yes
13200then
Martin v. Löwis11437992002-04-12 09:54:03 +000013201
Matthias Kloseb9621712010-04-24 17:59:49 +000013202$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013203
13204fi
13205
Matthias Kloseb9621712010-04-24 17:59:49 +000013206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13207$as_echo_n "checking for is_term_resized... " >&6; }
13208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013209/* end confdefs.h. */
13210#include <curses.h>
13211int
13212main ()
13213{
13214void *x=is_term_resized
13215 ;
13216 return 0;
13217}
13218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013219if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013220
Matthias Kloseb9621712010-04-24 17:59:49 +000013221$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013222
Matthias Kloseb159a552010-04-25 21:00:44 +000013223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013224$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013225else
Matthias Kloseb9621712010-04-24 17:59:49 +000013226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13227$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013228
13229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13231
Matthias Kloseb9621712010-04-24 17:59:49 +000013232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13233$as_echo_n "checking for resize_term... " >&6; }
13234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013235/* end confdefs.h. */
13236#include <curses.h>
13237int
13238main ()
13239{
13240void *x=resize_term
13241 ;
13242 return 0;
13243}
13244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013245if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013246
Matthias Kloseb9621712010-04-24 17:59:49 +000013247$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013248
Matthias Kloseb159a552010-04-25 21:00:44 +000013249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013250$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013251else
Matthias Kloseb9621712010-04-24 17:59:49 +000013252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13253$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013254
13255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13257
Matthias Kloseb9621712010-04-24 17:59:49 +000013258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13259$as_echo_n "checking for resizeterm... " >&6; }
13260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013261/* end confdefs.h. */
13262#include <curses.h>
13263int
13264main ()
13265{
13266void *x=resizeterm
13267 ;
13268 return 0;
13269}
13270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013271if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013272
Matthias Kloseb9621712010-04-24 17:59:49 +000013273$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013274
Matthias Kloseb159a552010-04-25 21:00:44 +000013275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013276$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013277else
Matthias Kloseb9621712010-04-24 17:59:49 +000013278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13279$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013280
13281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13283
Matthias Kloseb9621712010-04-24 17:59:49 +000013284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13285$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013286
13287if test -r /dev/ptmx
13288then
Matthias Kloseb9621712010-04-24 17:59:49 +000013289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13290$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013291
Matthias Kloseb9621712010-04-24 17:59:49 +000013292$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013293
Thomas Wouters89f507f2006-12-13 04:49:30 +000013294else
Matthias Kloseb9621712010-04-24 17:59:49 +000013295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13296$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013297fi
13298
Matthias Kloseb9621712010-04-24 17:59:49 +000013299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13300$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013301
13302if test -r /dev/ptc
13303then
Matthias Kloseb9621712010-04-24 17:59:49 +000013304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13305$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013306
Matthias Kloseb9621712010-04-24 17:59:49 +000013307$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013308
Thomas Wouters89f507f2006-12-13 04:49:30 +000013309else
Matthias Kloseb9621712010-04-24 17:59:49 +000013310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13311$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013312fi
13313
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013314if test "$have_long_long" = yes
13315then
Matthias Kloseb9621712010-04-24 17:59:49 +000013316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13317$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13318 if test "${ac_cv_have_long_long_format+set}" = set; then :
13319 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013320else
Matthias Kloseb9621712010-04-24 17:59:49 +000013321 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013322 ac_cv_have_long_long_format=no
13323else
Matthias Kloseb9621712010-04-24 17:59:49 +000013324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013325/* end confdefs.h. */
13326
13327 #include <stdio.h>
13328 #include <stddef.h>
13329 #include <string.h>
13330
13331 #ifdef HAVE_SYS_TYPES_H
13332 #include <sys/types.h>
13333 #endif
13334
13335 int main()
13336 {
13337 char buffer[256];
13338
13339 if (sprintf(buffer, "%lld", (long long)123) < 0)
13340 return 1;
13341 if (strcmp(buffer, "123"))
13342 return 1;
13343
13344 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13345 return 1;
13346 if (strcmp(buffer, "-123"))
13347 return 1;
13348
13349 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13350 return 1;
13351 if (strcmp(buffer, "123"))
13352 return 1;
13353
13354 return 0;
13355 }
13356
13357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013358if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013359 ac_cv_have_long_long_format=yes
13360else
Matthias Kloseb9621712010-04-24 17:59:49 +000013361 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013362fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013363rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13364 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013365fi
13366
13367
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013368fi
13369
Matthias Kloseb9621712010-04-24 17:59:49 +000013370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13371$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013372fi
13373
Mark Dickinson89d7d412009-12-31 20:50:59 +000013374if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013375then
13376
Matthias Kloseb9621712010-04-24 17:59:49 +000013377$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013378
13379fi
13380
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013381if test $ac_sys_system = Darwin
13382then
13383 LIBS="$LIBS -framework CoreFoundation"
13384fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013385
Matthias Kloseb9621712010-04-24 17:59:49 +000013386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13387$as_echo_n "checking for %zd printf() format support... " >&6; }
13388if test "${ac_cv_have_size_t_format+set}" = set; then :
13389 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013390else
Matthias Kloseb9621712010-04-24 17:59:49 +000013391 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013392 ac_cv_have_size_t_format="cross -- assuming yes"
13393
Thomas Wouters477c8d52006-05-27 19:21:47 +000013394else
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013396/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013397
Thomas Wouters477c8d52006-05-27 19:21:47 +000013398#include <stdio.h>
13399#include <stddef.h>
13400#include <string.h>
13401
Christian Heimes2c181612007-12-17 20:04:13 +000013402#ifdef HAVE_SYS_TYPES_H
13403#include <sys/types.h>
13404#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013405
13406#ifdef HAVE_SSIZE_T
13407typedef ssize_t Py_ssize_t;
13408#elif SIZEOF_VOID_P == SIZEOF_LONG
13409typedef long Py_ssize_t;
13410#else
13411typedef int Py_ssize_t;
13412#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013413
Christian Heimes2c181612007-12-17 20:04:13 +000013414int main()
13415{
13416 char buffer[256];
13417
Thomas Wouters477c8d52006-05-27 19:21:47 +000013418 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13419 return 1;
13420
Thomas Wouters89f507f2006-12-13 04:49:30 +000013421 if (strcmp(buffer, "123"))
13422 return 1;
13423
13424 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13425 return 1;
13426
13427 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013428 return 1;
13429
13430 return 0;
13431}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013432
Thomas Wouters477c8d52006-05-27 19:21:47 +000013433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013434if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013435 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013436else
Matthias Kloseb9621712010-04-24 17:59:49 +000013437 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013438fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013439rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13440 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013441fi
13442
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013443fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13445$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013446if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013447
Matthias Kloseb9621712010-04-24 17:59:49 +000013448$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013449
13450fi
13451
Matthias Kloseb9621712010-04-24 17:59:49 +000013452ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013453#ifdef HAVE_SYS_TYPES_H
13454#include <sys/types.h>
13455#endif
13456#ifdef HAVE_SYS_SOCKET_H
13457#include <sys/socket.h>
13458#endif
13459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460"
13461if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013462
Martin v. Löwis11437992002-04-12 09:54:03 +000013463else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013464
Matthias Kloseb9621712010-04-24 17:59:49 +000013465$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013466
13467fi
13468
Michael W. Hudson54241132001-12-07 15:38:26 +000013469
Matthias Kloseb9621712010-04-24 17:59:49 +000013470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13471$as_echo_n "checking for broken mbstowcs... " >&6; }
13472if test "${ac_cv_broken_mbstowcs+set}" = set; then :
13473 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013474else
Matthias Kloseb9621712010-04-24 17:59:49 +000013475 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013476 ac_cv_broken_mbstowcs=no
13477else
Matthias Kloseb9621712010-04-24 17:59:49 +000013478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013479/* end confdefs.h. */
13480
13481#include<stdlib.h>
13482int main() {
13483 size_t len = -1;
13484 const char *str = "text";
13485 len = mbstowcs(NULL, str, 0);
13486 return (len != 4);
13487}
13488
13489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013490if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013491 ac_cv_broken_mbstowcs=no
13492else
Matthias Kloseb9621712010-04-24 17:59:49 +000013493 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013494fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013495rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13496 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013497fi
13498
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013499fi
13500
Matthias Kloseb9621712010-04-24 17:59:49 +000013501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13502$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013503if test "$ac_cv_broken_mbstowcs" = yes
13504then
13505
Matthias Kloseb9621712010-04-24 17:59:49 +000013506$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013507
13508fi
13509
Antoine Pitrou042b1282010-08-13 21:15:58 +000013510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13511$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
13512if test "${ac_cv_computed_gotos+set}" = set; then :
13513 $as_echo_n "(cached) " >&6
13514else
13515 if test "$cross_compiling" = yes; then :
13516 ac_cv_computed_gotos=no
13517else
13518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13519/* end confdefs.h. */
13520
13521int main(int argc, char **argv)
13522{
13523 static void *targets[1] = { &&LABEL1 };
13524 goto LABEL2;
13525LABEL1:
13526 return 0;
13527LABEL2:
13528 goto *targets[0];
13529 return 1;
13530}
13531
13532_ACEOF
13533if ac_fn_c_try_run "$LINENO"; then :
13534 ac_cv_computed_gotos=yes
13535else
13536 ac_cv_computed_gotos=no
13537fi
13538rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13539 conftest.$ac_objext conftest.beam conftest.$ac_ext
13540fi
13541
13542fi
13543
13544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13545$as_echo "$ac_cv_computed_gotos" >&6; }
13546if test "$ac_cv_computed_gotos" = yes
13547then
13548
13549$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13550
13551fi
13552
Antoine Pitroub52ec782009-01-25 16:34:23 +000013553# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13555$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013556
13557# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013558if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013559 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013560if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013561then
13562
Matthias Kloseb9621712010-04-24 17:59:49 +000013563$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013564
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13566$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013567fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013568if test "$withval" = no
13569then
13570
13571$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13572
Matthias Kloseb9621712010-04-24 17:59:49 +000013573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13574$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013575fi
13576
Antoine Pitrou042b1282010-08-13 21:15:58 +000013577else
13578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13579$as_echo "no value specified" >&6; }
13580fi
13581
Antoine Pitroub52ec782009-01-25 16:34:23 +000013582
13583
Michael W. Hudson54241132001-12-07 15:38:26 +000013584
Jesus Cea6a792292010-05-03 21:18:48 +000013585case $ac_sys_system in
13586 OSF*) as_fn_error "OSF* systems are deprecated unless somebody volunteers. Check http://bugs.python.org/issue8606" "$LINENO" 5 ;;
13587esac
13588
13589
13590
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013591
13592
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013593for h in `(cd $srcdir;echo Python/thread_*.h)`
13594do
13595 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13596done
13597
Michael W. Hudson54241132001-12-07 15:38:26 +000013598
Neal Norwitzd24499d2005-12-18 21:36:39 +000013599SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13601$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013602for dir in $SRCDIRS; do
13603 if test ! -d $dir; then
13604 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013605 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013606done
Matthias Kloseb9621712010-04-24 17:59:49 +000013607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13608$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013609
Guido van Rossum627b2d71993-12-24 10:39:16 +000013610# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013611ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013612
Martin v. Löwis11437992002-04-12 09:54:03 +000013613cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013614# This file is a shell script that caches the results of configure
13615# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013616# scripts and configure runs, see configure's option --config-cache.
13617# It is not useful on other systems. If it contains results you don't
13618# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013619#
Martin v. Löwis11437992002-04-12 09:54:03 +000013620# config.status only pays attention to the cache file if you give it
13621# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013622#
Skip Montanaro6dead952003-09-25 14:50:04 +000013623# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013624# loading this file, other *unset* `ac_cv_foo' will be assigned the
13625# following values.
13626
13627_ACEOF
13628
Guido van Rossumf78abae1997-01-21 22:02:36 +000013629# The following way of writing the cache mishandles newlines in values,
13630# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013631# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013632# Ultrix sh set writes to stderr and can't be redirected directly,
13633# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013634(
13635 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13636 eval ac_val=\$$ac_var
13637 case $ac_val in #(
13638 *${as_nl}*)
13639 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013640 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13641$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013642 esac
13643 case $ac_var in #(
13644 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013645 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13646 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013647 esac ;;
13648 esac
13649 done
13650
Martin v. Löwis11437992002-04-12 09:54:03 +000013651 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013652 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13653 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013654 # `set' does not quote correctly, so add quotes: double-quote
13655 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013656 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013657 "s/'/'\\\\''/g;
13658 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013659 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013660 *)
13661 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013662 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013663 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013664 esac |
13665 sort
13666) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013667 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013668 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013669 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013670 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013671 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13672 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013673 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13674 :end' >>confcache
13675if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13676 if test -w "$cache_file"; then
13677 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013678 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13679$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013680 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013681 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013682 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13683$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013684 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013685fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013686rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013687
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013688test "x$prefix" = xNONE && prefix=$ac_default_prefix
13689# Let make expand exec_prefix.
13690test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013691
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013692DEFS=-DHAVE_CONFIG_H
13693
Skip Montanaro6dead952003-09-25 14:50:04 +000013694ac_libobjs=
13695ac_ltlibobjs=
13696for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13697 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013698 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013699 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013700 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13701 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013702 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13703 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013704done
13705LIBOBJS=$ac_libobjs
13706
13707LTLIBOBJS=$ac_ltlibobjs
13708
13709
Martin v. Löwis11437992002-04-12 09:54:03 +000013710
Matthias Kloseb9621712010-04-24 17:59:49 +000013711
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013712: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013713ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013714ac_clean_files_save=$ac_clean_files
13715ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013716{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13717$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13718as_write_fail=0
13719cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013720#! $SHELL
13721# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013722# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013723# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013724# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013725
Martin v. Löwis11437992002-04-12 09:54:03 +000013726debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013727ac_cs_recheck=false
13728ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013729
Matthias Kloseb9621712010-04-24 17:59:49 +000013730SHELL=\${CONFIG_SHELL-$SHELL}
13731export SHELL
13732_ASEOF
13733cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13734## -------------------- ##
13735## M4sh Initialization. ##
13736## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013737
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013738# Be more Bourne compatible
13739DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013740if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013741 emulate sh
13742 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013743 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013744 # is contrary to our usage. Disable this feature.
13745 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013746 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013747else
Matthias Kloseb9621712010-04-24 17:59:49 +000013748 case `(set -o) 2>/dev/null` in #(
13749 *posix*) :
13750 set -o posix ;; #(
13751 *) :
13752 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013753esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013754fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013755
13756
Matthias Kloseb9621712010-04-24 17:59:49 +000013757as_nl='
13758'
13759export as_nl
13760# Printing a long string crashes Solaris 7 /usr/bin/printf.
13761as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13762as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13763as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13764# Prefer a ksh shell builtin over an external printf program on Solaris,
13765# but without wasting forks for bash or zsh.
13766if test -z "$BASH_VERSION$ZSH_VERSION" \
13767 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13768 as_echo='print -r --'
13769 as_echo_n='print -rn --'
13770elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13771 as_echo='printf %s\n'
13772 as_echo_n='printf %s'
13773else
13774 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13775 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13776 as_echo_n='/usr/ucb/echo -n'
13777 else
13778 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13779 as_echo_n_body='eval
13780 arg=$1;
13781 case $arg in #(
13782 *"$as_nl"*)
13783 expr "X$arg" : "X\\(.*\\)$as_nl";
13784 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13785 esac;
13786 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13787 '
13788 export as_echo_n_body
13789 as_echo_n='sh -c $as_echo_n_body as_echo'
13790 fi
13791 export as_echo_body
13792 as_echo='sh -c $as_echo_body as_echo'
13793fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013794
13795# The user is always right.
13796if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013797 PATH_SEPARATOR=:
13798 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13799 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13800 PATH_SEPARATOR=';'
13801 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013802fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013804
13805# IFS
13806# We need space, tab and new line, in precisely that order. Quoting is
13807# there to prevent editors from complaining about space-tab.
13808# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13809# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013810IFS=" "" $as_nl"
13811
13812# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013813case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013814 *[\\/]* ) as_myself=$0 ;;
13815 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013816for as_dir in $PATH
13817do
13818 IFS=$as_save_IFS
13819 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013820 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13821 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013822IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013823
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013824 ;;
13825esac
13826# We did not find ourselves, most probably we were run as `sh COMMAND'
13827# in which case we are not to be found in the path.
13828if test "x$as_myself" = x; then
13829 as_myself=$0
13830fi
13831if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013832 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13833 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013834fi
13835
Matthias Kloseb9621712010-04-24 17:59:49 +000013836# Unset variables that we do not need and which cause bugs (e.g. in
13837# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13838# suppresses any "Segmentation fault" message there. '((' could
13839# trigger a bug in pdksh 5.2.14.
13840for as_var in BASH_ENV ENV MAIL MAILPATH
13841do eval test x\${$as_var+set} = xset \
13842 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013843done
13844PS1='$ '
13845PS2='> '
13846PS4='+ '
13847
13848# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000013849LC_ALL=C
13850export LC_ALL
13851LANGUAGE=C
13852export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013853
Matthias Kloseb9621712010-04-24 17:59:49 +000013854# CDPATH.
13855(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13856
13857
13858# as_fn_error ERROR [LINENO LOG_FD]
13859# ---------------------------------
13860# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13861# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
13862# script with status $?, using 1 if that was 0.
13863as_fn_error ()
13864{
13865 as_status=$?; test $as_status -eq 0 && as_status=1
13866 if test "$3"; then
13867 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13868 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
13869 fi
13870 $as_echo "$as_me: error: $1" >&2
13871 as_fn_exit $as_status
13872} # as_fn_error
13873
13874
13875# as_fn_set_status STATUS
13876# -----------------------
13877# Set $? to STATUS, without forking.
13878as_fn_set_status ()
13879{
13880 return $1
13881} # as_fn_set_status
13882
13883# as_fn_exit STATUS
13884# -----------------
13885# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13886as_fn_exit ()
13887{
13888 set +e
13889 as_fn_set_status $1
13890 exit $1
13891} # as_fn_exit
13892
13893# as_fn_unset VAR
13894# ---------------
13895# Portably unset VAR.
13896as_fn_unset ()
13897{
13898 { eval $1=; unset $1;}
13899}
13900as_unset=as_fn_unset
13901# as_fn_append VAR VALUE
13902# ----------------------
13903# Append the text in VALUE to the end of the definition contained in VAR. Take
13904# advantage of any shell optimizations that allow amortized linear growth over
13905# repeated appends, instead of the typical quadratic growth present in naive
13906# implementations.
13907if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13908 eval 'as_fn_append ()
13909 {
13910 eval $1+=\$2
13911 }'
13912else
13913 as_fn_append ()
13914 {
13915 eval $1=\$$1\$2
13916 }
13917fi # as_fn_append
13918
13919# as_fn_arith ARG...
13920# ------------------
13921# Perform arithmetic evaluation on the ARGs, and store the result in the
13922# global $as_val. Take advantage of shells that can avoid forks. The arguments
13923# must be portable across $(()) and expr.
13924if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13925 eval 'as_fn_arith ()
13926 {
13927 as_val=$(( $* ))
13928 }'
13929else
13930 as_fn_arith ()
13931 {
13932 as_val=`expr "$@" || test $? -eq 1`
13933 }
13934fi # as_fn_arith
13935
13936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013937if expr a : '\(a\)' >/dev/null 2>&1 &&
13938 test "X`expr 00001 : '.*\(...\)'`" = X001; then
13939 as_expr=expr
13940else
13941 as_expr=false
13942fi
13943
13944if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
13945 as_basename=basename
13946else
13947 as_basename=false
13948fi
13949
Matthias Kloseb9621712010-04-24 17:59:49 +000013950if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13951 as_dirname=dirname
13952else
13953 as_dirname=false
13954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013956as_me=`$as_basename -- "$0" ||
13957$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13958 X"$0" : 'X\(//\)$' \| \
13959 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000013960$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013961 sed '/^.*\/\([^/][^/]*\)\/*$/{
13962 s//\1/
13963 q
13964 }
13965 /^X\/\(\/\/\)$/{
13966 s//\1/
13967 q
13968 }
13969 /^X\/\(\/\).*/{
13970 s//\1/
13971 q
13972 }
13973 s/.*/./; q'`
13974
Matthias Kloseb9621712010-04-24 17:59:49 +000013975# Avoid depending upon Character Ranges.
13976as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13977as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13978as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13979as_cr_digits='0123456789'
13980as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013981
13982ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000013983case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013984-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000013985 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013986 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000013987 xy) ECHO_C='\c';;
13988 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
13989 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013990 esac;;
13991*)
13992 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000013993esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013994
Martin v. Löwis11437992002-04-12 09:54:03 +000013995rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013996if test -d conf$$.dir; then
13997 rm -f conf$$.dir/conf$$.file
13998else
13999 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014000 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014001fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014002if (echo >conf$$.file) 2>/dev/null; then
14003 if ln -s conf$$.file conf$$ 2>/dev/null; then
14004 as_ln_s='ln -s'
14005 # ... but there are two gotchas:
14006 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14007 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14008 # In both cases, we have to default to `cp -p'.
14009 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14010 as_ln_s='cp -p'
14011 elif ln conf$$.file conf$$ 2>/dev/null; then
14012 as_ln_s=ln
14013 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014014 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014015 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014016else
14017 as_ln_s='cp -p'
14018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014019rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14020rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014021
Matthias Kloseb9621712010-04-24 17:59:49 +000014022
14023# as_fn_mkdir_p
14024# -------------
14025# Create "$as_dir" as a directory, including parents if necessary.
14026as_fn_mkdir_p ()
14027{
14028
14029 case $as_dir in #(
14030 -*) as_dir=./$as_dir;;
14031 esac
14032 test -d "$as_dir" || eval $as_mkdir_p || {
14033 as_dirs=
14034 while :; do
14035 case $as_dir in #(
14036 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14037 *) as_qdir=$as_dir;;
14038 esac
14039 as_dirs="'$as_qdir' $as_dirs"
14040 as_dir=`$as_dirname -- "$as_dir" ||
14041$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14042 X"$as_dir" : 'X\(//\)[^/]' \| \
14043 X"$as_dir" : 'X\(//\)$' \| \
14044 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14045$as_echo X"$as_dir" |
14046 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14047 s//\1/
14048 q
14049 }
14050 /^X\(\/\/\)[^/].*/{
14051 s//\1/
14052 q
14053 }
14054 /^X\(\/\/\)$/{
14055 s//\1/
14056 q
14057 }
14058 /^X\(\/\).*/{
14059 s//\1/
14060 q
14061 }
14062 s/.*/./; q'`
14063 test -d "$as_dir" && break
14064 done
14065 test -z "$as_dirs" || eval "mkdir $as_dirs"
14066 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
14067
14068
14069} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014070if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014071 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014072else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014073 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014074 as_mkdir_p=false
14075fi
14076
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014077if test -x / >/dev/null 2>&1; then
14078 as_test_x='test -x'
14079else
14080 if ls -dL / >/dev/null 2>&1; then
14081 as_ls_L_option=L
14082 else
14083 as_ls_L_option=
14084 fi
14085 as_test_x='
14086 eval sh -c '\''
14087 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014088 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014089 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014090 case $1 in #(
14091 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014092 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014093 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014094 ???[sx]*):;;*)false;;esac;fi
14095 '\'' sh
14096 '
14097fi
14098as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014099
14100# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014101as_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 +000014102
14103# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014104as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014105
14106
Martin v. Löwis11437992002-04-12 09:54:03 +000014107exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014108## ----------------------------------- ##
14109## Main body of $CONFIG_STATUS script. ##
14110## ----------------------------------- ##
14111_ASEOF
14112test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014113
Matthias Kloseb9621712010-04-24 17:59:49 +000014114cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14115# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014116# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014117# values after options handling.
14118ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014119This file was extended by python $as_me 3.2, which was
Matthias Kloseb9621712010-04-24 17:59:49 +000014120generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014121
14122 CONFIG_FILES = $CONFIG_FILES
14123 CONFIG_HEADERS = $CONFIG_HEADERS
14124 CONFIG_LINKS = $CONFIG_LINKS
14125 CONFIG_COMMANDS = $CONFIG_COMMANDS
14126 $ $0 $@
14127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014128on `(hostname || uname -n) 2>/dev/null | sed 1q`
14129"
14130
Martin v. Löwis11437992002-04-12 09:54:03 +000014131_ACEOF
14132
Matthias Kloseb9621712010-04-24 17:59:49 +000014133case $ac_config_files in *"
14134"*) set x $ac_config_files; shift; ac_config_files=$*;;
14135esac
14136
14137case $ac_config_headers in *"
14138"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14139esac
14140
14141
14142cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014143# Files that config.status was made for.
Antoine Pitrou042b1282010-08-13 21:15:58 +000014144config_files="`echo $ac_config_files`"
14145config_headers="`echo $ac_config_headers`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014146
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014147_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014148
Matthias Kloseb9621712010-04-24 17:59:49 +000014149cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014150ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014151\`$as_me' instantiates files and other configuration actions
14152from templates according to the current configuration. Unless the files
14153and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014154
Matthias Kloseb9621712010-04-24 17:59:49 +000014155Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014156
14157 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014158 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014159 --config print configuration, then exit
14160 -q, --quiet, --silent
14161 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014162 -d, --debug don't remove temporary files
14163 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 --file=FILE[:TEMPLATE]
14165 instantiate the configuration file FILE
14166 --header=FILE[:TEMPLATE]
14167 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014168
14169Configuration files:
14170$config_files
14171
14172Configuration headers:
14173$config_headers
14174
Matthias Kloseb9621712010-04-24 17:59:49 +000014175Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014178cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14179ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014180ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014181python config.status 3.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014182configured by $0, generated by GNU Autoconf 2.65,
14183 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014184
Matthias Kloseb9621712010-04-24 17:59:49 +000014185Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014186This config.status script is free software; the Free Software Foundation
14187gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014188
14189ac_pwd='$ac_pwd'
14190srcdir='$srcdir'
14191INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014192test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014193_ACEOF
14194
Matthias Kloseb9621712010-04-24 17:59:49 +000014195cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14196# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014197ac_need_defaults=:
14198while test $# != 0
14199do
14200 case $1 in
14201 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014202 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14203 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014204 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014205 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014206 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014207 ac_option=$1
14208 ac_optarg=$2
14209 ac_shift=shift
14210 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014211 esac
14212
Skip Montanaro6dead952003-09-25 14:50:04 +000014213 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014214 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014215 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14216 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014217 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014218 $as_echo "$ac_cs_version"; exit ;;
14219 --config | --confi | --conf | --con | --co | --c )
14220 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014221 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014222 debug=: ;;
14223 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014224 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014225 case $ac_optarg in
14226 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14227 esac
14228 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014229 ac_need_defaults=false;;
14230 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014231 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014232 case $ac_optarg in
14233 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14234 esac
14235 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014236 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014237 --he | --h)
14238 # Conflict between --help and --header
Matthias Kloseb9621712010-04-24 17:59:49 +000014239 as_fn_error "ambiguous option: \`$1'
14240Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014241 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014242 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014243 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14244 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14245 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014246
14247 # This is an error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014248 -*) as_fn_error "unrecognized option: \`$1'
14249Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014250
Matthias Kloseb9621712010-04-24 17:59:49 +000014251 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014252 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014253
14254 esac
14255 shift
14256done
14257
Skip Montanaro6dead952003-09-25 14:50:04 +000014258ac_configure_extra_args=
14259
14260if $ac_cs_silent; then
14261 exec 6>/dev/null
14262 ac_configure_extra_args="$ac_configure_extra_args --silent"
14263fi
14264
14265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014266cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014267if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014268 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14269 shift
14270 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14271 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014272 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014273 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014274fi
14275
Martin v. Löwis11437992002-04-12 09:54:03 +000014276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014277cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014278exec 5>>config.log
14279{
14280 echo
14281 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14282## Running $as_me. ##
14283_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014284 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014285} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014286
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014288cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014289_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014290
Matthias Kloseb9621712010-04-24 17:59:49 +000014291cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014292
14293# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014294for ac_config_target in $ac_config_targets
14295do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014296 case $ac_config_target in
14297 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14298 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14299 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014300 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14301 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014302 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14303 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014304 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014305
Matthias Kloseb9621712010-04-24 17:59:49 +000014306 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014307 esac
14308done
14309
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014310
Martin v. Löwis11437992002-04-12 09:54:03 +000014311# If the user did not use the arguments to specify the items to instantiate,
14312# then the envvar interface is used. Set only those that are not.
14313# We use the long form for the default assignment because of an extremely
14314# bizarre bug on SunOS 4.1.3.
14315if $ac_need_defaults; then
14316 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14317 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14318fi
14319
Skip Montanaro6dead952003-09-25 14:50:04 +000014320# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014321# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014322# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014323# Hook for its removal unless debugging.
14324# Note that there is a small window in which the directory will not be cleaned:
14325# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014326$debug ||
14327{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014328 tmp=
14329 trap 'exit_status=$?
14330 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14331' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014332 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014333}
Martin v. Löwis11437992002-04-12 09:54:03 +000014334# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014335
Martin v. Löwis11437992002-04-12 09:54:03 +000014336{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014337 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014338 test -n "$tmp" && test -d "$tmp"
14339} ||
14340{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014341 tmp=./conf$$-$RANDOM
14342 (umask 077 && mkdir "$tmp")
Matthias Kloseb9621712010-04-24 17:59:49 +000014343} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014344
Matthias Kloseb9621712010-04-24 17:59:49 +000014345# Set up the scripts for CONFIG_FILES section.
14346# No need to generate them if there are no CONFIG_FILES.
14347# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014348if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014349
Matthias Kloseb9621712010-04-24 17:59:49 +000014350
14351ac_cr=`echo X | tr X '\015'`
14352# On cygwin, bash can eat \r inside `` if the user requested igncr.
14353# But we know of no other shell where ac_cr would be empty at this
14354# point, so we can use a bashism as a fallback.
14355if test "x$ac_cr" = x; then
14356 eval ac_cr=\$\'\\r\'
14357fi
14358ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14359if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14360 ac_cs_awk_cr='\r'
14361else
14362 ac_cs_awk_cr=$ac_cr
14363fi
14364
14365echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014366_ACEOF
14367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014368
Matthias Kloseb9621712010-04-24 17:59:49 +000014369{
14370 echo "cat >conf$$subs.awk <<_ACEOF" &&
14371 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14372 echo "_ACEOF"
14373} >conf$$subs.sh ||
14374 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14375ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014376ac_delim='%!_!# '
14377for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014378 . ./conf$$subs.sh ||
14379 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014380
Matthias Kloseb9621712010-04-24 17:59:49 +000014381 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14382 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014383 break
14384 elif $ac_last_try; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014385 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014386 else
14387 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014388 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014389done
Matthias Kloseb9621712010-04-24 17:59:49 +000014390rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014391
Matthias Kloseb9621712010-04-24 17:59:49 +000014392cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14393cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014395sed -n '
14396h
14397s/^/S["/; s/!.*/"]=/
14398p
14399g
14400s/^[^!]*!//
14401:repl
14402t repl
14403s/'"$ac_delim"'$//
14404t delim
14405:nl
14406h
14407s/\(.\{148\}\)..*/\1/
14408t more1
14409s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14410p
14411n
14412b repl
14413:more1
14414s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14415p
14416g
14417s/.\{148\}//
14418t nl
14419:delim
14420h
14421s/\(.\{148\}\)..*/\1/
14422t more2
14423s/["\\]/\\&/g; s/^/"/; s/$/"/
14424p
14425b
14426:more2
14427s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14428p
14429g
14430s/.\{148\}//
14431t delim
14432' <conf$$subs.awk | sed '
14433/^[^""]/{
14434 N
14435 s/\n//
14436}
14437' >>$CONFIG_STATUS || ac_write_fail=1
14438rm -f conf$$subs.awk
14439cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14440_ACAWK
14441cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14442 for (key in S) S_is_set[key] = 1
14443 FS = ""
14444
14445}
14446{
14447 line = $ 0
14448 nfields = split(line, field, "@")
14449 substed = 0
14450 len = length(field[1])
14451 for (i = 2; i < nfields; i++) {
14452 key = field[i]
14453 keylen = length(key)
14454 if (S_is_set[key]) {
14455 value = S[key]
14456 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14457 len += length(value) + length(field[++i])
14458 substed = 1
14459 } else
14460 len += 1 + keylen
14461 }
14462
14463 print line
14464}
14465
14466_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014468cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14469if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14470 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14471else
14472 cat
14473fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14474 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014475_ACEOF
14476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014477# VPATH may cause trouble with some makes, so we remove $(srcdir),
14478# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14479# trailing colons and then remove the whole line if VPATH becomes empty
14480# (actually we leave an empty line to preserve line numbers).
14481if test "x$srcdir" = x.; then
14482 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14483s/:*\$(srcdir):*/:/
14484s/:*\${srcdir}:*/:/
14485s/:*@srcdir@:*/:/
14486s/^\([^=]*=[ ]*\):*/\1/
14487s/:*$//
14488s/^[^=]*=[ ]*$//
14489}'
14490fi
14491
Matthias Kloseb9621712010-04-24 17:59:49 +000014492cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014493fi # test -n "$CONFIG_FILES"
14494
Matthias Kloseb9621712010-04-24 17:59:49 +000014495# Set up the scripts for CONFIG_HEADERS section.
14496# No need to generate them if there are no CONFIG_HEADERS.
14497# This happens for instance with `./config.status Makefile'.
14498if test -n "$CONFIG_HEADERS"; then
14499cat >"$tmp/defines.awk" <<\_ACAWK ||
14500BEGIN {
14501_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014502
Matthias Kloseb9621712010-04-24 17:59:49 +000014503# Transform confdefs.h into an awk script `defines.awk', embedded as
14504# here-document in config.status, that substitutes the proper values into
14505# config.h.in to produce config.h.
14506
14507# Create a delimiter string that does not exist in confdefs.h, to ease
14508# handling of long lines.
14509ac_delim='%!_!# '
14510for ac_last_try in false false :; do
14511 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14512 if test -z "$ac_t"; then
14513 break
14514 elif $ac_last_try; then
14515 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
14516 else
14517 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14518 fi
14519done
14520
14521# For the awk script, D is an array of macro values keyed by name,
14522# likewise P contains macro parameters if any. Preserve backslash
14523# newline sequences.
14524
14525ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14526sed -n '
14527s/.\{148\}/&'"$ac_delim"'/g
14528t rset
14529:rset
14530s/^[ ]*#[ ]*define[ ][ ]*/ /
14531t def
14532d
14533:def
14534s/\\$//
14535t bsnl
14536s/["\\]/\\&/g
14537s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14538D["\1"]=" \3"/p
14539s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14540d
14541:bsnl
14542s/["\\]/\\&/g
14543s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14544D["\1"]=" \3\\\\\\n"\\/p
14545t cont
14546s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14547t cont
14548d
14549:cont
14550n
14551s/.\{148\}/&'"$ac_delim"'/g
14552t clear
14553:clear
14554s/\\$//
14555t bsnlc
14556s/["\\]/\\&/g; s/^/"/; s/$/"/p
14557d
14558:bsnlc
14559s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14560b cont
14561' <confdefs.h | sed '
14562s/'"$ac_delim"'/"\\\
14563"/g' >>$CONFIG_STATUS || ac_write_fail=1
14564
14565cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14566 for (key in D) D_is_set[key] = 1
14567 FS = ""
14568}
14569/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14570 line = \$ 0
14571 split(line, arg, " ")
14572 if (arg[1] == "#") {
14573 defundef = arg[2]
14574 mac1 = arg[3]
14575 } else {
14576 defundef = substr(arg[1], 2)
14577 mac1 = arg[2]
14578 }
14579 split(mac1, mac2, "(") #)
14580 macro = mac2[1]
14581 prefix = substr(line, 1, index(line, defundef) - 1)
14582 if (D_is_set[macro]) {
14583 # Preserve the white space surrounding the "#".
14584 print prefix "define", macro P[macro] D[macro]
14585 next
14586 } else {
14587 # Replace #undef with comments. This is necessary, for example,
14588 # in the case of _POSIX_SOURCE, which is predefined and required
14589 # on some systems where configure will not decide to define it.
14590 if (defundef == "undef") {
14591 print "/*", prefix defundef, macro, "*/"
14592 next
14593 }
14594 }
14595}
14596{ print }
14597_ACAWK
14598_ACEOF
14599cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14600 as_fn_error "could not setup config headers machinery" "$LINENO" 5
14601fi # test -n "$CONFIG_HEADERS"
14602
14603
14604eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14605shift
14606for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014607do
14608 case $ac_tag in
14609 :[FHLC]) ac_mode=$ac_tag; continue;;
14610 esac
14611 case $ac_mode$ac_tag in
14612 :[FHL]*:*);;
Matthias Kloseb9621712010-04-24 17:59:49 +000014613 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014614 :[FH]-) ac_tag=-:-;;
14615 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14616 esac
14617 ac_save_IFS=$IFS
14618 IFS=:
14619 set x $ac_tag
14620 IFS=$ac_save_IFS
14621 shift
14622 ac_file=$1
14623 shift
14624
14625 case $ac_mode in
14626 :L) ac_source=$1;;
14627 :[FH])
14628 ac_file_inputs=
14629 for ac_f
14630 do
14631 case $ac_f in
14632 -) ac_f="$tmp/stdin";;
14633 *) # Look for the file first in the build tree, then in the source tree
14634 # (if the path is not absolute). The absolute path cannot be DOS-style,
14635 # because $ac_f cannot contain `:'.
14636 test -f "$ac_f" ||
14637 case $ac_f in
14638 [\\/$]*) false;;
14639 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14640 esac ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014641 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014642 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014643 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14644 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014645 done
14646
14647 # Let's still pretend it is `configure' which instantiates (i.e., don't
14648 # use $as_me), people would be surprised to read:
14649 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014650 configure_input='Generated from '`
14651 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14652 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014653 if test x"$ac_file" != x-; then
14654 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014655 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14656$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014657 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014658 # Neutralize special characters interpreted by sed in replacement strings.
14659 case $configure_input in #(
14660 *\&* | *\|* | *\\* )
14661 ac_sed_conf_input=`$as_echo "$configure_input" |
14662 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14663 *) ac_sed_conf_input=$configure_input;;
14664 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014665
14666 case $ac_tag in
Matthias Kloseb9621712010-04-24 17:59:49 +000014667 *:-:* | *:-) cat >"$tmp/stdin" \
14668 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014669 esac
14670 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014671 esac
14672
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014673 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014674$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014675 X"$ac_file" : 'X\(//\)[^/]' \| \
14676 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014677 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014678$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014679 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14680 s//\1/
14681 q
14682 }
14683 /^X\(\/\/\)[^/].*/{
14684 s//\1/
14685 q
14686 }
14687 /^X\(\/\/\)$/{
14688 s//\1/
14689 q
14690 }
14691 /^X\(\/\).*/{
14692 s//\1/
14693 q
14694 }
14695 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014696 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014697 ac_builddir=.
14698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014699case "$ac_dir" in
14700.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14701*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014702 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014703 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014704 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014705 case $ac_top_builddir_sub in
14706 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14707 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14708 esac ;;
14709esac
14710ac_abs_top_builddir=$ac_pwd
14711ac_abs_builddir=$ac_pwd$ac_dir_suffix
14712# for backward compatibility:
14713ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014714
14715case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014716 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014717 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014718 ac_top_srcdir=$ac_top_builddir_sub
14719 ac_abs_top_srcdir=$ac_pwd ;;
14720 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014721 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014722 ac_top_srcdir=$srcdir
14723 ac_abs_top_srcdir=$srcdir ;;
14724 *) # Relative name.
14725 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14726 ac_top_srcdir=$ac_top_build_prefix$srcdir
14727 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014728esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014729ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014730
Martin v. Löwis11437992002-04-12 09:54:03 +000014731
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014732 case $ac_mode in
14733 :F)
14734 #
14735 # CONFIG_FILE
14736 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014737
14738 case $INSTALL in
14739 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014740 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014741 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014742_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014743
Matthias Kloseb9621712010-04-24 17:59:49 +000014744cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014745# If the template does not know about datarootdir, expand it.
14746# FIXME: This hack should be removed a few years after 2.60.
14747ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014748ac_sed_dataroot='
14749/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014750 p
14751 q
14752}
14753/@datadir@/p
14754/@docdir@/p
14755/@infodir@/p
14756/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014757/@mandir@/p'
14758case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014759*datarootdir*) ac_datarootdir_seen=yes;;
14760*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14762$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014764cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014765 ac_datarootdir_hack='
14766 s&@datadir@&$datadir&g
14767 s&@docdir@&$docdir&g
14768 s&@infodir@&$infodir&g
14769 s&@localedir@&$localedir&g
14770 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014771 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014772esac
14773_ACEOF
14774
14775# Neutralize VPATH when `$srcdir' = `.'.
14776# Shell code in configure.ac might set extrasub.
14777# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014778cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14779ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014780$extrasub
14781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014782cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014783:t
14784/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014785s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014786s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014787s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014788s&@srcdir@&$ac_srcdir&;t t
14789s&@abs_srcdir@&$ac_abs_srcdir&;t t
14790s&@top_srcdir@&$ac_top_srcdir&;t t
14791s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14792s&@builddir@&$ac_builddir&;t t
14793s&@abs_builddir@&$ac_abs_builddir&;t t
14794s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14795s&@INSTALL@&$ac_INSTALL&;t t
14796$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014797"
14798eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
14799 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014801test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14802 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14803 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014804 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014805which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014806$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014807which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014809 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014810 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +000014811 -) cat "$tmp/out" && rm -f "$tmp/out";;
14812 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14813 esac \
14814 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014815 ;;
14816 :H)
14817 #
14818 # CONFIG_HEADER
14819 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014820 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014821 {
14822 $as_echo "/* $configure_input */" \
14823 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14824 } >"$tmp/config.h" \
14825 || as_fn_error "could not create $ac_file" "$LINENO" 5
14826 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14827 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14828$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014829 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014830 rm -f "$ac_file"
14831 mv "$tmp/config.h" "$ac_file" \
14832 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014833 fi
14834 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014835 $as_echo "/* $configure_input */" \
14836 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
14837 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014838 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014839 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014840
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014841
14842 esac
14843
14844done # for ac_tag
14845
Guido van Rossum627b2d71993-12-24 10:39:16 +000014846
Matthias Kloseb9621712010-04-24 17:59:49 +000014847as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000014848_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014849ac_clean_files=$ac_clean_files_save
14850
Matthias Kloseb9621712010-04-24 17:59:49 +000014851test $ac_write_fail = 0 ||
14852 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
14853
Martin v. Löwis11437992002-04-12 09:54:03 +000014854
14855# configure is writing to config.log, and then calls config.status.
14856# config.status does its own redirection, appending to config.log.
14857# Unfortunately, on DOS this fails, as config.log is still kept open
14858# by configure, so config.status won't be able to write to it; its
14859# output is simply discarded. So we exec the FD to /dev/null,
14860# effectively closing config.log, so it can be properly (re)opened and
14861# appended to by config.status. When coming back to configure, we
14862# need to make the FD available again.
14863if test "$no_create" != yes; then
14864 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000014865 ac_config_status_args=
14866 test "$silent" = yes &&
14867 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000014868 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000014869 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000014870 exec 5>>config.log
14871 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14872 # would make configure fail if this is the last instruction.
Matthias Kloseb9621712010-04-24 17:59:49 +000014873 $ac_cs_success || as_fn_exit $?
14874fi
14875if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14877$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014878fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014879
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014880
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014881echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014882if test ! -f Modules/Setup
14883then
14884 cp $srcdir/Modules/Setup.dist Modules/Setup
14885fi
14886
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014887echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014888if test ! -f Modules/Setup.local
14889then
14890 echo "# Edit this file for local setup changes" >Modules/Setup.local
14891fi
14892
14893echo "creating Makefile"
14894$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
14895 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000014896 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014897mv config.c Modules