blob: f0eb99e6daf72d0d7ccd9d6d36f7c8a243f0a7a6 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Jeffrey Yasskin39370832010-05-03 19:29:34 +00002# From configure.in Revision: 80666 .
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 Pitroub52ec782009-01-25 16:34:23 +00001424 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1425 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001426
1427Some influential environment variables:
1428 CC C compiler command
1429 CFLAGS C compiler flags
1430 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1431 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001432 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001434 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 CPP C preprocessor
1436
1437Use these variables to override the choices made by `configure' or to help
1438it to find libraries and programs with nonstandard names/locations.
1439
Georg Brandle2e15612009-05-20 18:25:10 +00001440Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001441_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001442ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001443fi
1444
1445if test "$ac_init_help" = "recursive"; then
1446 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001447 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001448 test -d "$ac_dir" ||
1449 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1450 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001451 ac_builddir=.
1452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001453case "$ac_dir" in
1454.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1455*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001456 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001457 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001458 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001459 case $ac_top_builddir_sub in
1460 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1461 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1462 esac ;;
1463esac
1464ac_abs_top_builddir=$ac_pwd
1465ac_abs_builddir=$ac_pwd$ac_dir_suffix
1466# for backward compatibility:
1467ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001468
1469case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001470 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001472 ac_top_srcdir=$ac_top_builddir_sub
1473 ac_abs_top_srcdir=$ac_pwd ;;
1474 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001476 ac_top_srcdir=$srcdir
1477 ac_abs_top_srcdir=$srcdir ;;
1478 *) # Relative name.
1479 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1480 ac_top_srcdir=$ac_top_build_prefix$srcdir
1481 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001482esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001483ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001484
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001485 cd "$ac_dir" || { ac_status=$?; continue; }
1486 # Check for guested configure.
1487 if test -f "$ac_srcdir/configure.gnu"; then
1488 echo &&
1489 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1490 elif test -f "$ac_srcdir/configure"; then
1491 echo &&
1492 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001493 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001494 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001495 fi || ac_status=$?
1496 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001497 done
1498fi
1499
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001500test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001501if $ac_init_version; then
1502 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001503python configure 3.2
Matthias Kloseb9621712010-04-24 17:59:49 +00001504generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001505
Matthias Kloseb9621712010-04-24 17:59:49 +00001506Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001507This configure script is free software; the Free Software Foundation
1508gives unlimited permission to copy, distribute and modify it.
1509_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001510 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001511fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001512
1513## ------------------------ ##
1514## Autoconf initialization. ##
1515## ------------------------ ##
1516
1517# ac_fn_c_try_compile LINENO
1518# --------------------------
1519# Try to compile conftest.$ac_ext, and return whether this succeeded.
1520ac_fn_c_try_compile ()
1521{
1522 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1523 rm -f conftest.$ac_objext
1524 if { { ac_try="$ac_compile"
1525case "(($ac_try" in
1526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1527 *) ac_try_echo=$ac_try;;
1528esac
1529eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1530$as_echo "$ac_try_echo"; } >&5
1531 (eval "$ac_compile") 2>conftest.err
1532 ac_status=$?
1533 if test -s conftest.err; then
1534 grep -v '^ *+' conftest.err >conftest.er1
1535 cat conftest.er1 >&5
1536 mv -f conftest.er1 conftest.err
1537 fi
1538 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1539 test $ac_status = 0; } && {
1540 test -z "$ac_c_werror_flag" ||
1541 test ! -s conftest.err
1542 } && test -s conftest.$ac_objext; then :
1543 ac_retval=0
1544else
1545 $as_echo "$as_me: failed program was:" >&5
1546sed 's/^/| /' conftest.$ac_ext >&5
1547
1548 ac_retval=1
1549fi
1550 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1551 as_fn_set_status $ac_retval
1552
1553} # ac_fn_c_try_compile
1554
1555# ac_fn_c_try_cpp LINENO
1556# ----------------------
1557# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1558ac_fn_c_try_cpp ()
1559{
1560 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1561 if { { ac_try="$ac_cpp conftest.$ac_ext"
1562case "(($ac_try" in
1563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1564 *) ac_try_echo=$ac_try;;
1565esac
1566eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1567$as_echo "$ac_try_echo"; } >&5
1568 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1569 ac_status=$?
1570 if test -s conftest.err; then
1571 grep -v '^ *+' conftest.err >conftest.er1
1572 cat conftest.er1 >&5
1573 mv -f conftest.er1 conftest.err
1574 fi
1575 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1576 test $ac_status = 0; } >/dev/null && {
1577 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1578 test ! -s conftest.err
1579 }; then :
1580 ac_retval=0
1581else
1582 $as_echo "$as_me: failed program was:" >&5
1583sed 's/^/| /' conftest.$ac_ext >&5
1584
1585 ac_retval=1
1586fi
1587 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1588 as_fn_set_status $ac_retval
1589
1590} # ac_fn_c_try_cpp
1591
1592# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1593# -------------------------------------------------------
1594# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1595# the include files in INCLUDES and setting the cache variable VAR
1596# accordingly.
1597ac_fn_c_check_header_mongrel ()
1598{
1599 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1600 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1602$as_echo_n "checking for $2... " >&6; }
1603if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1604 $as_echo_n "(cached) " >&6
1605fi
1606eval ac_res=\$$3
1607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1608$as_echo "$ac_res" >&6; }
1609else
1610 # Is the header compilable?
1611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1612$as_echo_n "checking $2 usability... " >&6; }
1613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1614/* end confdefs.h. */
1615$4
1616#include <$2>
1617_ACEOF
1618if ac_fn_c_try_compile "$LINENO"; then :
1619 ac_header_compiler=yes
1620else
1621 ac_header_compiler=no
1622fi
1623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1625$as_echo "$ac_header_compiler" >&6; }
1626
1627# Is the header present?
1628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1629$as_echo_n "checking $2 presence... " >&6; }
1630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1631/* end confdefs.h. */
1632#include <$2>
1633_ACEOF
1634if ac_fn_c_try_cpp "$LINENO"; then :
1635 ac_header_preproc=yes
1636else
1637 ac_header_preproc=no
1638fi
1639rm -f conftest.err conftest.$ac_ext
1640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1641$as_echo "$ac_header_preproc" >&6; }
1642
1643# So? What about this header?
1644case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1645 yes:no: )
1646 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1647$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1648 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1649$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1650 ;;
1651 no:yes:* )
1652 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1653$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1654 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1655$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1656 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1657$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1659$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1661$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1662( cat <<\_ASBOX
1663## -------------------------------------- ##
1664## Report this to http://bugs.python.org/ ##
1665## -------------------------------------- ##
1666_ASBOX
1667 ) | sed "s/^/$as_me: WARNING: /" >&2
1668 ;;
1669esac
1670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1671$as_echo_n "checking for $2... " >&6; }
1672if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1673 $as_echo_n "(cached) " >&6
1674else
1675 eval "$3=\$ac_header_compiler"
1676fi
1677eval ac_res=\$$3
1678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1679$as_echo "$ac_res" >&6; }
1680fi
1681 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1682
1683} # ac_fn_c_check_header_mongrel
1684
1685# ac_fn_c_try_run LINENO
1686# ----------------------
1687# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1688# that executables *can* be run.
1689ac_fn_c_try_run ()
1690{
1691 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1692 if { { ac_try="$ac_link"
1693case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_link") 2>&5
1700 ac_status=$?
1701 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1702 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1703 { { case "(($ac_try" in
1704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1705 *) ac_try_echo=$ac_try;;
1706esac
1707eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1708$as_echo "$ac_try_echo"; } >&5
1709 (eval "$ac_try") 2>&5
1710 ac_status=$?
1711 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1712 test $ac_status = 0; }; }; then :
1713 ac_retval=0
1714else
1715 $as_echo "$as_me: program exited with status $ac_status" >&5
1716 $as_echo "$as_me: failed program was:" >&5
1717sed 's/^/| /' conftest.$ac_ext >&5
1718
1719 ac_retval=$ac_status
1720fi
1721 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1722 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1723 as_fn_set_status $ac_retval
1724
1725} # ac_fn_c_try_run
1726
1727# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1728# -------------------------------------------------------
1729# Tests whether HEADER exists and can be compiled using the include files in
1730# INCLUDES, setting the cache variable VAR accordingly.
1731ac_fn_c_check_header_compile ()
1732{
1733 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1735$as_echo_n "checking for $2... " >&6; }
1736if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1737 $as_echo_n "(cached) " >&6
1738else
1739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1740/* end confdefs.h. */
1741$4
1742#include <$2>
1743_ACEOF
1744if ac_fn_c_try_compile "$LINENO"; then :
1745 eval "$3=yes"
1746else
1747 eval "$3=no"
1748fi
1749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1750fi
1751eval ac_res=\$$3
1752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1753$as_echo "$ac_res" >&6; }
1754 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1755
1756} # ac_fn_c_check_header_compile
1757
1758# ac_fn_c_try_link LINENO
1759# -----------------------
1760# Try to link conftest.$ac_ext, and return whether this succeeded.
1761ac_fn_c_try_link ()
1762{
1763 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1764 rm -f conftest.$ac_objext conftest$ac_exeext
1765 if { { ac_try="$ac_link"
1766case "(($ac_try" in
1767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1768 *) ac_try_echo=$ac_try;;
1769esac
1770eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1771$as_echo "$ac_try_echo"; } >&5
1772 (eval "$ac_link") 2>conftest.err
1773 ac_status=$?
1774 if test -s conftest.err; then
1775 grep -v '^ *+' conftest.err >conftest.er1
1776 cat conftest.er1 >&5
1777 mv -f conftest.er1 conftest.err
1778 fi
1779 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1780 test $ac_status = 0; } && {
1781 test -z "$ac_c_werror_flag" ||
1782 test ! -s conftest.err
1783 } && test -s conftest$ac_exeext && {
1784 test "$cross_compiling" = yes ||
1785 $as_test_x conftest$ac_exeext
1786 }; then :
1787 ac_retval=0
1788else
1789 $as_echo "$as_me: failed program was:" >&5
1790sed 's/^/| /' conftest.$ac_ext >&5
1791
1792 ac_retval=1
1793fi
1794 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1795 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1796 # interfere with the next link command; also delete a directory that is
1797 # left behind by Apple's compiler. We do this before executing the actions.
1798 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1799 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1800 as_fn_set_status $ac_retval
1801
1802} # ac_fn_c_try_link
1803
1804# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1805# -------------------------------------------
1806# Tests whether TYPE exists after having included INCLUDES, setting cache
1807# variable VAR accordingly.
1808ac_fn_c_check_type ()
1809{
1810 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1812$as_echo_n "checking for $2... " >&6; }
1813if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1814 $as_echo_n "(cached) " >&6
1815else
1816 eval "$3=no"
1817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1818/* end confdefs.h. */
1819$4
1820int
1821main ()
1822{
1823if (sizeof ($2))
1824 return 0;
1825 ;
1826 return 0;
1827}
1828_ACEOF
1829if ac_fn_c_try_compile "$LINENO"; then :
1830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1831/* end confdefs.h. */
1832$4
1833int
1834main ()
1835{
1836if (sizeof (($2)))
1837 return 0;
1838 ;
1839 return 0;
1840}
1841_ACEOF
1842if ac_fn_c_try_compile "$LINENO"; then :
1843
1844else
1845 eval "$3=yes"
1846fi
1847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1848fi
1849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1850fi
1851eval ac_res=\$$3
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1853$as_echo "$ac_res" >&6; }
1854 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1855
1856} # ac_fn_c_check_type
1857
1858# ac_fn_c_find_uintX_t LINENO BITS VAR
1859# ------------------------------------
1860# Finds an unsigned integer type with width BITS, setting cache variable VAR
1861# accordingly.
1862ac_fn_c_find_uintX_t ()
1863{
1864 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1866$as_echo_n "checking for uint$2_t... " >&6; }
1867if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1868 $as_echo_n "(cached) " >&6
1869else
1870 eval "$3=no"
1871 # Order is important - never check a type that is potentially smaller
1872 # than half of the expected target width.
1873 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1874 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1876/* end confdefs.h. */
1877$ac_includes_default
1878int
1879main ()
1880{
1881static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1882test_array [0] = 0
1883
1884 ;
1885 return 0;
1886}
1887_ACEOF
1888if ac_fn_c_try_compile "$LINENO"; then :
1889 case $ac_type in #(
1890 uint$2_t) :
1891 eval "$3=yes" ;; #(
1892 *) :
1893 eval "$3=\$ac_type" ;;
1894esac
1895fi
1896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1897 eval as_val=\$$3
1898 if test "x$as_val" = x""no; then :
1899
1900else
1901 break
1902fi
1903 done
1904fi
1905eval ac_res=\$$3
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1907$as_echo "$ac_res" >&6; }
1908 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1909
1910} # ac_fn_c_find_uintX_t
1911
1912# ac_fn_c_find_intX_t LINENO BITS VAR
1913# -----------------------------------
1914# Finds a signed integer type with width BITS, setting cache variable VAR
1915# accordingly.
1916ac_fn_c_find_intX_t ()
1917{
1918 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1920$as_echo_n "checking for int$2_t... " >&6; }
1921if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1922 $as_echo_n "(cached) " >&6
1923else
1924 eval "$3=no"
1925 # Order is important - never check a type that is potentially smaller
1926 # than half of the expected target width.
1927 for ac_type in int$2_t 'int' 'long int' \
1928 'long long int' 'short int' 'signed char'; do
1929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1930/* end confdefs.h. */
1931$ac_includes_default
Jeffrey Yasskin39370832010-05-03 19:29:34 +00001932 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001933int
1934main ()
1935{
Jeffrey Yasskin39370832010-05-03 19:29:34 +00001936static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001937test_array [0] = 0
1938
1939 ;
1940 return 0;
1941}
1942_ACEOF
1943if ac_fn_c_try_compile "$LINENO"; then :
1944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1945/* end confdefs.h. */
1946$ac_includes_default
Jeffrey Yasskin39370832010-05-03 19:29:34 +00001947 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001948int
1949main ()
1950{
Jeffrey Yasskin39370832010-05-03 19:29:34 +00001951static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001952 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1953test_array [0] = 0
1954
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960
1961else
1962 case $ac_type in #(
1963 int$2_t) :
1964 eval "$3=yes" ;; #(
1965 *) :
1966 eval "$3=\$ac_type" ;;
1967esac
1968fi
1969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1970fi
1971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1972 eval as_val=\$$3
1973 if test "x$as_val" = x""no; then :
1974
1975else
1976 break
1977fi
1978 done
1979fi
1980eval ac_res=\$$3
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1982$as_echo "$ac_res" >&6; }
1983 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1984
1985} # ac_fn_c_find_intX_t
1986
1987# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1988# --------------------------------------------
1989# Tries to find the compile-time value of EXPR in a program that includes
1990# INCLUDES, setting VAR accordingly. Returns whether the value could be
1991# computed
1992ac_fn_c_compute_int ()
1993{
1994 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995 if test "$cross_compiling" = yes; then
1996 # Depending upon the size, compute the lo and hi bounds.
1997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$4
2000int
2001main ()
2002{
2003static int test_array [1 - 2 * !(($2) >= 0)];
2004test_array [0] = 0
2005
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011 ac_lo=0 ac_mid=0
2012 while :; do
2013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$4
2016int
2017main ()
2018{
2019static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2020test_array [0] = 0
2021
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 ac_hi=$ac_mid; break
2028else
2029 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2030 if test $ac_lo -le $ac_mid; then
2031 ac_lo= ac_hi=
2032 break
2033 fi
2034 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2035fi
2036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2037 done
2038else
2039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2040/* end confdefs.h. */
2041$4
2042int
2043main ()
2044{
2045static int test_array [1 - 2 * !(($2) < 0)];
2046test_array [0] = 0
2047
2048 ;
2049 return 0;
2050}
2051_ACEOF
2052if ac_fn_c_try_compile "$LINENO"; then :
2053 ac_hi=-1 ac_mid=-1
2054 while :; do
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2062test_array [0] = 0
2063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_lo=$ac_mid; break
2070else
2071 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2072 if test $ac_mid -le $ac_hi; then
2073 ac_lo= ac_hi=
2074 break
2075 fi
2076 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079 done
2080else
2081 ac_lo= ac_hi=
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086# Binary search between lo and hi bounds.
2087while test "x$ac_lo" != "x$ac_hi"; do
2088 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2090/* end confdefs.h. */
2091$4
2092int
2093main ()
2094{
2095static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2096test_array [0] = 0
2097
2098 ;
2099 return 0;
2100}
2101_ACEOF
2102if ac_fn_c_try_compile "$LINENO"; then :
2103 ac_hi=$ac_mid
2104else
2105 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2106fi
2107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108done
2109case $ac_lo in #((
2110?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2111'') ac_retval=1 ;;
2112esac
2113 else
2114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117static long int longval () { return $2; }
2118static unsigned long int ulongval () { return $2; }
2119#include <stdio.h>
2120#include <stdlib.h>
2121int
2122main ()
2123{
2124
2125 FILE *f = fopen ("conftest.val", "w");
2126 if (! f)
2127 return 1;
2128 if (($2) < 0)
2129 {
2130 long int i = longval ();
2131 if (i != ($2))
2132 return 1;
2133 fprintf (f, "%ld", i);
2134 }
2135 else
2136 {
2137 unsigned long int i = ulongval ();
2138 if (i != ($2))
2139 return 1;
2140 fprintf (f, "%lu", i);
2141 }
2142 /* Do not output a trailing newline, as this causes \r\n confusion
2143 on some platforms. */
2144 return ferror (f) || fclose (f) != 0;
2145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_run "$LINENO"; then :
2151 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2152else
2153 ac_retval=1
2154fi
2155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2156 conftest.$ac_objext conftest.beam conftest.$ac_ext
2157rm -f conftest.val
2158
2159 fi
2160 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2161 as_fn_set_status $ac_retval
2162
2163} # ac_fn_c_compute_int
2164
2165# ac_fn_c_check_func LINENO FUNC VAR
2166# ----------------------------------
2167# Tests whether FUNC exists, setting the cache variable VAR accordingly
2168ac_fn_c_check_func ()
2169{
2170 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2172$as_echo_n "checking for $2... " >&6; }
2173if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2174 $as_echo_n "(cached) " >&6
2175else
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2179 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2180#define $2 innocuous_$2
2181
2182/* System header to define __stub macros and hopefully few prototypes,
2183 which can conflict with char $2 (); below.
2184 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2185 <limits.h> exists even on freestanding compilers. */
2186
2187#ifdef __STDC__
2188# include <limits.h>
2189#else
2190# include <assert.h>
2191#endif
2192
2193#undef $2
2194
2195/* Override any GCC internal prototype to avoid an error.
2196 Use char because int might match the return type of a GCC
2197 builtin and then its argument prototype would still apply. */
2198#ifdef __cplusplus
2199extern "C"
2200#endif
2201char $2 ();
2202/* The GNU C library defines this for functions which it implements
2203 to always fail with ENOSYS. Some functions are actually named
2204 something starting with __ and the normal name is an alias. */
2205#if defined __stub_$2 || defined __stub___$2
2206choke me
2207#endif
2208
2209int
2210main ()
2211{
2212return $2 ();
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217if ac_fn_c_try_link "$LINENO"; then :
2218 eval "$3=yes"
2219else
2220 eval "$3=no"
2221fi
2222rm -f core conftest.err conftest.$ac_objext \
2223 conftest$ac_exeext conftest.$ac_ext
2224fi
2225eval ac_res=\$$3
2226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2227$as_echo "$ac_res" >&6; }
2228 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2229
2230} # ac_fn_c_check_func
2231
2232# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2233# ----------------------------------------------------
2234# Tries to find if the field MEMBER exists in type AGGR, after including
2235# INCLUDES, setting cache variable VAR accordingly.
2236ac_fn_c_check_member ()
2237{
2238 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2240$as_echo_n "checking for $2.$3... " >&6; }
2241if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2242 $as_echo_n "(cached) " >&6
2243else
2244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245/* end confdefs.h. */
2246$5
2247int
2248main ()
2249{
2250static $2 ac_aggr;
2251if (ac_aggr.$3)
2252return 0;
2253 ;
2254 return 0;
2255}
2256_ACEOF
2257if ac_fn_c_try_compile "$LINENO"; then :
2258 eval "$4=yes"
2259else
2260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261/* end confdefs.h. */
2262$5
2263int
2264main ()
2265{
2266static $2 ac_aggr;
2267if (sizeof ac_aggr.$3)
2268return 0;
2269 ;
2270 return 0;
2271}
2272_ACEOF
2273if ac_fn_c_try_compile "$LINENO"; then :
2274 eval "$4=yes"
2275else
2276 eval "$4=no"
2277fi
2278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2279fi
2280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2281fi
2282eval ac_res=\$$4
2283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2284$as_echo "$ac_res" >&6; }
2285 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2286
2287} # ac_fn_c_check_member
2288
2289# ac_fn_c_check_decl LINENO SYMBOL VAR
2290# ------------------------------------
2291# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2292ac_fn_c_check_decl ()
2293{
2294 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2296$as_echo_n "checking whether $2 is declared... " >&6; }
2297if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2298 $as_echo_n "(cached) " >&6
2299else
2300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2301/* end confdefs.h. */
2302$4
2303int
2304main ()
2305{
2306#ifndef $2
2307 (void) $2;
2308#endif
2309
2310 ;
2311 return 0;
2312}
2313_ACEOF
2314if ac_fn_c_try_compile "$LINENO"; then :
2315 eval "$3=yes"
2316else
2317 eval "$3=no"
2318fi
2319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2320fi
2321eval ac_res=\$$3
2322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2323$as_echo "$ac_res" >&6; }
2324 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2325
2326} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002327cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002328This file contains any messages produced by compilers while
2329running configure, to aid debugging if configure makes a mistake.
2330
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002331It was created by python $as_me 3.2, which was
Matthias Kloseb9621712010-04-24 17:59:49 +00002332generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002333
2334 $ $0 $@
2335
2336_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002337exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002338{
2339cat <<_ASUNAME
2340## --------- ##
2341## Platform. ##
2342## --------- ##
2343
2344hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2345uname -m = `(uname -m) 2>/dev/null || echo unknown`
2346uname -r = `(uname -r) 2>/dev/null || echo unknown`
2347uname -s = `(uname -s) 2>/dev/null || echo unknown`
2348uname -v = `(uname -v) 2>/dev/null || echo unknown`
2349
2350/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2351/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2352
2353/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2354/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2355/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002356/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002357/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2358/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2359/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2360
2361_ASUNAME
2362
2363as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2364for as_dir in $PATH
2365do
2366 IFS=$as_save_IFS
2367 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002368 $as_echo "PATH: $as_dir"
2369 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002370IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002371
2372} >&5
2373
2374cat >&5 <<_ACEOF
2375
2376
2377## ----------- ##
2378## Core tests. ##
2379## ----------- ##
2380
2381_ACEOF
2382
2383
2384# Keep a trace of the command line.
2385# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002386# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002387# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002388# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002389ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002390ac_configure_args0=
2391ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002392ac_must_keep_next=false
2393for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002394do
Skip Montanaro6dead952003-09-25 14:50:04 +00002395 for ac_arg
2396 do
2397 case $ac_arg in
2398 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2399 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2400 | -silent | --silent | --silen | --sile | --sil)
2401 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002402 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002403 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002404 esac
2405 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002406 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002407 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002408 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002409 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002410 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002412 case $ac_arg in
2413 *=* | --config-cache | -C | -disable-* | --disable-* \
2414 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2415 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2416 | -with-* | --with-* | -without-* | --without-* | --x)
2417 case "$ac_configure_args0 " in
2418 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2419 esac
2420 ;;
2421 -* ) ac_must_keep_next=true ;;
2422 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002424 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 ;;
2426 esac
2427 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002428done
Matthias Kloseb9621712010-04-24 17:59:49 +00002429{ ac_configure_args0=; unset ac_configure_args0;}
2430{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002431
2432# When interrupted or exit'd, cleanup temporary files, and complete
2433# config.log. We remove comments because anyway the quotes in there
2434# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002435# WARNING: Use '\'' to represent an apostrophe within the trap.
2436# 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 +00002437trap 'exit_status=$?
2438 # Save into config.log some information that might help in debugging.
2439 {
2440 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002441
Martin v. Löwis11437992002-04-12 09:54:03 +00002442 cat <<\_ASBOX
2443## ---------------- ##
2444## Cache variables. ##
2445## ---------------- ##
2446_ASBOX
2447 echo
2448 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002449(
2450 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2451 eval ac_val=\$$ac_var
2452 case $ac_val in #(
2453 *${as_nl}*)
2454 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002455 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2456$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457 esac
2458 case $ac_var in #(
2459 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2461 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 esac ;;
2463 esac
2464 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002465 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2467 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 "s/'\''/'\''\\\\'\'''\''/g;
2470 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2471 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002472 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002474 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 esac |
2476 sort
2477)
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002479
2480 cat <<\_ASBOX
2481## ----------------- ##
2482## Output variables. ##
2483## ----------------- ##
2484_ASBOX
2485 echo
2486 for ac_var in $ac_subst_vars
2487 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 eval ac_val=\$$ac_var
2489 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002490 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002492 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002493 done | sort
2494 echo
2495
2496 if test -n "$ac_subst_files"; then
2497 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498## ------------------- ##
2499## File substitutions. ##
2500## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002501_ASBOX
2502 echo
2503 for ac_var in $ac_subst_files
2504 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505 eval ac_val=\$$ac_var
2506 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 done | sort
2511 echo
2512 fi
2513
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 if test -s confdefs.h; then
2515 cat <<\_ASBOX
2516## ----------- ##
2517## confdefs.h. ##
2518## ----------- ##
2519_ASBOX
2520 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002522 echo
2523 fi
2524 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002525 $as_echo "$as_me: caught signal $ac_signal"
2526 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 rm -f core *.core core.conftest.* &&
2529 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002532for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002533 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002534done
2535ac_signal=0
2536
2537# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002539
Matthias Kloseb9621712010-04-24 17:59:49 +00002540$as_echo "/* confdefs.h */" > confdefs.h
2541
Martin v. Löwis11437992002-04-12 09:54:03 +00002542# Predefined preprocessor variables.
2543
2544cat >>confdefs.h <<_ACEOF
2545#define PACKAGE_NAME "$PACKAGE_NAME"
2546_ACEOF
2547
Martin v. Löwis11437992002-04-12 09:54:03 +00002548cat >>confdefs.h <<_ACEOF
2549#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2550_ACEOF
2551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_VERSION "$PACKAGE_VERSION"
2554_ACEOF
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_STRING "$PACKAGE_STRING"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2562_ACEOF
2563
Matthias Kloseb9621712010-04-24 17:59:49 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_URL "$PACKAGE_URL"
2566_ACEOF
2567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568
2569# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002570# Prefer an explicitly selected file to automatically selected ones.
2571ac_site_file1=NONE
2572ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573if test -n "$CONFIG_SITE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002574 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002576 ac_site_file1=$prefix/share/config.site
2577 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578else
Matthias Kloseb9621712010-04-24 17:59:49 +00002579 ac_site_file1=$ac_default_prefix/share/config.site
2580 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002582for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583do
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 test "x$ac_site_file" = xNONE && continue
2585 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2586 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2587$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002588 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002589 . "$ac_site_file"
2590 fi
2591done
2592
2593if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 # Some versions of bash will fail to source /dev/null (special files
2595 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2596 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2597 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2598$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2601 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 esac
2603 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002604else
Matthias Kloseb9621712010-04-24 17:59:49 +00002605 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2606$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 >$cache_file
2608fi
2609
2610# Check that the precious variables saved in the cache have kept the same
2611# value.
2612ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2615 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2617 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 case $ac_old_set,$ac_new_set in
2619 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2621$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 +00002622 ac_cache_corrupted=: ;;
2623 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002624 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2625$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 ac_cache_corrupted=: ;;
2627 ,);;
2628 *)
2629 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 # differences in whitespace do not lead to failure.
2631 ac_old_val_w=`echo x $ac_old_val`
2632 ac_new_val_w=`echo x $ac_new_val`
2633 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2635$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2636 ac_cache_corrupted=:
2637 else
2638 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2639$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2640 eval $ac_var=\$ac_old_val
2641 fi
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2643$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2645$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 fi;;
2647 esac
2648 # Pass precious variables to config.status.
2649 if test "$ac_new_set" = set; then
2650 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002651 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002652 *) ac_arg=$ac_var=$ac_new_val ;;
2653 esac
2654 case " $ac_configure_args " in
2655 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002656 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 esac
2658 fi
2659done
2660if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002661 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2664$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2665 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002667## -------------------- ##
2668## Main body of script. ##
2669## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002670
Guido van Rossum7f43da71994-08-01 12:15:30 +00002671ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002672ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002673ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2674ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2675ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002676
Guido van Rossum627b2d71993-12-24 10:39:16 +00002677
Michael W. Hudson54241132001-12-07 15:38:26 +00002678
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002679ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002680
2681
Martin v. Löwis11437992002-04-12 09:54:03 +00002682
Benjamin Petersond23f8222009-04-05 19:13:16 +00002683if test "$prefix" != "/"; then
2684 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2685fi
2686
2687
Martin v. Löwis11437992002-04-12 09:54:03 +00002688
2689
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002690# We don't use PACKAGE_ variables, and they cause conflicts
2691# with other autoconf-based packages that include Python.h
2692grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2693rm confdefs.h
2694mv confdefs.h.new confdefs.h
2695
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002696
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002697VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002698
Martin v. Löwis1142de32002-03-29 16:28:31 +00002699
2700SOVERSION=1.0
2701
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002702# The later defininition of _XOPEN_SOURCE disables certain features
2703# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2704
Matthias Kloseb9621712010-04-24 17:59:49 +00002705$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002706
2707
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002708# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2709# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2710# them.
2711
Matthias Kloseb9621712010-04-24 17:59:49 +00002712$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002713
2714
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002715# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2716# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2717# them.
2718
Matthias Kloseb9621712010-04-24 17:59:49 +00002719$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002720
2721
Martin v. Löwisd6320502004-08-12 13:45:08 +00002722# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2723# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2724
Matthias Kloseb9621712010-04-24 17:59:49 +00002725$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002726
2727
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002728# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2729# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2730# them.
2731
Matthias Kloseb9621712010-04-24 17:59:49 +00002732$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002733
2734
2735
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002736define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002737
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002738# Arguments passed to configure.
2739
2740CONFIG_ARGS="$ac_configure_args"
2741
Matthias Kloseb9621712010-04-24 17:59:49 +00002742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2743$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002744# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002745if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002746 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002747 case $enableval in
2748 yes)
2749 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002750 if test ! -d "${enableval}"
2751 then
2752 enableval=/
2753 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002754 ;;
2755 esac
2756 case $enableval in
2757 no)
2758 UNIVERSALSDK=
2759 enable_universalsdk=
2760 ;;
2761 *)
2762 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002763 if test ! -d "${UNIVERSALSDK}"
2764 then
Matthias Kloseb9621712010-04-24 17:59:49 +00002765 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002766 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002767 ;;
2768 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002769
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002770
Thomas Wouters477c8d52006-05-27 19:21:47 +00002771else
2772
2773 UNIVERSALSDK=
2774 enable_universalsdk=
2775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002776fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002777
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002778if test -n "${UNIVERSALSDK}"
2779then
Matthias Kloseb9621712010-04-24 17:59:49 +00002780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2781$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002782else
Matthias Kloseb9621712010-04-24 17:59:49 +00002783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2784$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002785fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002787
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002788
2789
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002790UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002791
Matthias Kloseb9621712010-04-24 17:59:49 +00002792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2793$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002794
2795# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002796if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002797 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2799$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002800 UNIVERSAL_ARCHS="$withval"
2801
2802else
2803
Matthias Kloseb9621712010-04-24 17:59:49 +00002804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2805$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002806
2807fi
2808
2809
2810
2811
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002812
2813# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002814if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002815 withval=$with_framework_name;
2816 PYTHONFRAMEWORK=${withval}
2817 PYTHONFRAMEWORKDIR=${withval}.framework
2818 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2819
2820else
2821
2822 PYTHONFRAMEWORK=Python
2823 PYTHONFRAMEWORKDIR=Python.framework
2824 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2825
2826fi
2827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002828# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002829if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002830 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002831 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002832 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002833 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002834 esac
2835 case $enableval in
2836 no)
2837 PYTHONFRAMEWORK=
2838 PYTHONFRAMEWORKDIR=no-framework
2839 PYTHONFRAMEWORKPREFIX=
2840 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002841 FRAMEWORKINSTALLFIRST=
2842 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002843 FRAMEWORKALTINSTALLFIRST=
2844 FRAMEWORKALTINSTALLLAST=
2845 if test "x${prefix}" = "xNONE"; then
2846 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2847 else
2848 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2849 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002850 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002851 ;;
2852 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002853 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002854 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002855 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002856 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002857 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2858 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002859 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002860
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002861 if test "x${prefix}" = "xNONE" ; then
2862 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002863
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002864 else
2865 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2866 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002867
2868 case "${enableval}" in
2869 /System*)
2870 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2871 if test "${prefix}" = "NONE" ; then
2872 # See below
2873 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2874 fi
2875 ;;
2876
2877 /Library*)
2878 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2879 ;;
2880
2881 */Library/Frameworks)
2882 MDIR="`dirname "${enableval}"`"
2883 MDIR="`dirname "${MDIR}"`"
2884 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2885
2886 if test "${prefix}" = "NONE"; then
2887 # User hasn't specified the
2888 # --prefix option, but wants to install
2889 # the framework in a non-default location,
2890 # ensure that the compatibility links get
2891 # installed relative to that prefix as well
2892 # instead of in /usr/local.
2893 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2894 fi
2895 ;;
2896
2897 *)
2898 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2899 ;;
2900 esac
2901
Jack Jansen127e56e2001-09-11 14:41:54 +00002902 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002903
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002904 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002905 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002906 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002908 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002909
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002910 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2911
2912 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2913
Jack Jansene578a632001-08-15 01:27:14 +00002914 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002915
Guido van Rossum563e7081996-09-10 18:20:48 +00002916else
Martin v. Löwis11437992002-04-12 09:54:03 +00002917
Jack Jansene578a632001-08-15 01:27:14 +00002918 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002919 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002920 PYTHONFRAMEWORKPREFIX=
2921 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002922 FRAMEWORKINSTALLFIRST=
2923 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002924 FRAMEWORKALTINSTALLFIRST=
2925 FRAMEWORKALTINSTALLLAST=
2926 if test "x${prefix}" = "xNONE" ; then
2927 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2928 else
2929 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2930 fi
Jack Jansene578a632001-08-15 01:27:14 +00002931 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002932
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002933
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002934fi
2935
Thomas Wouters477c8d52006-05-27 19:21:47 +00002936
2937
Michael W. Hudson54241132001-12-07 15:38:26 +00002938
2939
2940
2941
Jack Jansene578a632001-08-15 01:27:14 +00002942
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002943
2944
2945
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002946
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002947
Jack Jansene578a632001-08-15 01:27:14 +00002948##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002949## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002950## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002951##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002952# Set name for machine-dependent library files
2953
Matthias Kloseb9621712010-04-24 17:59:49 +00002954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2955$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002956if test -z "$MACHDEP"
2957then
Guido van Rossum563e7081996-09-10 18:20:48 +00002958 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002959 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002960 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002961 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002962 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002963 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002964 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002965 ac_md_system=`echo $ac_sys_system |
2966 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2967 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002968 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002969 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002970
Guido van Rossum07397971997-04-29 21:49:50 +00002971 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002972 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002973 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002974 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002975 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002976 esac
2977fi
Guido van Rossum91922671997-10-09 20:24:13 +00002978
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002979# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2980# disable features if it is defined, without any means to access these
2981# features as extensions. For these systems, we skip the definition of
2982# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2983# some feature, make sure there is no alternative way to access this
2984# feature. Also, when using wildcards, make sure you have verified the
2985# need for not defining _XOPEN_SOURCE on all systems matching the
2986# wildcard, and that the wildcard does not include future systems
2987# (which may remove their limitations).
2988case $ac_sys_system/$ac_sys_release in
2989 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2990 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002991 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002992 # In addition, Stefan Krah confirms that issue #1244610 exists through
2993 # OpenBSD 4.6, but is fixed in 4.7.
2994 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002995 define_xopen_source=no
2996 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2997 # also defined. This can be overridden by defining _BSD_SOURCE
2998 # As this has a different meaning on Linux, only define it on OpenBSD
2999
Matthias Kloseb9621712010-04-24 17:59:49 +00003000$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003001
3002 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003003 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003004 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3005 # also defined. This can be overridden by defining _BSD_SOURCE
3006 # As this has a different meaning on Linux, only define it on OpenBSD
3007
Matthias Kloseb9621712010-04-24 17:59:49 +00003008$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003009
3010 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003011 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3012 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3013 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003014 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 +00003015 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003016 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
3017 # of union __?sigval. Reported by Stuart Bishop.
3018 SunOS/5.6)
3019 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003020 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3021 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003022 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003023 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003024 define_xopen_source=no;;
3025 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003026 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003027 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003028 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003029 # On FreeBSD 4, the math functions C89 does not cover are never defined
3030 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3031 FreeBSD/4.*)
3032 define_xopen_source=no;;
3033 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3034 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3035 # identifies itself as Darwin/7.*
3036 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3037 # disables platform specific features beyond repair.
3038 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3039 # has no effect, don't bother defining them
3040 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003041 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003042 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003043 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003044 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3045 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3046 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003047 AIX/4)
3048 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003049 AIX/5)
3050 if test `uname -r` -eq 1; then
3051 define_xopen_source=no
3052 fi
3053 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003054 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3055 # defining NI_NUMERICHOST.
3056 QNX/6.3.2)
3057 define_xopen_source=no
3058 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003059
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003060esac
3061
3062if test $define_xopen_source = yes
3063then
Skip Montanarof0d5f792004-08-15 14:08:23 +00003064 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
3065 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00003066 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
3067 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00003068 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00003069 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00003070
Matthias Kloseb9621712010-04-24 17:59:49 +00003071$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
Skip Montanarof0d5f792004-08-15 14:08:23 +00003072
3073 ;;
3074 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003075
Matthias Kloseb9621712010-04-24 17:59:49 +00003076$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003077
Skip Montanarof0d5f792004-08-15 14:08:23 +00003078 ;;
3079 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003080
3081 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3082 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3083 # several APIs are not declared. Since this is also needed in some
3084 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00003085 # except for Solaris 10, where it must not be defined,
3086 # as it implies XPG4.2
3087 case $ac_sys_system/$ac_sys_release in
3088 SunOS/5.10)
3089 ;;
3090 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003091
Matthias Kloseb9621712010-04-24 17:59:49 +00003092$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003093
Martin v. Löwis7dece662005-11-26 11:38:24 +00003094 ;;
3095 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003096
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003097
Matthias Kloseb9621712010-04-24 17:59:49 +00003098$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003099
3100
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003101fi
3102
Guido van Rossum91922671997-10-09 20:24:13 +00003103#
3104# SGI compilers allow the specification of the both the ABI and the
3105# ISA on the command line. Depending on the values of these switches,
3106# different and often incompatable code will be generated.
3107#
3108# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3109# thus supply support for various ABI/ISA combinations. The MACHDEP
3110# variable is also adjusted.
3111#
3112
3113if test ! -z "$SGI_ABI"
3114then
3115 CC="cc $SGI_ABI"
3116 LDFLAGS="$SGI_ABI $LDFLAGS"
3117 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3120$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003121
Jack Jansen6b08a402004-06-03 12:41:45 +00003122# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3123# it may influence the way we can build extensions, so distutils
3124# needs to check it
3125
Thomas Wouters477c8d52006-05-27 19:21:47 +00003126
Jack Jansen6b08a402004-06-03 12:41:45 +00003127CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003128EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003129
Matthias Kloseb9621712010-04-24 17:59:49 +00003130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3131$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003132ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3134$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003135
Guido van Rossum627b2d71993-12-24 10:39:16 +00003136# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003137
3138# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3139# for debug/optimization stuff. BASECFLAGS is for flags that are required
3140# just to get things to compile and link. Users are free to override OPT
3141# when running configure or make. The build should not break if they do.
3142# BASECFLAGS should generally not be messed with, however.
3143
3144# XXX shouldn't some/most/all of this code be merged with the stuff later
3145# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3147$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003148
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003149# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003150if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003151 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003152 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003153 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003154 without_gcc=yes;;
3155 yes) CC=gcc
3156 without_gcc=no;;
3157 *) CC=$withval
3158 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003159 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003160else
Martin v. Löwis11437992002-04-12 09:54:03 +00003161
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003162 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003163 AIX*) CC=cc_r
3164 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003165 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003166 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003167fi
3168
Matthias Kloseb9621712010-04-24 17:59:49 +00003169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3170$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003171
Guido van Rossum8b131c51995-03-09 14:10:13 +00003172# If the user switches compilers, we can't believe the cache
3173if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3174then
Matthias Kloseb9621712010-04-24 17:59:49 +00003175 as_fn_error "cached CC is different -- throw away $cache_file
3176(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003177fi
3178
Marc-André Lemburgdf700f02010-04-30 17:29:56 +00003179# If the user set CFLAGS, use this instead of the automatically
3180# determined setting
3181preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003182ac_ext=c
3183ac_cpp='$CPP $CPPFLAGS'
3184ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3185ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3186ac_compiler_gnu=$ac_cv_c_compiler_gnu
3187if test -n "$ac_tool_prefix"; then
3188 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3189set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3191$as_echo_n "checking for $ac_word... " >&6; }
3192if test "${ac_cv_prog_CC+set}" = set; then :
3193 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003194else
3195 if test -n "$CC"; then
3196 ac_cv_prog_CC="$CC" # Let the user override the test.
3197else
Martin v. Löwis11437992002-04-12 09:54:03 +00003198as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3199for as_dir in $PATH
3200do
3201 IFS=$as_save_IFS
3202 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003203 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003204 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003205 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003206 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003207 break 2
3208 fi
3209done
Matthias Kloseb9621712010-04-24 17:59:49 +00003210 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003211IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003212
Jack Jansendd19cf82001-12-06 22:36:17 +00003213fi
3214fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003215CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003216if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3218$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003219else
Matthias Kloseb9621712010-04-24 17:59:49 +00003220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3221$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003222fi
3223
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003224
Martin v. Löwis11437992002-04-12 09:54:03 +00003225fi
3226if test -z "$ac_cv_prog_CC"; then
3227 ac_ct_CC=$CC
3228 # Extract the first word of "gcc", so it can be a program name with args.
3229set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3231$as_echo_n "checking for $ac_word... " >&6; }
3232if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3233 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003234else
3235 if test -n "$ac_ct_CC"; then
3236 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3237else
3238as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3239for as_dir in $PATH
3240do
3241 IFS=$as_save_IFS
3242 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003243 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003244 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003245 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003246 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003247 break 2
3248 fi
3249done
Matthias Kloseb9621712010-04-24 17:59:49 +00003250 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003251IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003252
3253fi
3254fi
3255ac_ct_CC=$ac_cv_prog_ac_ct_CC
3256if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3258$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003259else
Matthias Kloseb9621712010-04-24 17:59:49 +00003260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3261$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003262fi
3263
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003264 if test "x$ac_ct_CC" = x; then
3265 CC=""
3266 else
3267 case $cross_compiling:$ac_tool_warned in
3268yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003269{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3270$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003271ac_tool_warned=yes ;;
3272esac
3273 CC=$ac_ct_CC
3274 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003275else
3276 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003277fi
3278
Jack Jansendd19cf82001-12-06 22:36:17 +00003279if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003280 if test -n "$ac_tool_prefix"; then
3281 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003282set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3284$as_echo_n "checking for $ac_word... " >&6; }
3285if test "${ac_cv_prog_CC+set}" = set; then :
3286 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003287else
3288 if test -n "$CC"; then
3289 ac_cv_prog_CC="$CC" # Let the user override the test.
3290else
Martin v. Löwis11437992002-04-12 09:54:03 +00003291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3292for as_dir in $PATH
3293do
3294 IFS=$as_save_IFS
3295 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003296 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003297 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003298 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003299 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003300 break 2
3301 fi
3302done
Matthias Kloseb9621712010-04-24 17:59:49 +00003303 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003304IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003305
3306fi
3307fi
3308CC=$ac_cv_prog_CC
3309if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3311$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003312else
Matthias Kloseb9621712010-04-24 17:59:49 +00003313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3314$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003315fi
3316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003317
Martin v. Löwis11437992002-04-12 09:54:03 +00003318 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003319fi
3320if test -z "$CC"; then
3321 # Extract the first word of "cc", so it can be a program name with args.
3322set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3324$as_echo_n "checking for $ac_word... " >&6; }
3325if test "${ac_cv_prog_CC+set}" = set; then :
3326 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003327else
3328 if test -n "$CC"; then
3329 ac_cv_prog_CC="$CC" # Let the user override the test.
3330else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003331 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3333for as_dir in $PATH
3334do
3335 IFS=$as_save_IFS
3336 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003337 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003338 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003339 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3340 ac_prog_rejected=yes
3341 continue
3342 fi
3343 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003344 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003345 break 2
3346 fi
3347done
Matthias Kloseb9621712010-04-24 17:59:49 +00003348 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003349IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003350
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003351if test $ac_prog_rejected = yes; then
3352 # We found a bogon in the path, so make sure we never use it.
3353 set dummy $ac_cv_prog_CC
3354 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003355 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003356 # We chose a different compiler from the bogus one.
3357 # However, it has the same basename, so the bogon will be chosen
3358 # first if we set CC to just the basename; use the full file name.
3359 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003360 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003361 fi
3362fi
3363fi
3364fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003365CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003366if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3368$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003369else
Matthias Kloseb9621712010-04-24 17:59:49 +00003370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3371$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003372fi
3373
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003374
Martin v. Löwis11437992002-04-12 09:54:03 +00003375fi
3376if test -z "$CC"; then
3377 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003378 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003379 do
3380 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3381set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3383$as_echo_n "checking for $ac_word... " >&6; }
3384if test "${ac_cv_prog_CC+set}" = set; then :
3385 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003386else
3387 if test -n "$CC"; then
3388 ac_cv_prog_CC="$CC" # Let the user override the test.
3389else
Martin v. Löwis11437992002-04-12 09:54:03 +00003390as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3391for as_dir in $PATH
3392do
3393 IFS=$as_save_IFS
3394 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003395 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003396 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003397 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003398 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003399 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003400 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003401done
Matthias Kloseb9621712010-04-24 17:59:49 +00003402 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003403IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003404
3405fi
3406fi
3407CC=$ac_cv_prog_CC
3408if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3410$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003411else
Matthias Kloseb9621712010-04-24 17:59:49 +00003412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3413$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003414fi
3415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003416
Martin v. Löwis11437992002-04-12 09:54:03 +00003417 test -n "$CC" && break
3418 done
3419fi
3420if test -z "$CC"; then
3421 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003422 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003423do
3424 # Extract the first word of "$ac_prog", so it can be a program name with args.
3425set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3427$as_echo_n "checking for $ac_word... " >&6; }
3428if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3429 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003430else
3431 if test -n "$ac_ct_CC"; then
3432 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3433else
3434as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3435for as_dir in $PATH
3436do
3437 IFS=$as_save_IFS
3438 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003439 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003440 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003441 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003442 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003443 break 2
3444 fi
3445done
Matthias Kloseb9621712010-04-24 17:59:49 +00003446 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003447IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003448
Martin v. Löwis11437992002-04-12 09:54:03 +00003449fi
3450fi
3451ac_ct_CC=$ac_cv_prog_ac_ct_CC
3452if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3454$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003455else
Matthias Kloseb9621712010-04-24 17:59:49 +00003456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3457$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003458fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003459
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003460
Martin v. Löwis11437992002-04-12 09:54:03 +00003461 test -n "$ac_ct_CC" && break
3462done
Michael W. Hudson54241132001-12-07 15:38:26 +00003463
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003464 if test "x$ac_ct_CC" = x; then
3465 CC=""
3466 else
3467 case $cross_compiling:$ac_tool_warned in
3468yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003469{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3470$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003471ac_tool_warned=yes ;;
3472esac
3473 CC=$ac_ct_CC
3474 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003475fi
3476
3477fi
3478
3479
Matthias Kloseb9621712010-04-24 17:59:49 +00003480test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3481$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3482as_fn_error "no acceptable C compiler found in \$PATH
3483See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003484
3485# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003486$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3487set X $ac_compile
3488ac_compiler=$2
3489for ac_option in --version -v -V -qversion; do
3490 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003491case "(($ac_try" in
3492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3493 *) ac_try_echo=$ac_try;;
3494esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003495eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3496$as_echo "$ac_try_echo"; } >&5
3497 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003498 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003499 if test -s conftest.err; then
3500 sed '10a\
3501... rest of stderr output deleted ...
3502 10q' conftest.err >conftest.er1
3503 cat conftest.er1 >&5
3504 fi
3505 rm -f conftest.er1 conftest.err
3506 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3507 test $ac_status = 0; }
3508done
Martin v. Löwis11437992002-04-12 09:54:03 +00003509
Matthias Kloseb9621712010-04-24 17:59:49 +00003510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003511/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003512
Martin v. Löwis11437992002-04-12 09:54:03 +00003513int
3514main ()
3515{
3516
3517 ;
3518 return 0;
3519}
3520_ACEOF
3521ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003522ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003523# Try to create an executable without -o first, disregard a.out.
3524# It will help us diagnose broken compilers, and finding out an intuition
3525# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3527$as_echo_n "checking whether the C compiler works... " >&6; }
3528ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3529
3530# The possible output files:
3531ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3532
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003533ac_rmfiles=
3534for ac_file in $ac_files
3535do
3536 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003537 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003538 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3539 esac
3540done
3541rm -f $ac_rmfiles
3542
Matthias Kloseb9621712010-04-24 17:59:49 +00003543if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003544case "(($ac_try" in
3545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3546 *) ac_try_echo=$ac_try;;
3547esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003548eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3549$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003550 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003551 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003552 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3553 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003554 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3555# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3556# in a Makefile. We should not override ac_cv_exeext if it was cached,
3557# so that the user can short-circuit this test for compilers unknown to
3558# Autoconf.
3559for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003560do
3561 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003562 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003563 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003564 ;;
3565 [ab].out )
3566 # We found the default executable, but exeext='' is most
3567 # certainly right.
3568 break;;
3569 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003570 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003571 then :; else
3572 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3573 fi
3574 # We set ac_cv_exeext here because the later test for it is not
3575 # safe: cross compilers may not add the suffix if given an `-o'
3576 # argument, so we may need to know it at that point already.
3577 # Even if this section looks crufty: it has the advantage of
3578 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003579 break;;
3580 * )
3581 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003582 esac
3583done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003584test "$ac_cv_exeext" = no && ac_cv_exeext=
3585
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003586else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003587 ac_file=''
3588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003589if test -z "$ac_file"; then :
3590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3591$as_echo "no" >&6; }
3592$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003593sed 's/^/| /' conftest.$ac_ext >&5
3594
Matthias Kloseb9621712010-04-24 17:59:49 +00003595{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3596$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3597{ as_fn_set_status 77
3598as_fn_error "C compiler cannot create executables
3599See \`config.log' for more details." "$LINENO" 5; }; }
3600else
3601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3602$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003603fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3605$as_echo_n "checking for C compiler default output file name... " >&6; }
3606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3607$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003608ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003609
Matthias Kloseb9621712010-04-24 17:59:49 +00003610rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003611ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3613$as_echo_n "checking for suffix of executables... " >&6; }
3614if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003615case "(($ac_try" in
3616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3617 *) ac_try_echo=$ac_try;;
3618esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003619eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3620$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003621 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003622 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003623 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3624 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003625 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3626# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3627# work properly (i.e., refer to `conftest.exe'), while it won't with
3628# `rm'.
3629for ac_file in conftest.exe conftest conftest.*; do
3630 test -f "$ac_file" || continue
3631 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003633 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3634 break;;
3635 * ) break;;
3636 esac
3637done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003638else
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3640$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3641as_fn_error "cannot compute suffix of executables: cannot compile and link
3642See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003644rm -f conftest conftest$ac_cv_exeext
3645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3646$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003647
3648rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003649EXEEXT=$ac_cv_exeext
3650ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3652/* end confdefs.h. */
3653#include <stdio.h>
3654int
3655main ()
3656{
3657FILE *f = fopen ("conftest.out", "w");
3658 return ferror (f) || fclose (f) != 0;
3659
3660 ;
3661 return 0;
3662}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003664ac_clean_files="$ac_clean_files conftest.out"
3665# Check that the compiler produces executables we can run. If not, either
3666# the compiler is broken, or we cross compile.
3667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3668$as_echo_n "checking whether we are cross compiling... " >&6; }
3669if test "$cross_compiling" != yes; then
3670 { { ac_try="$ac_link"
3671case "(($ac_try" in
3672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3673 *) ac_try_echo=$ac_try;;
3674esac
3675eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3676$as_echo "$ac_try_echo"; } >&5
3677 (eval "$ac_link") 2>&5
3678 ac_status=$?
3679 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3680 test $ac_status = 0; }
3681 if { ac_try='./conftest$ac_cv_exeext'
3682 { { case "(($ac_try" in
3683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3684 *) ac_try_echo=$ac_try;;
3685esac
3686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3687$as_echo "$ac_try_echo"; } >&5
3688 (eval "$ac_try") 2>&5
3689 ac_status=$?
3690 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3691 test $ac_status = 0; }; }; then
3692 cross_compiling=no
3693 else
3694 if test "$cross_compiling" = maybe; then
3695 cross_compiling=yes
3696 else
3697 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3698$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3699as_fn_error "cannot run C compiled programs.
3700If you meant to cross compile, use \`--host'.
3701See \`config.log' for more details." "$LINENO" 5; }
3702 fi
3703 fi
3704fi
3705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3706$as_echo "$cross_compiling" >&6; }
3707
3708rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3709ac_clean_files=$ac_clean_files_save
3710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3711$as_echo_n "checking for suffix of object files... " >&6; }
3712if test "${ac_cv_objext+set}" = set; then :
3713 $as_echo_n "(cached) " >&6
3714else
3715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003716/* end confdefs.h. */
3717
3718int
3719main ()
3720{
3721
3722 ;
3723 return 0;
3724}
3725_ACEOF
3726rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003727if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003728case "(($ac_try" in
3729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3730 *) ac_try_echo=$ac_try;;
3731esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003732eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3733$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003734 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3737 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738 for ac_file in conftest.o conftest.obj conftest.*; do
3739 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003740 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003742 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3743 break;;
3744 esac
3745done
3746else
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003748sed 's/^/| /' conftest.$ac_ext >&5
3749
Matthias Kloseb9621712010-04-24 17:59:49 +00003750{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3751$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3752as_fn_error "cannot compute suffix of object files: cannot compile
3753See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003754fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003755rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3758$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003759OBJEXT=$ac_cv_objext
3760ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3762$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3763if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3764 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003765else
Matthias Kloseb9621712010-04-24 17:59:49 +00003766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003768
Martin v. Löwis11437992002-04-12 09:54:03 +00003769int
3770main ()
3771{
3772#ifndef __GNUC__
3773 choke me
3774#endif
3775
3776 ;
3777 return 0;
3778}
3779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003780if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003781 ac_compiler_gnu=yes
3782else
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003786ac_cv_c_compiler_gnu=$ac_compiler_gnu
3787
3788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3790$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3791if test $ac_compiler_gnu = yes; then
3792 GCC=yes
3793else
3794 GCC=
3795fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003796ac_test_CFLAGS=${CFLAGS+set}
3797ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3799$as_echo_n "checking whether $CC accepts -g... " >&6; }
3800if test "${ac_cv_prog_cc_g+set}" = set; then :
3801 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003802else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003803 ac_save_c_werror_flag=$ac_c_werror_flag
3804 ac_c_werror_flag=yes
3805 ac_cv_prog_cc_g=no
3806 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003809
Martin v. Löwis11437992002-04-12 09:54:03 +00003810int
3811main ()
3812{
3813
3814 ;
3815 return 0;
3816}
3817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003818if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003819 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003820else
Matthias Kloseb9621712010-04-24 17:59:49 +00003821 CFLAGS=""
3822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003823/* end confdefs.h. */
3824
3825int
3826main ()
3827{
3828
3829 ;
3830 return 0;
3831}
3832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003833if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003834
Matthias Kloseb9621712010-04-24 17:59:49 +00003835else
3836 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839/* end confdefs.h. */
3840
3841int
3842main ()
3843{
3844
3845 ;
3846 return 0;
3847}
3848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003849if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003850 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3857 ac_c_werror_flag=$ac_save_c_werror_flag
3858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3860$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003861if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003863elif test $ac_cv_prog_cc_g = yes; then
3864 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003865 CFLAGS="-g -O2"
3866 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003867 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003868 fi
3869else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003870 if test "$GCC" = yes; then
3871 CFLAGS="-O2"
3872 else
3873 CFLAGS=
3874 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003875fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3877$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3878if test "${ac_cv_prog_cc_c89+set}" = set; then :
3879 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003880else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003881 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003882ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003884/* end confdefs.h. */
3885#include <stdarg.h>
3886#include <stdio.h>
3887#include <sys/types.h>
3888#include <sys/stat.h>
3889/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3890struct buf { int x; };
3891FILE * (*rcsopen) (struct buf *, struct stat *, int);
3892static char *e (p, i)
3893 char **p;
3894 int i;
3895{
3896 return p[i];
3897}
3898static char *f (char * (*g) (char **, int), char **p, ...)
3899{
3900 char *s;
3901 va_list v;
3902 va_start (v,p);
3903 s = g (p, va_arg (v,int));
3904 va_end (v);
3905 return s;
3906}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003907
3908/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3909 function prototypes and stuff, but not '\xHH' hex character constants.
3910 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003911 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003912 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3913 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003914 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003915int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003917/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3918 inside strings and character constants. */
3919#define FOO(x) 'x'
3920int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3921
Skip Montanaro6dead952003-09-25 14:50:04 +00003922int test (int i, double x);
3923struct s1 {int (*f) (int a);};
3924struct s2 {int (*f) (double a);};
3925int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3926int argc;
3927char **argv;
3928int
3929main ()
3930{
3931return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3932 ;
3933 return 0;
3934}
3935_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3937 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003938do
3939 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003940 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943rm -f core conftest.err conftest.$ac_objext
3944 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003945done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003947CC=$ac_save_CC
3948
3949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003950# AC_CACHE_VAL
3951case "x$ac_cv_prog_cc_c89" in
3952 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3954$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003955 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3957$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003958 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3961$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003962esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003963if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003964
Matthias Kloseb9621712010-04-24 17:59:49 +00003965fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003966
Martin v. Löwis11437992002-04-12 09:54:03 +00003967ac_ext=c
3968ac_cpp='$CPP $CPPFLAGS'
3969ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3970ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3971ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003972
Marc-André Lemburgdf700f02010-04-30 17:29:56 +00003973if test ! -z "$preset_cflags"
3974then
3975 CFLAGS=$preset_cflags
3976fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003977
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003978
3979
Matthias Kloseb9621712010-04-24 17:59:49 +00003980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3981$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003982
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003983# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003984if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003986
3987 case $withval in
3988 no) with_cxx_main=no
3989 MAINCC='$(CC)';;
3990 yes) with_cxx_main=yes
3991 MAINCC='$(CXX)';;
3992 *) with_cxx_main=yes
3993 MAINCC=$withval
3994 if test -z "$CXX"
3995 then
3996 CXX=$withval
3997 fi;;
3998 esac
3999else
4000
4001 with_cxx_main=no
4002 MAINCC='$(CC)'
4003
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004004fi
4005
Matthias Kloseb9621712010-04-24 17:59:49 +00004006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4007$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004008
4009preset_cxx="$CXX"
4010if test -z "$CXX"
4011then
4012 case "$CC" in
4013 gcc) # Extract the first word of "g++", so it can be a program name with args.
4014set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4016$as_echo_n "checking for $ac_word... " >&6; }
4017if test "${ac_cv_path_CXX+set}" = set; then :
4018 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004019else
4020 case $CXX in
4021 [\\/]* | ?:[\\/]*)
4022 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4023 ;;
4024 *)
4025 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4026for as_dir in notfound
4027do
4028 IFS=$as_save_IFS
4029 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004030 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004031 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 +00004032 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004033 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004034 break 2
4035 fi
4036done
Matthias Kloseb9621712010-04-24 17:59:49 +00004037 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004038IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004039
4040 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4041 ;;
4042esac
4043fi
4044CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004045if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4047$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004048else
Matthias Kloseb9621712010-04-24 17:59:49 +00004049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4050$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004052
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004053 ;;
4054 cc) # Extract the first word of "c++", so it can be a program name with args.
4055set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4057$as_echo_n "checking for $ac_word... " >&6; }
4058if test "${ac_cv_path_CXX+set}" = set; then :
4059 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004060else
4061 case $CXX in
4062 [\\/]* | ?:[\\/]*)
4063 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4064 ;;
4065 *)
4066 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4067for as_dir in notfound
4068do
4069 IFS=$as_save_IFS
4070 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004071 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004072 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 +00004073 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004074 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004075 break 2
4076 fi
4077done
Matthias Kloseb9621712010-04-24 17:59:49 +00004078 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004079IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004080
4081 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4082 ;;
4083esac
4084fi
4085CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004086if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4088$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004089else
Matthias Kloseb9621712010-04-24 17:59:49 +00004090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4091$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004093
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004094 ;;
4095 esac
4096 if test "$CXX" = "notfound"
4097 then
4098 CXX=""
4099 fi
4100fi
4101if test -z "$CXX"
4102then
4103 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4104do
4105 # Extract the first word of "$ac_prog", so it can be a program name with args.
4106set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4108$as_echo_n "checking for $ac_word... " >&6; }
4109if test "${ac_cv_prog_CXX+set}" = set; then :
4110 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004111else
4112 if test -n "$CXX"; then
4113 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4114else
4115as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4116for as_dir in $PATH
4117do
4118 IFS=$as_save_IFS
4119 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004121 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 +00004122 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004124 break 2
4125 fi
4126done
Matthias Kloseb9621712010-04-24 17:59:49 +00004127 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004128IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004129
4130fi
4131fi
4132CXX=$ac_cv_prog_CXX
4133if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4135$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004136else
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4138$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004139fi
4140
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004141
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004142 test -n "$CXX" && break
4143done
4144test -n "$CXX" || CXX="notfound"
4145
4146 if test "$CXX" = "notfound"
4147 then
4148 CXX=""
4149 fi
4150fi
4151if test "$preset_cxx" != "$CXX"
4152then
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004154
4155 By default, distutils will build C++ extension modules with \"$CXX\".
4156 If this is not intended, then set CXX on the configure command line.
4157 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004158$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004159
4160 By default, distutils will build C++ extension modules with \"$CXX\".
4161 If this is not intended, then set CXX on the configure command line.
4162 " >&2;}
4163fi
4164
4165
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004166# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004167
4168ac_ext=c
4169ac_cpp='$CPP $CPPFLAGS'
4170ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4171ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4172ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4174$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004175# On Suns, sometimes $CPP names a directory.
4176if test -n "$CPP" && test -d "$CPP"; then
4177 CPP=
4178fi
4179if test -z "$CPP"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004180 if test "${ac_cv_prog_CPP+set}" = set; then :
4181 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004182else
Martin v. Löwis11437992002-04-12 09:54:03 +00004183 # Double quotes because CPP needs to be expanded
4184 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4185 do
4186 ac_preproc_ok=false
4187for ac_c_preproc_warn_flag in '' yes
4188do
4189 # Use a header file that comes with gcc, so configuring glibc
4190 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004191 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4192 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004193 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004194 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004196/* end confdefs.h. */
4197#ifdef __STDC__
4198# include <limits.h>
4199#else
4200# include <assert.h>
4201#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004202 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004204if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004205
Matthias Kloseb9621712010-04-24 17:59:49 +00004206else
Martin v. Löwis11437992002-04-12 09:54:03 +00004207 # Broken: fails on valid input.
4208continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004209fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004210rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004211
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004213 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004216#include <ac_nonexistent.h>
4217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004218if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004219 # Broken: success on invalid input.
4220continue
4221else
Martin v. Löwis11437992002-04-12 09:54:03 +00004222 # Passes both tests.
4223ac_preproc_ok=:
4224break
4225fi
4226rm -f conftest.err conftest.$ac_ext
4227
4228done
4229# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4230rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004231if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004232 break
4233fi
4234
4235 done
4236 ac_cv_prog_CPP=$CPP
4237
4238fi
4239 CPP=$ac_cv_prog_CPP
4240else
4241 ac_cv_prog_CPP=$CPP
4242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4244$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004245ac_preproc_ok=false
4246for ac_c_preproc_warn_flag in '' yes
4247do
4248 # Use a header file that comes with gcc, so configuring glibc
4249 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004250 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4251 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004252 # On the NeXT, cc -E runs the code through the compiler's parser,
4253 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004255/* end confdefs.h. */
4256#ifdef __STDC__
4257# include <limits.h>
4258#else
4259# include <assert.h>
4260#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004261 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004263if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004264
Matthias Kloseb9621712010-04-24 17:59:49 +00004265else
Martin v. Löwis11437992002-04-12 09:54:03 +00004266 # Broken: fails on valid input.
4267continue
4268fi
4269rm -f conftest.err conftest.$ac_ext
4270
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004272 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004274/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004275#include <ac_nonexistent.h>
4276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004277if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004278 # Broken: success on invalid input.
4279continue
4280else
Martin v. Löwis11437992002-04-12 09:54:03 +00004281 # Passes both tests.
4282ac_preproc_ok=:
4283break
4284fi
4285rm -f conftest.err conftest.$ac_ext
4286
4287done
4288# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4289rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004290if $ac_preproc_ok; then :
4291
Martin v. Löwis11437992002-04-12 09:54:03 +00004292else
Matthias Kloseb9621712010-04-24 17:59:49 +00004293 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4294$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4295as_fn_error "C preprocessor \"$CPP\" fails sanity check
4296See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004297fi
4298
4299ac_ext=c
4300ac_cpp='$CPP $CPPFLAGS'
4301ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4302ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4303ac_compiler_gnu=$ac_cv_c_compiler_gnu
4304
4305
Matthias Kloseb9621712010-04-24 17:59:49 +00004306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4307$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4308if test "${ac_cv_path_GREP+set}" = set; then :
4309 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004310else
Matthias Kloseb9621712010-04-24 17:59:49 +00004311 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004312 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004313 # Loop through the user's path and test for each of PROGNAME-LIST
4314 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004315for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4316do
4317 IFS=$as_save_IFS
4318 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004319 for ac_prog in grep ggrep; do
4320 for ac_exec_ext in '' $ac_executable_extensions; do
4321 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4322 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4323# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004324 # Check for GNU $ac_path_GREP
4325case `"$ac_path_GREP" --version 2>&1` in
4326*GNU*)
4327 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4328*)
4329 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004330 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004331 while :
4332 do
4333 cat "conftest.in" "conftest.in" >"conftest.tmp"
4334 mv "conftest.tmp" "conftest.in"
4335 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004336 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4338 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4341 # Best one so far, save it but keep looking for a better one
4342 ac_cv_path_GREP="$ac_path_GREP"
4343 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004344 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345 # 10*(2^10) chars as input seems more than enough
4346 test $ac_count -gt 10 && break
4347 done
4348 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4349esac
4350
Matthias Kloseb9621712010-04-24 17:59:49 +00004351 $ac_path_GREP_found && break 3
4352 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004353 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004354 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004356 if test -z "$ac_cv_path_GREP"; then
4357 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4358 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359else
4360 ac_cv_path_GREP=$GREP
4361fi
4362
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4365$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366 GREP="$ac_cv_path_GREP"
4367
4368
Matthias Kloseb9621712010-04-24 17:59:49 +00004369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4370$as_echo_n "checking for egrep... " >&6; }
4371if test "${ac_cv_path_EGREP+set}" = set; then :
4372 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004373else
4374 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4375 then ac_cv_path_EGREP="$GREP -E"
4376 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004377 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 # Loop through the user's path and test for each of PROGNAME-LIST
4380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004381for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4382do
4383 IFS=$as_save_IFS
4384 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004385 for ac_prog in egrep; do
4386 for ac_exec_ext in '' $ac_executable_extensions; do
4387 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4388 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4389# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004390 # Check for GNU $ac_path_EGREP
4391case `"$ac_path_EGREP" --version 2>&1` in
4392*GNU*)
4393 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4394*)
4395 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004396 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004397 while :
4398 do
4399 cat "conftest.in" "conftest.in" >"conftest.tmp"
4400 mv "conftest.tmp" "conftest.in"
4401 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004402 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004403 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4404 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004405 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004406 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4407 # Best one so far, save it but keep looking for a better one
4408 ac_cv_path_EGREP="$ac_path_EGREP"
4409 ac_path_EGREP_max=$ac_count
4410 fi
4411 # 10*(2^10) chars as input seems more than enough
4412 test $ac_count -gt 10 && break
4413 done
4414 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4415esac
4416
Matthias Kloseb9621712010-04-24 17:59:49 +00004417 $ac_path_EGREP_found && break 3
4418 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004419 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004420 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004421IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004422 if test -z "$ac_cv_path_EGREP"; then
4423 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4424 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004425else
4426 ac_cv_path_EGREP=$EGREP
4427fi
4428
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004429 fi
4430fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4432$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004433 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004434
4435
Matthias Kloseb9621712010-04-24 17:59:49 +00004436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4437$as_echo_n "checking for ANSI C header files... " >&6; }
4438if test "${ac_cv_header_stdc+set}" = set; then :
4439 $as_echo_n "(cached) " >&6
4440else
4441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004442/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004443#include <stdlib.h>
4444#include <stdarg.h>
4445#include <string.h>
4446#include <float.h>
4447
4448int
4449main ()
4450{
4451
4452 ;
4453 return 0;
4454}
4455_ACEOF
4456if ac_fn_c_try_compile "$LINENO"; then :
4457 ac_cv_header_stdc=yes
4458else
4459 ac_cv_header_stdc=no
4460fi
4461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4462
4463if test $ac_cv_header_stdc = yes; then
4464 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4466/* end confdefs.h. */
4467#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004468
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004469_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004470if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004471 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004472
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004473else
Matthias Kloseb9621712010-04-24 17:59:49 +00004474 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004475fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004476rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004477
Matthias Kloseb9621712010-04-24 17:59:49 +00004478fi
4479
4480if test $ac_cv_header_stdc = yes; then
4481 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4483/* end confdefs.h. */
4484#include <stdlib.h>
4485
4486_ACEOF
4487if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4488 $EGREP "free" >/dev/null 2>&1; then :
4489
4490else
4491 ac_cv_header_stdc=no
4492fi
4493rm -f conftest*
4494
4495fi
4496
4497if test $ac_cv_header_stdc = yes; then
4498 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4499 if test "$cross_compiling" = yes; then :
4500 :
4501else
4502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4503/* end confdefs.h. */
4504#include <ctype.h>
4505#include <stdlib.h>
4506#if ((' ' & 0x0FF) == 0x020)
4507# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4508# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4509#else
4510# define ISLOWER(c) \
4511 (('a' <= (c) && (c) <= 'i') \
4512 || ('j' <= (c) && (c) <= 'r') \
4513 || ('s' <= (c) && (c) <= 'z'))
4514# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4515#endif
4516
4517#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4518int
4519main ()
4520{
4521 int i;
4522 for (i = 0; i < 256; i++)
4523 if (XOR (islower (i), ISLOWER (i))
4524 || toupper (i) != TOUPPER (i))
4525 return 2;
4526 return 0;
4527}
4528_ACEOF
4529if ac_fn_c_try_run "$LINENO"; then :
4530
4531else
4532 ac_cv_header_stdc=no
4533fi
4534rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4535 conftest.$ac_objext conftest.beam conftest.$ac_ext
4536fi
4537
4538fi
4539fi
4540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4541$as_echo "$ac_cv_header_stdc" >&6; }
4542if test $ac_cv_header_stdc = yes; then
4543
4544$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4545
4546fi
4547
4548# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4549for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4550 inttypes.h stdint.h unistd.h
4551do :
4552 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4553ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4554"
4555eval as_val=\$$as_ac_Header
4556 if test "x$as_val" = x""yes; then :
4557 cat >>confdefs.h <<_ACEOF
4558#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4559_ACEOF
4560
4561fi
4562
4563done
4564
4565
4566
4567 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4568if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4569 MINIX=yes
4570else
4571 MINIX=
4572fi
4573
4574
4575 if test "$MINIX" = yes; then
4576
4577$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4578
4579
4580$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4581
4582
4583$as_echo "#define _MINIX 1" >>confdefs.h
4584
4585 fi
4586
4587
4588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4589$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4590if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4591 $as_echo_n "(cached) " >&6
4592else
4593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4594/* end confdefs.h. */
4595
4596# define __EXTENSIONS__ 1
4597 $ac_includes_default
4598int
4599main ()
4600{
4601
4602 ;
4603 return 0;
4604}
4605_ACEOF
4606if ac_fn_c_try_compile "$LINENO"; then :
4607 ac_cv_safe_to_define___extensions__=yes
4608else
4609 ac_cv_safe_to_define___extensions__=no
4610fi
4611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4612fi
4613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4614$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4615 test $ac_cv_safe_to_define___extensions__ = yes &&
4616 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4617
4618 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4619
4620 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4621
4622 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4623
4624 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4625
4626
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004627
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004628# Check for unsupported systems
4629case $ac_sys_system/$ac_sys_release in
4630atheos*|Linux*/1*)
4631 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4632 echo See README for details.
4633 exit 1;;
4634esac
4635
4636
Matthias Kloseb9621712010-04-24 17:59:49 +00004637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4638$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004639
4640# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004641if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004642 withval=$with_suffix;
4643 case $withval in
4644 no) EXEEXT=;;
4645 yes) EXEEXT=.exe;;
4646 *) EXEEXT=$withval;;
4647 esac
4648fi
4649
Matthias Kloseb9621712010-04-24 17:59:49 +00004650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4651$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004652
4653# Test whether we're running on a non-case-sensitive system, in which
4654# case we give a warning if no ext is given
4655
Matthias Kloseb9621712010-04-24 17:59:49 +00004656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4657$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004658if test ! -d CaseSensitiveTestDir; then
4659mkdir CaseSensitiveTestDir
4660fi
4661
4662if test -d casesensitivetestdir
4663then
Matthias Kloseb9621712010-04-24 17:59:49 +00004664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4665$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004666 BUILDEXEEXT=.exe
4667else
Matthias Kloseb9621712010-04-24 17:59:49 +00004668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4669$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004670 BUILDEXEEXT=$EXEEXT
4671fi
4672rmdir CaseSensitiveTestDir
4673
4674case $MACHDEP in
4675bsdos*)
4676 case $CC in
4677 gcc) CC="$CC -D_HAVE_BSDI";;
4678 esac;;
4679esac
4680
4681case $ac_sys_system in
4682hp*|HP*)
4683 case $CC in
4684 cc|*/cc) CC="$CC -Ae";;
4685 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004686esac
4687
4688
4689
Matthias Kloseb9621712010-04-24 17:59:49 +00004690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4691$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004692if test -z "$LIBRARY"
4693then
4694 LIBRARY='libpython$(VERSION).a'
4695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4697$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004698
4699# LDLIBRARY is the name of the library to link against (as opposed to the
4700# name of the library into which to insert object files). BLDLIBRARY is also
4701# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4702# is blank as the main program is not linked directly against LDLIBRARY.
4703# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4704# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4705# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4706# DLLLIBRARY is the shared (i.e., DLL) library.
4707#
4708# RUNSHARED is used to run shared python without installed libraries
4709#
4710# INSTSONAME is the name of the shared library that will be use to install
4711# on the system - some systems like version suffix, others don't
4712
4713
4714
4715
4716
4717
4718LDLIBRARY="$LIBRARY"
4719BLDLIBRARY='$(LDLIBRARY)'
4720INSTSONAME='$(LDLIBRARY)'
4721DLLLIBRARY=''
4722LDLIBRARYDIR=''
4723RUNSHARED=''
4724
4725# LINKCC is the command that links the python executable -- default is $(CC).
4726# If CXX is set, and if it is needed to link a main function that was
4727# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4728# python might then depend on the C++ runtime
4729# This is altered for AIX in order to build the export list before
4730# linking.
4731
Matthias Kloseb9621712010-04-24 17:59:49 +00004732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4733$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004734if test -z "$LINKCC"
4735then
4736 LINKCC='$(PURIFY) $(MAINCC)'
4737 case $ac_sys_system in
4738 AIX*)
4739 exp_extra="\"\""
4740 if test $ac_sys_release -ge 5 -o \
4741 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4742 exp_extra="."
4743 fi
4744 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004745 QNX*)
4746 # qcc must be used because the other compilers do not
4747 # support -N.
4748 LINKCC=qcc;;
4749 esac
4750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4752$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004753
4754# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4755# make sure we default having it set to "no": this is used by
4756# distutils.unixccompiler to know if it should add --enable-new-dtags
4757# to linker command lines, and failing to detect GNU ld simply results
4758# in the same bahaviour as before.
4759
Matthias Kloseb9621712010-04-24 17:59:49 +00004760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4761$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004762ac_prog=ld
4763if test "$GCC" = yes; then
4764 ac_prog=`$CC -print-prog-name=ld`
4765fi
4766case `"$ac_prog" -V 2>&1 < /dev/null` in
4767 *GNU*)
4768 GNULD=yes;;
4769 *)
4770 GNULD=no;;
4771esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4773$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004774
Matthias Kloseb9621712010-04-24 17:59:49 +00004775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4776$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004777# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004778if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004779 enableval=$enable_shared;
4780fi
4781
4782
4783if test -z "$enable_shared"
4784then
4785 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004786 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004787 enable_shared="yes";;
4788 *)
4789 enable_shared="no";;
4790 esac
4791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4793$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004794
Matthias Kloseb9621712010-04-24 17:59:49 +00004795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4796$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004797# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004798if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004799 enableval=$enable_profiling; ac_save_cc="$CC"
4800 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004801 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004802 ac_enable_profiling="no"
4803else
Matthias Kloseb9621712010-04-24 17:59:49 +00004804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004805/* end confdefs.h. */
4806int main() { return 0; }
4807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004808if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004809 ac_enable_profiling="yes"
4810else
Matthias Kloseb9621712010-04-24 17:59:49 +00004811 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004813rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4814 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004815fi
4816
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004817 CC="$ac_save_cc"
4818fi
4819
Matthias Kloseb9621712010-04-24 17:59:49 +00004820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4821$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004822
4823case "$ac_enable_profiling" in
4824 "yes")
4825 BASECFLAGS="-pg $BASECFLAGS"
4826 LDFLAGS="-pg $LDFLAGS"
4827 ;;
4828esac
4829
Matthias Kloseb9621712010-04-24 17:59:49 +00004830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4831$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004832
4833# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4834# library that we build, but we do not want to link against it (we
4835# will find it with a -framework option). For this reason there is an
4836# extra variable BLDLIBRARY against which Python and the extension
4837# modules are linked, BLDLIBRARY. This is normally the same as
4838# LDLIBRARY, but empty for MacOSX framework builds.
4839if test "$enable_framework"
4840then
4841 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4842 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4843 BLDLIBRARY=''
4844else
4845 BLDLIBRARY='$(LDLIBRARY)'
4846fi
4847
4848# Other platforms follow
4849if test $enable_shared = "yes"; then
4850
Matthias Kloseb9621712010-04-24 17:59:49 +00004851$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004852
4853 case $ac_sys_system in
4854 CYGWIN*)
4855 LDLIBRARY='libpython$(VERSION).dll.a'
4856 DLLLIBRARY='libpython$(VERSION).dll'
4857 ;;
4858 SunOS*)
4859 LDLIBRARY='libpython$(VERSION).so'
4860 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4861 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4862 INSTSONAME="$LDLIBRARY".$SOVERSION
4863 ;;
4864 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4865 LDLIBRARY='libpython$(VERSION).so'
4866 BLDLIBRARY='-L. -lpython$(VERSION)'
4867 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4868 case $ac_sys_system in
4869 FreeBSD*)
4870 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4871 ;;
4872 esac
4873 INSTSONAME="$LDLIBRARY".$SOVERSION
4874 ;;
4875 hp*|HP*)
4876 case `uname -m` in
4877 ia64)
4878 LDLIBRARY='libpython$(VERSION).so'
4879 ;;
4880 *)
4881 LDLIBRARY='libpython$(VERSION).sl'
4882 ;;
4883 esac
4884 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4885 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4886 ;;
4887 OSF*)
4888 LDLIBRARY='libpython$(VERSION).so'
4889 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4890 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4891 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004892 Darwin*)
4893 LDLIBRARY='libpython$(VERSION).dylib'
4894 BLDLIBRARY='-L. -lpython$(VERSION)'
4895 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4896 ;;
4897
4898 esac
4899else # shared is disabled
4900 case $ac_sys_system in
4901 CYGWIN*)
4902 BLDLIBRARY='$(LIBRARY)'
4903 LDLIBRARY='libpython$(VERSION).dll.a'
4904 ;;
4905 esac
4906fi
4907
Matthias Kloseb9621712010-04-24 17:59:49 +00004908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4909$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004910
4911if test -n "$ac_tool_prefix"; then
4912 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4913set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4915$as_echo_n "checking for $ac_word... " >&6; }
4916if test "${ac_cv_prog_RANLIB+set}" = set; then :
4917 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004918else
4919 if test -n "$RANLIB"; then
4920 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4921else
4922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4923for as_dir in $PATH
4924do
4925 IFS=$as_save_IFS
4926 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004927 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4929 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004931 break 2
4932 fi
4933done
Matthias Kloseb9621712010-04-24 17:59:49 +00004934 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004935IFS=$as_save_IFS
4936
4937fi
4938fi
4939RANLIB=$ac_cv_prog_RANLIB
4940if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4942$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004943else
Matthias Kloseb9621712010-04-24 17:59:49 +00004944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4945$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004946fi
4947
4948
4949fi
4950if test -z "$ac_cv_prog_RANLIB"; then
4951 ac_ct_RANLIB=$RANLIB
4952 # Extract the first word of "ranlib", so it can be a program name with args.
4953set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4955$as_echo_n "checking for $ac_word... " >&6; }
4956if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4957 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004958else
4959 if test -n "$ac_ct_RANLIB"; then
4960 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4961else
4962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4963for as_dir in $PATH
4964do
4965 IFS=$as_save_IFS
4966 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004967 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004968 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4969 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004970 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004971 break 2
4972 fi
4973done
Matthias Kloseb9621712010-04-24 17:59:49 +00004974 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004975IFS=$as_save_IFS
4976
4977fi
4978fi
4979ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4980if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4982$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004983else
Matthias Kloseb9621712010-04-24 17:59:49 +00004984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4985$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004986fi
4987
4988 if test "x$ac_ct_RANLIB" = x; then
4989 RANLIB=":"
4990 else
4991 case $cross_compiling:$ac_tool_warned in
4992yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00004993{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4994$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004995ac_tool_warned=yes ;;
4996esac
4997 RANLIB=$ac_ct_RANLIB
4998 fi
4999else
5000 RANLIB="$ac_cv_prog_RANLIB"
5001fi
5002
5003
5004for ac_prog in ar aal
5005do
5006 # Extract the first word of "$ac_prog", so it can be a program name with args.
5007set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5009$as_echo_n "checking for $ac_word... " >&6; }
5010if test "${ac_cv_prog_AR+set}" = set; then :
5011 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005012else
5013 if test -n "$AR"; then
5014 ac_cv_prog_AR="$AR" # Let the user override the test.
5015else
5016as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5017for as_dir in $PATH
5018do
5019 IFS=$as_save_IFS
5020 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005022 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5023 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005024 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005025 break 2
5026 fi
5027done
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005029IFS=$as_save_IFS
5030
5031fi
5032fi
5033AR=$ac_cv_prog_AR
5034if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5036$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005037else
Matthias Kloseb9621712010-04-24 17:59:49 +00005038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5039$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005040fi
5041
5042
5043 test -n "$AR" && break
5044done
5045test -n "$AR" || AR="ar"
5046
5047
5048# tweak ARFLAGS only if the user didn't set it on the command line
5049
5050if test -z "$ARFLAGS"
5051then
5052 ARFLAGS="rc"
5053fi
5054
5055
5056# Extract the first word of "svnversion", so it can be a program name with args.
5057set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5059$as_echo_n "checking for $ac_word... " >&6; }
5060if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5061 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005062else
5063 if test -n "$SVNVERSION"; then
5064 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5065else
5066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5067for as_dir in $PATH
5068do
5069 IFS=$as_save_IFS
5070 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005072 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5073 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005074 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005075 break 2
5076 fi
5077done
Matthias Kloseb9621712010-04-24 17:59:49 +00005078 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005079IFS=$as_save_IFS
5080
5081 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5082fi
5083fi
5084SVNVERSION=$ac_cv_prog_SVNVERSION
5085if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5087$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005088else
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5090$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005091fi
5092
5093
5094if test $SVNVERSION = found
5095then
5096 SVNVERSION="svnversion \$(srcdir)"
5097else
5098 SVNVERSION="echo Unversioned directory"
5099fi
5100
5101case $MACHDEP in
5102bsdos*|hp*|HP*)
5103 # install -d does not work on BSDI or HP-UX
5104 if test -z "$INSTALL"
5105 then
5106 INSTALL="${srcdir}/install-sh -c"
5107 fi
5108esac
5109ac_aux_dir=
5110for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 for ac_t in install-sh install.sh shtool; do
5112 if test -f "$ac_dir/$ac_t"; then
5113 ac_aux_dir=$ac_dir
5114 ac_install_sh="$ac_aux_dir/$ac_t -c"
5115 break 2
5116 fi
5117 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005118done
5119if test -z "$ac_aux_dir"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005120 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005121fi
5122
5123# These three variables are undocumented and unsupported,
5124# and are intended to be withdrawn in a future Autoconf release.
5125# They can cause serious problems if a builder's source tree is in a directory
5126# whose full name contains unusual characters.
5127ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5128ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5129ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5130
5131
5132# Find a good install program. We prefer a C program (faster),
5133# so one script is as good as another. But avoid the broken or
5134# incompatible versions:
5135# SysV /etc/install, /usr/sbin/install
5136# SunOS /usr/etc/install
5137# IRIX /sbin/install
5138# AIX /bin/install
5139# AmigaOS /C/install, which installs bootblocks on floppy discs
5140# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5141# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5142# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5143# OS/2's system install, which has a completely different semantic
5144# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005145# Reject install programs that cannot install multiple files.
5146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5147$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005148if test -z "$INSTALL"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005149if test "${ac_cv_path_install+set}" = set; then :
5150 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005151else
5152 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5153for as_dir in $PATH
5154do
5155 IFS=$as_save_IFS
5156 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005157 # Account for people who put trailing slashes in PATH elements.
5158case $as_dir/ in #((
5159 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005160 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005161 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005162 /usr/ucb/* ) ;;
5163 *)
5164 # OSF1 and SCO ODT 3.0 have their own names for install.
5165 # Don't use installbsd from OSF since it installs stuff as root
5166 # by default.
5167 for ac_prog in ginstall scoinst install; do
5168 for ac_exec_ext in '' $ac_executable_extensions; do
5169 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5170 if test $ac_prog = install &&
5171 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5172 # AIX install. It has an incompatible calling convention.
5173 :
5174 elif test $ac_prog = install &&
5175 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5176 # program-specific install script used by HP pwplus--don't use.
5177 :
5178 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005179 rm -rf conftest.one conftest.two conftest.dir
5180 echo one > conftest.one
5181 echo two > conftest.two
5182 mkdir conftest.dir
5183 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5184 test -s conftest.one && test -s conftest.two &&
5185 test -s conftest.dir/conftest.one &&
5186 test -s conftest.dir/conftest.two
5187 then
5188 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5189 break 3
5190 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005191 fi
5192 fi
5193 done
5194 done
5195 ;;
5196esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005197
5198 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005199IFS=$as_save_IFS
5200
Matthias Kloseb9621712010-04-24 17:59:49 +00005201rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005202
5203fi
5204 if test "${ac_cv_path_install+set}" = set; then
5205 INSTALL=$ac_cv_path_install
5206 else
5207 # As a last resort, use the slow shell script. Don't cache a
5208 # value for INSTALL within a source directory, because that will
5209 # break other packages using the cache if that directory is
5210 # removed, or if the value is a relative name.
5211 INSTALL=$ac_install_sh
5212 fi
5213fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5215$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005216
5217# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5218# It thinks the first close brace ends the variable substitution.
5219test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5220
5221test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5222
5223test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5224
5225
5226# Not every filesystem supports hard links
5227
5228if test -z "$LN" ; then
5229 case $ac_sys_system in
5230 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005231 *) LN=ln;;
5232 esac
5233fi
5234
5235# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5237$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005238
5239# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005240if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005241 withval=$with_pydebug;
5242if test "$withval" != no
5243then
5244
Matthias Kloseb9621712010-04-24 17:59:49 +00005245$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005246
Matthias Kloseb9621712010-04-24 17:59:49 +00005247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5248$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005249 Py_DEBUG='true'
Matthias Kloseb9621712010-04-24 17:59:49 +00005250else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5251$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005252fi
5253else
Matthias Kloseb9621712010-04-24 17:59:49 +00005254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5255$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005256fi
5257
5258
5259# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5260# merged with this chunk of code?
5261
5262# Optimizer/debugger flags
5263# ------------------------
5264# (The following bit of code is complicated enough - please keep things
5265# indented properly. Just pretend you're editing Python code. ;-)
5266
5267# There are two parallel sets of case statements below, one that checks to
5268# see if OPT was set and one that does BASECFLAGS setting based upon
5269# compiler and platform. BASECFLAGS tweaks need to be made even if the
5270# user set OPT.
5271
5272# tweak OPT based on compiler and platform, only if the user didn't set
5273# it on the command line
5274
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005275if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005276then
5277 case $GCC in
5278 yes)
5279 if test "$CC" != 'g++' ; then
5280 STRICT_PROTO="-Wstrict-prototypes"
5281 fi
5282 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5283 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5284 WRAP="-fwrapv"
5285 fi
5286 case $ac_cv_prog_cc_g in
5287 yes)
5288 if test "$Py_DEBUG" = 'true' ; then
5289 # Optimization messes up debuggers, so turn it off for
5290 # debug builds.
5291 OPT="-g -Wall $STRICT_PROTO"
5292 else
5293 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5294 fi
5295 ;;
5296 *)
5297 OPT="-O3 -Wall $STRICT_PROTO"
5298 ;;
5299 esac
5300 case $ac_sys_system in
5301 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5302 ;;
5303 esac
5304 ;;
5305
5306 *)
5307 OPT="-O"
5308 ;;
5309 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310fi
5311
5312
5313
5314# The -arch flags for universal builds on OSX
5315UNIVERSAL_ARCH_FLAGS=
5316
5317
5318# tweak BASECFLAGS based on compiler and platform
5319case $GCC in
5320yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005321 # Python doesn't violate C99 aliasing rules, but older versions of
5322 # GCC produce warnings for legal Python code. Enable
5323 # -fno-strict-aliasing on versions of GCC that support but produce
5324 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5326$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005327 ac_save_cc="$CC"
5328 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005329 save_CFLAGS="$CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +00005330 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
5331 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005332else
Matthias Kloseb9621712010-04-24 17:59:49 +00005333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005335
Matthias Kloseb159a552010-04-25 21:00:44 +00005336
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005337int
5338main ()
5339{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005340int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005341 ;
5342 return 0;
5343}
Matthias Kloseb159a552010-04-25 21:00:44 +00005344
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005346if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005347
5348 CC="$ac_save_cc -fstrict-aliasing"
5349 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005351/* end confdefs.h. */
5352
Matthias Kloseb159a552010-04-25 21:00:44 +00005353
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005354int
5355main ()
5356{
5357void f(int **x) {} int main() { double *x; f((int **) &x); return 0; }
5358 ;
5359 return 0;
5360}
Matthias Kloseb159a552010-04-25 21:00:44 +00005361
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005363if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005364
5365 ac_cv_no_strict_aliasing=no
5366
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005367else
Matthias Kloseb159a552010-04-25 21:00:44 +00005368
5369 ac_cv_no_strict_aliasing=yes
5370
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005371fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005373
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005374else
Matthias Kloseb159a552010-04-25 21:00:44 +00005375
5376 ac_cv_no_strict_aliasing=no
5377
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005378fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005380fi
5381
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005382 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5385$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005386 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005387 then
5388 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5389 fi
5390
5391 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5392 # support. Without this, treatment of subnormals doesn't follow
5393 # the standard.
5394 case $ac_sys_machine in
5395 alpha*)
5396 BASECFLAGS="$BASECFLAGS -mieee"
5397 ;;
5398 esac
5399
5400 case $ac_sys_system in
5401 SCO_SV*)
5402 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5403 ;;
5404 # is there any other compiler on Darwin besides gcc?
5405 Darwin*)
5406 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5407 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005408 if test "${CC}" = gcc
5409 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5411$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005412 case "${UNIVERSALSDK}" in
5413 */MacOSX10.4u.sdk)
5414 # Build using 10.4 SDK, force usage of gcc when the
5415 # compiler is gcc, otherwise the user will get very
5416 # confusing error messages when building on OSX 10.6
5417 CC=gcc-4.0
5418 CPP=cpp-4.0
5419 ;;
5420 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5422$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005423 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005424
5425
5426 if test "${enable_universalsdk}"; then
5427 UNIVERSAL_ARCH_FLAGS=""
5428 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5429 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5430 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005431 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005432 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5433 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005434 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005435 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436
5437 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5438 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005439 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005440 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005441
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005442 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5443 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005444 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005445 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005446
5447 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5448 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005449 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005450 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005451
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005452 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005453 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 +00005454
5455 fi
5456
5457
Ronald Oussoren666028b2010-04-18 19:07:43 +00005458 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5459 if test "${UNIVERSALSDK}" != "/"
5460 then
5461 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5462 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005463 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005464 fi
5465 fi
5466
5467 # Calculate the right deployment target for this build.
5468 #
5469 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5470 if test ${cur_target} '>' 10.2; then
5471 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005472 if test ${enable_universalsdk}; then
5473 if test "${UNIVERSAL_ARCHS}" = "all"; then
5474 # Ensure that the default platform for a
5475 # 4-way universal build is OSX 10.5,
5476 # that's the first OS release where
5477 # 4-way builds make sense.
5478 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005479
5480 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5481 cur_target='10.5'
5482
5483 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5484 cur_target='10.5'
5485
5486 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5487 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005488 fi
5489 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005490 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005491 # On Intel macs default to a deployment
5492 # target of 10.4, that's the first OSX
5493 # release with Intel support.
5494 cur_target="10.4"
5495 fi
5496 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005497 fi
5498 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5499
5500 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5501 # environment with a value that is the same as what we'll use
5502 # in the Makefile to ensure that we'll get the same compiler
5503 # environment during configure and build time.
5504 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5505 export MACOSX_DEPLOYMENT_TARGET
5506 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5507
5508 ;;
5509 OSF*)
5510 BASECFLAGS="$BASECFLAGS -mieee"
5511 ;;
5512 esac
5513 ;;
5514
5515*)
5516 case $ac_sys_system in
5517 OpenUNIX*|UnixWare*)
5518 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5519 ;;
5520 OSF*)
5521 BASECFLAGS="$BASECFLAGS -ieee -std"
5522 ;;
5523 SCO_SV*)
5524 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5525 ;;
5526 esac
5527 ;;
5528esac
5529
5530if test "$Py_DEBUG" = 'true'; then
5531 :
5532else
5533 OPT="-DNDEBUG $OPT"
5534fi
5535
5536if test "$ac_arch_flags"
5537then
5538 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5539fi
5540
5541# disable check for icc since it seems to pass, but generates a warning
5542if test "$CC" = icc
5543then
5544 ac_cv_opt_olimit_ok=no
5545fi
5546
Matthias Kloseb9621712010-04-24 17:59:49 +00005547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5548$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5549if test "${ac_cv_opt_olimit_ok+set}" = set; then :
5550 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005551else
5552 ac_save_cc="$CC"
5553CC="$CC -OPT:Olimit=0"
Matthias Kloseb9621712010-04-24 17:59:49 +00005554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005555/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005556
5557int
5558main ()
5559{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005560int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005561 ;
5562 return 0;
5563}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005565if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005566 ac_cv_opt_olimit_ok=yes
5567else
Matthias Kloseb9621712010-04-24 17:59:49 +00005568 ac_cv_opt_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005569
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005570fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005572CC="$ac_save_cc"
5573fi
5574
Matthias Kloseb9621712010-04-24 17:59:49 +00005575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5576$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005577if test $ac_cv_opt_olimit_ok = yes; then
5578 case $ac_sys_system in
5579 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5580 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5581 # environment?
5582 Darwin*)
5583 ;;
5584 *)
5585 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5586 ;;
5587 esac
5588else
Matthias Kloseb9621712010-04-24 17:59:49 +00005589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5590$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5591 if test "${ac_cv_olimit_ok+set}" = set; then :
5592 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005593else
5594 ac_save_cc="$CC"
5595 CC="$CC -Olimit 1500"
Matthias Kloseb9621712010-04-24 17:59:49 +00005596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005598
5599int
5600main ()
5601{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005603 ;
5604 return 0;
5605}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005607if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608 ac_cv_olimit_ok=yes
5609else
Matthias Kloseb9621712010-04-24 17:59:49 +00005610 ac_cv_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005611
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005612fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005614 CC="$ac_save_cc"
5615fi
5616
Matthias Kloseb9621712010-04-24 17:59:49 +00005617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5618$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005619 if test $ac_cv_olimit_ok = yes; then
5620 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5621 fi
5622fi
5623
5624# Check whether GCC supports PyArg_ParseTuple format
5625if test "$GCC" = "yes"
5626then
Matthias Kloseb9621712010-04-24 17:59:49 +00005627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5628$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005629 save_CFLAGS=$CFLAGS
5630 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005632/* end confdefs.h. */
5633
5634 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635int
5636main ()
5637{
5638
5639 ;
5640 return 0;
5641}
Matthias Kloseb159a552010-04-25 21:00:44 +00005642
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005644if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005645
Matthias Kloseb159a552010-04-25 21:00:44 +00005646
Matthias Kloseb9621712010-04-24 17:59:49 +00005647$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648
Matthias Kloseb159a552010-04-25 21:00:44 +00005649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005650$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005651
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652else
Matthias Kloseb159a552010-04-25 21:00:44 +00005653
5654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005655$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005656
5657fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5659 CFLAGS=$save_CFLAGS
5660fi
5661
5662# On some compilers, pthreads are available without further options
5663# (e.g. MacOS X). On some of these systems, the compiler will not
5664# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5665# So we have to see first whether pthreads are available without
5666# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5668$as_echo_n "checking whether pthreads are available without options... " >&6; }
5669if test "${ac_cv_pthread_is_default+set}" = set; then :
5670 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671else
Matthias Kloseb9621712010-04-24 17:59:49 +00005672 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673 ac_cv_pthread_is_default=no
5674else
Matthias Kloseb9621712010-04-24 17:59:49 +00005675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676/* end confdefs.h. */
5677
5678#include <pthread.h>
5679
5680void* routine(void* p){return NULL;}
5681
5682int main(){
5683 pthread_t p;
5684 if(pthread_create(&p,NULL,routine,NULL)!=0)
5685 return 1;
5686 (void)pthread_detach(p);
5687 return 0;
5688}
5689
5690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005691if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692
5693 ac_cv_pthread_is_default=yes
5694 ac_cv_kthread=no
5695 ac_cv_pthread=no
5696
5697else
Matthias Kloseb9621712010-04-24 17:59:49 +00005698 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005700rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5701 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702fi
5703
5704
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705fi
5706
Matthias Kloseb9621712010-04-24 17:59:49 +00005707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5708$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709
5710
5711if test $ac_cv_pthread_is_default = yes
5712then
5713 ac_cv_kpthread=no
5714else
5715# -Kpthread, if available, provides the right #defines
5716# and linker options to make pthread_create available
5717# Some compilers won't report that they do not support -Kpthread,
5718# so we need to run a program to see whether it really made the
5719# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5721$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5722if test "${ac_cv_kpthread+set}" = set; then :
5723 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724else
5725 ac_save_cc="$CC"
5726CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005727if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728 ac_cv_kpthread=no
5729else
Matthias Kloseb9621712010-04-24 17:59:49 +00005730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731/* end confdefs.h. */
5732
5733#include <pthread.h>
5734
5735void* routine(void* p){return NULL;}
5736
5737int main(){
5738 pthread_t p;
5739 if(pthread_create(&p,NULL,routine,NULL)!=0)
5740 return 1;
5741 (void)pthread_detach(p);
5742 return 0;
5743}
5744
5745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005746if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747 ac_cv_kpthread=yes
5748else
Matthias Kloseb9621712010-04-24 17:59:49 +00005749 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005751rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5752 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753fi
5754
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755CC="$ac_save_cc"
5756fi
5757
Matthias Kloseb9621712010-04-24 17:59:49 +00005758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5759$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760fi
5761
5762if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5763then
5764# -Kthread, if available, provides the right #defines
5765# and linker options to make pthread_create available
5766# Some compilers won't report that they do not support -Kthread,
5767# so we need to run a program to see whether it really made the
5768# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5770$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5771if test "${ac_cv_kthread+set}" = set; then :
5772 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773else
5774 ac_save_cc="$CC"
5775CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005776if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777 ac_cv_kthread=no
5778else
Matthias Kloseb9621712010-04-24 17:59:49 +00005779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780/* end confdefs.h. */
5781
5782#include <pthread.h>
5783
5784void* routine(void* p){return NULL;}
5785
5786int main(){
5787 pthread_t p;
5788 if(pthread_create(&p,NULL,routine,NULL)!=0)
5789 return 1;
5790 (void)pthread_detach(p);
5791 return 0;
5792}
5793
5794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005795if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796 ac_cv_kthread=yes
5797else
Matthias Kloseb9621712010-04-24 17:59:49 +00005798 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005800rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5801 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802fi
5803
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804CC="$ac_save_cc"
5805fi
5806
Matthias Kloseb9621712010-04-24 17:59:49 +00005807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5808$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809fi
5810
5811if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5812then
5813# -pthread, if available, provides the right #defines
5814# and linker options to make pthread_create available
5815# Some compilers won't report that they do not support -pthread,
5816# so we need to run a program to see whether it really made the
5817# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5819$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5820if test "${ac_cv_thread+set}" = set; then :
5821 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822else
5823 ac_save_cc="$CC"
5824CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005825if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826 ac_cv_pthread=no
5827else
Matthias Kloseb9621712010-04-24 17:59:49 +00005828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829/* end confdefs.h. */
5830
5831#include <pthread.h>
5832
5833void* routine(void* p){return NULL;}
5834
5835int main(){
5836 pthread_t p;
5837 if(pthread_create(&p,NULL,routine,NULL)!=0)
5838 return 1;
5839 (void)pthread_detach(p);
5840 return 0;
5841}
5842
5843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005844if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845 ac_cv_pthread=yes
5846else
Matthias Kloseb9621712010-04-24 17:59:49 +00005847 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5850 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851fi
5852
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853CC="$ac_save_cc"
5854fi
5855
Matthias Kloseb9621712010-04-24 17:59:49 +00005856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5857$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858fi
5859
5860# If we have set a CC compiler flag for thread support then
5861# check if it works for CXX, too.
5862ac_cv_cxx_thread=no
5863if test ! -z "$CXX"
5864then
Matthias Kloseb9621712010-04-24 17:59:49 +00005865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5866$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867ac_save_cxx="$CXX"
5868
5869if test "$ac_cv_kpthread" = "yes"
5870then
5871 CXX="$CXX -Kpthread"
5872 ac_cv_cxx_thread=yes
5873elif test "$ac_cv_kthread" = "yes"
5874then
5875 CXX="$CXX -Kthread"
5876 ac_cv_cxx_thread=yes
5877elif test "$ac_cv_pthread" = "yes"
5878then
5879 CXX="$CXX -pthread"
5880 ac_cv_cxx_thread=yes
5881fi
5882
5883if test $ac_cv_cxx_thread = yes
5884then
5885 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5886 $CXX -c conftest.$ac_ext 2>&5
5887 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5888 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5889 then
5890 ac_cv_cxx_thread=yes
5891 else
5892 ac_cv_cxx_thread=no
5893 fi
5894 rm -fr conftest*
5895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5897$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898fi
5899CXX="$ac_save_cxx"
5900
5901
5902# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5904$as_echo_n "checking for ANSI C header files... " >&6; }
5905if test "${ac_cv_header_stdc+set}" = set; then :
5906 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907else
Matthias Kloseb9621712010-04-24 17:59:49 +00005908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909/* end confdefs.h. */
5910#include <stdlib.h>
5911#include <stdarg.h>
5912#include <string.h>
5913#include <float.h>
5914
5915int
5916main ()
5917{
5918
5919 ;
5920 return 0;
5921}
5922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005923if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924 ac_cv_header_stdc=yes
5925else
Matthias Kloseb9621712010-04-24 17:59:49 +00005926 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5929
5930if test $ac_cv_header_stdc = yes; then
5931 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933/* end confdefs.h. */
5934#include <string.h>
5935
5936_ACEOF
5937if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005938 $EGREP "memchr" >/dev/null 2>&1; then :
5939
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940else
5941 ac_cv_header_stdc=no
5942fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005943rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944
5945fi
5946
5947if test $ac_cv_header_stdc = yes; then
5948 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950/* end confdefs.h. */
5951#include <stdlib.h>
5952
5953_ACEOF
5954if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005955 $EGREP "free" >/dev/null 2>&1; then :
5956
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957else
5958 ac_cv_header_stdc=no
5959fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005960rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961
5962fi
5963
5964if test $ac_cv_header_stdc = yes; then
5965 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005966 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967 :
5968else
Matthias Kloseb9621712010-04-24 17:59:49 +00005969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970/* end confdefs.h. */
5971#include <ctype.h>
5972#include <stdlib.h>
5973#if ((' ' & 0x0FF) == 0x020)
5974# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5975# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5976#else
5977# define ISLOWER(c) \
5978 (('a' <= (c) && (c) <= 'i') \
5979 || ('j' <= (c) && (c) <= 'r') \
5980 || ('s' <= (c) && (c) <= 'z'))
5981# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5982#endif
5983
5984#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5985int
5986main ()
5987{
5988 int i;
5989 for (i = 0; i < 256; i++)
5990 if (XOR (islower (i), ISLOWER (i))
5991 || toupper (i) != TOUPPER (i))
5992 return 2;
5993 return 0;
5994}
5995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005996if ac_fn_c_try_run "$LINENO"; then :
5997
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998else
Matthias Kloseb9621712010-04-24 17:59:49 +00005999 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006001rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6002 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003fi
6004
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006005fi
6006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6008$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009if test $ac_cv_header_stdc = yes; then
6010
Matthias Kloseb9621712010-04-24 17:59:49 +00006011$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006012
6013fi
6014
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006015for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6016fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006017ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006018shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006019unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006020sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6021sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006022sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006023sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006024sys/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 +00006025sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006026bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006027do :
6028 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6029ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6030eval as_val=\$$as_ac_Header
6031 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006032 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006033#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006034_ACEOF
6035
6036fi
6037
Guido van Rossum627b2d71993-12-24 10:39:16 +00006038done
6039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006040ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006041for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006042 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6044$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
6045if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
6046 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006047else
Matthias Kloseb9621712010-04-24 17:59:49 +00006048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006049/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006050#include <sys/types.h>
6051#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006052
Martin v. Löwis11437992002-04-12 09:54:03 +00006053int
6054main ()
6055{
6056if ((DIR *) 0)
6057return 0;
6058 ;
6059 return 0;
6060}
6061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006062if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006063 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006064else
Matthias Kloseb9621712010-04-24 17:59:49 +00006065 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006068fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006069eval ac_res=\$$as_ac_Header
6070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6071$as_echo "$ac_res" >&6; }
6072eval as_val=\$$as_ac_Header
6073 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006074 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006075#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006076_ACEOF
6077
6078ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006079fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006080
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006081done
6082# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6083if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6085$as_echo_n "checking for library containing opendir... " >&6; }
6086if test "${ac_cv_search_opendir+set}" = set; then :
6087 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006088else
Martin v. Löwis11437992002-04-12 09:54:03 +00006089 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006091/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006092
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006093/* Override any GCC internal prototype to avoid an error.
6094 Use char because int might match the return type of a GCC
6095 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006096#ifdef __cplusplus
6097extern "C"
6098#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006099char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006100int
6101main ()
6102{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006103return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006104 ;
6105 return 0;
6106}
6107_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006108for ac_lib in '' dir; do
6109 if test -z "$ac_lib"; then
6110 ac_res="none required"
6111 else
6112 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006113 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006114 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006115 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006116 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006118rm -f core conftest.err conftest.$ac_objext \
6119 conftest$ac_exeext
6120 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006121 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006122fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006123done
Matthias Kloseb9621712010-04-24 17:59:49 +00006124if test "${ac_cv_search_opendir+set}" = set; then :
6125
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006126else
6127 ac_cv_search_opendir=no
6128fi
6129rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006130LIBS=$ac_func_search_save_LIBS
6131fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6133$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006134ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006135if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006136 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006137
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006138fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006139
Michael W. Hudson54241132001-12-07 15:38:26 +00006140else
Matthias Kloseb9621712010-04-24 17:59:49 +00006141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6142$as_echo_n "checking for library containing opendir... " >&6; }
6143if test "${ac_cv_search_opendir+set}" = set; then :
6144 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006145else
6146 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006149
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006150/* Override any GCC internal prototype to avoid an error.
6151 Use char because int might match the return type of a GCC
6152 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006153#ifdef __cplusplus
6154extern "C"
6155#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006156char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006157int
6158main ()
6159{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006160return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006161 ;
6162 return 0;
6163}
6164_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006165for ac_lib in '' x; do
6166 if test -z "$ac_lib"; then
6167 ac_res="none required"
6168 else
6169 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006170 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006171 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006172 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006173 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006174fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006175rm -f core conftest.err conftest.$ac_objext \
6176 conftest$ac_exeext
6177 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006178 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006180done
Matthias Kloseb9621712010-04-24 17:59:49 +00006181if test "${ac_cv_search_opendir+set}" = set; then :
6182
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006183else
6184 ac_cv_search_opendir=no
6185fi
6186rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006187LIBS=$ac_func_search_save_LIBS
6188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6190$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006191ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006192if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006193 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006194
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006195fi
6196
6197fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006198
Matthias Kloseb9621712010-04-24 17:59:49 +00006199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6200$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6201if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6202 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006203else
Matthias Kloseb9621712010-04-24 17:59:49 +00006204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006205/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006206#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006207int
6208main ()
6209{
6210return makedev(0, 0);
6211 ;
6212 return 0;
6213}
6214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006215if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006216 ac_cv_header_sys_types_h_makedev=yes
6217else
Matthias Kloseb9621712010-04-24 17:59:49 +00006218 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006219fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006220rm -f core conftest.err conftest.$ac_objext \
6221 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222
6223fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6225$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006226
6227if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006228ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6229if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006230
Matthias Kloseb9621712010-04-24 17:59:49 +00006231$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232
6233fi
6234
6235
6236
6237 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006238 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6239if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006240
Matthias Kloseb9621712010-04-24 17:59:49 +00006241$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006242
6243fi
6244
6245
6246 fi
6247fi
6248
Michael W. Hudson54241132001-12-07 15:38:26 +00006249
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006250# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006251for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006252do :
6253 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006254#ifdef HAVE_CURSES_H
6255#include <curses.h>
6256#endif
6257
Matthias Kloseb9621712010-04-24 17:59:49 +00006258"
6259if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006260 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006261#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006262_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006263
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006264fi
6265
6266done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006267
6268
Martin v. Löwis11017b12006-01-14 18:12:57 +00006269# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006270for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006271do :
6272 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 +00006273#ifdef HAVE_ASM_TYPES_H
6274#include <asm/types.h>
6275#endif
6276#ifdef HAVE_SYS_SOCKET_H
6277#include <sys/socket.h>
6278#endif
6279
Matthias Kloseb9621712010-04-24 17:59:49 +00006280"
6281if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006282 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006283#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006284_ACEOF
6285
6286fi
6287
6288done
6289
6290
Guido van Rossum627b2d71993-12-24 10:39:16 +00006291# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006292was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6294$as_echo_n "checking for clock_t in time.h... " >&6; }
6295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006296/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006297#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006298
6299_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006300if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006301 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006302 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006303else
Martin v. Löwis11437992002-04-12 09:54:03 +00006304
6305
Matthias Kloseb9621712010-04-24 17:59:49 +00006306$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006307
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006308
Guido van Rossum627b2d71993-12-24 10:39:16 +00006309fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006310rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006311
Matthias Kloseb9621712010-04-24 17:59:49 +00006312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6313$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006314
Neal Norwitz11690112002-07-30 01:08:28 +00006315# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6317$as_echo_n "checking for makedev... " >&6; }
6318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006319/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006320
Jesus Cea740f53a2010-04-28 11:35:30 +00006321#if defined(MAJOR_IN_MKDEV)
6322#include <sys/mkdev.h>
6323#elif defined(MAJOR_IN_SYSMACROS)
6324#include <sys/sysmacros.h>
6325#else
6326#include <sys/types.h>
6327#endif
6328
Neal Norwitz11690112002-07-30 01:08:28 +00006329int
6330main ()
6331{
Jesus Cea740f53a2010-04-28 11:35:30 +00006332
6333 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006334 ;
6335 return 0;
6336}
Matthias Kloseb159a552010-04-25 21:00:44 +00006337
Neal Norwitz11690112002-07-30 01:08:28 +00006338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006339if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006340 ac_cv_has_makedev=yes
6341else
Matthias Kloseb9621712010-04-24 17:59:49 +00006342 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006344rm -f core conftest.err conftest.$ac_objext \
6345 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006346if test "$ac_cv_has_makedev" = "no"; then
6347 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006349/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006350
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006351#define _OSF_SOURCE 1
6352#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006353
Neal Norwitz11690112002-07-30 01:08:28 +00006354int
6355main ()
6356{
6357 makedev(0, 0)
6358 ;
6359 return 0;
6360}
6361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006362if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006363 ac_cv_has_makedev=yes
6364else
Matthias Kloseb9621712010-04-24 17:59:49 +00006365 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006366fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006367rm -f core conftest.err conftest.$ac_objext \
6368 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006369 if test "$ac_cv_has_makedev" = "yes"; then
6370
Matthias Kloseb9621712010-04-24 17:59:49 +00006371$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006372
6373 fi
6374fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6376$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006377if test "$ac_cv_has_makedev" = "yes"; then
6378
Matthias Kloseb9621712010-04-24 17:59:49 +00006379$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006380
6381fi
6382
Martin v. Löwis399a6892002-10-04 10:22:02 +00006383# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6384# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6385# defined, but the compiler does not support pragma redefine_extname,
6386# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6387# structures (such as rlimit64) without declaring them. As a
6388# work-around, disable LFS on such configurations
6389
6390use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6392$as_echo_n "checking Solaris LFS bug... " >&6; }
6393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006394/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006395
6396#define _LARGEFILE_SOURCE 1
6397#define _FILE_OFFSET_BITS 64
6398#include <sys/resource.h>
6399
Martin v. Löwis399a6892002-10-04 10:22:02 +00006400int
6401main ()
6402{
6403struct rlimit foo;
6404 ;
6405 return 0;
6406}
6407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006408if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006409 sol_lfs_bug=no
6410else
Matthias Kloseb9621712010-04-24 17:59:49 +00006411 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6415$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006416if test "$sol_lfs_bug" = "yes"; then
6417 use_lfs=no
6418fi
6419
6420if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006421# Two defines needed to enable largefile support on various platforms
6422# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006423
Matthias Kloseb9621712010-04-24 17:59:49 +00006424$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006425
6426
Matthias Kloseb9621712010-04-24 17:59:49 +00006427$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006428
Martin v. Löwis399a6892002-10-04 10:22:02 +00006429fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006430
Guido van Rossum84e7b241996-08-19 21:59:00 +00006431# Add some code to confdefs.h so that the test for off_t works on SCO
6432cat >> confdefs.h <<\EOF
6433#if defined(SCO_DS)
6434#undef _OFF_T
6435#endif
6436EOF
6437
Guido van Rossumef2255b2000-03-10 22:30:29 +00006438# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006439ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6440if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006441
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006442else
Martin v. Löwis11437992002-04-12 09:54:03 +00006443
6444cat >>confdefs.h <<_ACEOF
6445#define mode_t int
6446_ACEOF
6447
6448fi
6449
Matthias Kloseb9621712010-04-24 17:59:49 +00006450ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6451if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006452
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006453else
Martin v. Löwis11437992002-04-12 09:54:03 +00006454
6455cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006456#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006457_ACEOF
6458
6459fi
6460
Matthias Kloseb9621712010-04-24 17:59:49 +00006461ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6462if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006463
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006464else
Martin v. Löwis11437992002-04-12 09:54:03 +00006465
6466cat >>confdefs.h <<_ACEOF
6467#define pid_t int
6468_ACEOF
6469
6470fi
6471
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006472
Martin v. Löwis11437992002-04-12 09:54:03 +00006473cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006474#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006475_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006476
Matthias Kloseb9621712010-04-24 17:59:49 +00006477ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6478if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006479
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006480else
Martin v. Löwis11437992002-04-12 09:54:03 +00006481
6482cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006483#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006484_ACEOF
6485
6486fi
6487
Matthias Kloseb9621712010-04-24 17:59:49 +00006488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6489$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6490if test "${ac_cv_type_uid_t+set}" = set; then :
6491 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006492else
Matthias Kloseb9621712010-04-24 17:59:49 +00006493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006494/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006495#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006496
6497_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006498if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006499 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006500 ac_cv_type_uid_t=yes
6501else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006502 ac_cv_type_uid_t=no
6503fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006504rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006505
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006506fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6508$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006509if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006510
Matthias Kloseb9621712010-04-24 17:59:49 +00006511$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006512
6513
Matthias Kloseb9621712010-04-24 17:59:49 +00006514$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006515
6516fi
6517
Matthias Kloseb9621712010-04-24 17:59:49 +00006518ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6519case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006520 no|yes) ;; #(
6521 *)
6522
Matthias Kloseb9621712010-04-24 17:59:49 +00006523$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006524
6525
6526cat >>confdefs.h <<_ACEOF
6527#define uint32_t $ac_cv_c_uint32_t
6528_ACEOF
6529;;
6530 esac
6531
Matthias Kloseb9621712010-04-24 17:59:49 +00006532ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6533case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006534 no|yes) ;; #(
6535 *)
6536
Matthias Kloseb9621712010-04-24 17:59:49 +00006537$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006538
6539
6540cat >>confdefs.h <<_ACEOF
6541#define uint64_t $ac_cv_c_uint64_t
6542_ACEOF
6543;;
6544 esac
6545
Matthias Kloseb9621712010-04-24 17:59:49 +00006546ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6547case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006548 no|yes) ;; #(
6549 *)
6550
6551cat >>confdefs.h <<_ACEOF
6552#define int32_t $ac_cv_c_int32_t
6553_ACEOF
6554;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006555esac
6556
Matthias Kloseb9621712010-04-24 17:59:49 +00006557ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6558case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006559 no|yes) ;; #(
6560 *)
6561
6562cat >>confdefs.h <<_ACEOF
6563#define int64_t $ac_cv_c_int64_t
6564_ACEOF
6565;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006566esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006567
Matthias Kloseb9621712010-04-24 17:59:49 +00006568ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6569if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006570
Matthias Kloseb9621712010-04-24 17:59:49 +00006571$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006572
6573fi
6574
Jack Jansendd19cf82001-12-06 22:36:17 +00006575
Michael W. Hudson54241132001-12-07 15:38:26 +00006576# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006577# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006578# The cast to long int works around a bug in the HP C Compiler
6579# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6580# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6581# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6583$as_echo_n "checking size of int... " >&6; }
6584if test "${ac_cv_sizeof_int+set}" = set; then :
6585 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006586else
Matthias Kloseb9621712010-04-24 17:59:49 +00006587 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 +00006588
Martin v. Löwis11437992002-04-12 09:54:03 +00006589else
Matthias Kloseb9621712010-04-24 17:59:49 +00006590 if test "$ac_cv_type_int" = yes; then
6591 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6592$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6593{ as_fn_set_status 77
6594as_fn_error "cannot compute sizeof (int)
6595See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006596 else
6597 ac_cv_sizeof_int=0
6598 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006600
Martin v. Löwis11437992002-04-12 09:54:03 +00006601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6603$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006604
6605
6606
Martin v. Löwis11437992002-04-12 09:54:03 +00006607cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006608#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006609_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006610
6611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006612# The cast to long int works around a bug in the HP C Compiler
6613# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6614# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6615# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6617$as_echo_n "checking size of long... " >&6; }
6618if test "${ac_cv_sizeof_long+set}" = set; then :
6619 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006620else
Matthias Kloseb9621712010-04-24 17:59:49 +00006621 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 +00006622
Martin v. Löwis11437992002-04-12 09:54:03 +00006623else
Matthias Kloseb9621712010-04-24 17:59:49 +00006624 if test "$ac_cv_type_long" = yes; then
6625 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6626$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6627{ as_fn_set_status 77
6628as_fn_error "cannot compute sizeof (long)
6629See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006630 else
6631 ac_cv_sizeof_long=0
6632 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006634
Martin v. Löwis11437992002-04-12 09:54:03 +00006635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6637$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006638
6639
6640
Martin v. Löwis11437992002-04-12 09:54:03 +00006641cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006642#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006643_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006644
6645
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006646# The cast to long int works around a bug in the HP C Compiler
6647# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6648# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6649# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6651$as_echo_n "checking size of void *... " >&6; }
6652if test "${ac_cv_sizeof_void_p+set}" = set; then :
6653 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006654else
Matthias Kloseb9621712010-04-24 17:59:49 +00006655 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 +00006656
Martin v. Löwis11437992002-04-12 09:54:03 +00006657else
Matthias Kloseb9621712010-04-24 17:59:49 +00006658 if test "$ac_cv_type_void_p" = yes; then
6659 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6660$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6661{ as_fn_set_status 77
6662as_fn_error "cannot compute sizeof (void *)
6663See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006664 else
6665 ac_cv_sizeof_void_p=0
6666 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006668
Martin v. Löwis11437992002-04-12 09:54:03 +00006669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6671$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006672
6673
6674
Martin v. Löwis11437992002-04-12 09:54:03 +00006675cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006676#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006677_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006678
6679
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006680# The cast to long int works around a bug in the HP C Compiler
6681# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6682# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6683# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6685$as_echo_n "checking size of short... " >&6; }
6686if test "${ac_cv_sizeof_short+set}" = set; then :
6687 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006688else
Matthias Kloseb9621712010-04-24 17:59:49 +00006689 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 +00006690
Martin v. Löwis11437992002-04-12 09:54:03 +00006691else
Matthias Kloseb9621712010-04-24 17:59:49 +00006692 if test "$ac_cv_type_short" = yes; then
6693 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6694$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6695{ as_fn_set_status 77
6696as_fn_error "cannot compute sizeof (short)
6697See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006698 else
6699 ac_cv_sizeof_short=0
6700 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006702
Martin v. Löwis11437992002-04-12 09:54:03 +00006703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6705$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006706
6707
6708
Martin v. Löwis11437992002-04-12 09:54:03 +00006709cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006710#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006711_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006712
6713
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006714# The cast to long int works around a bug in the HP C Compiler
6715# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6716# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6717# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6719$as_echo_n "checking size of float... " >&6; }
6720if test "${ac_cv_sizeof_float+set}" = set; then :
6721 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006722else
Matthias Kloseb9621712010-04-24 17:59:49 +00006723 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 +00006724
Martin v. Löwis11437992002-04-12 09:54:03 +00006725else
Matthias Kloseb9621712010-04-24 17:59:49 +00006726 if test "$ac_cv_type_float" = yes; then
6727 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6728$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6729{ as_fn_set_status 77
6730as_fn_error "cannot compute sizeof (float)
6731See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006732 else
6733 ac_cv_sizeof_float=0
6734 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006736
Martin v. Löwis11437992002-04-12 09:54:03 +00006737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6739$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006740
6741
6742
Martin v. Löwis11437992002-04-12 09:54:03 +00006743cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006744#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006745_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006746
6747
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006748# The cast to long int works around a bug in the HP C Compiler
6749# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6750# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6751# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6753$as_echo_n "checking size of double... " >&6; }
6754if test "${ac_cv_sizeof_double+set}" = set; then :
6755 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006756else
Matthias Kloseb9621712010-04-24 17:59:49 +00006757 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 +00006758
Martin v. Löwis11437992002-04-12 09:54:03 +00006759else
Matthias Kloseb9621712010-04-24 17:59:49 +00006760 if test "$ac_cv_type_double" = yes; then
6761 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6762$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6763{ as_fn_set_status 77
6764as_fn_error "cannot compute sizeof (double)
6765See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006766 else
6767 ac_cv_sizeof_double=0
6768 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006770
Martin v. Löwis11437992002-04-12 09:54:03 +00006771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6773$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006774
6775
6776
Martin v. Löwis11437992002-04-12 09:54:03 +00006777cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006778#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006779_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006780
6781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006782# The cast to long int works around a bug in the HP C Compiler
6783# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6784# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6785# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6787$as_echo_n "checking size of fpos_t... " >&6; }
6788if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6789 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006790else
Matthias Kloseb9621712010-04-24 17:59:49 +00006791 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 +00006792
Martin v. Löwis11437992002-04-12 09:54:03 +00006793else
Matthias Kloseb9621712010-04-24 17:59:49 +00006794 if test "$ac_cv_type_fpos_t" = yes; then
6795 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6796$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6797{ as_fn_set_status 77
6798as_fn_error "cannot compute sizeof (fpos_t)
6799See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006800 else
6801 ac_cv_sizeof_fpos_t=0
6802 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006804
Martin v. Löwis11437992002-04-12 09:54:03 +00006805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6807$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006808
6809
6810
Martin v. Löwis11437992002-04-12 09:54:03 +00006811cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006812#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006813_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006814
Michael W. Hudson54241132001-12-07 15:38:26 +00006815
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006816# The cast to long int works around a bug in the HP C Compiler
6817# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6818# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6819# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6821$as_echo_n "checking size of size_t... " >&6; }
6822if test "${ac_cv_sizeof_size_t+set}" = set; then :
6823 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006824else
Matthias Kloseb9621712010-04-24 17:59:49 +00006825 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 +00006826
Martin v. Löwis18e16552006-02-15 17:27:45 +00006827else
Matthias Kloseb9621712010-04-24 17:59:49 +00006828 if test "$ac_cv_type_size_t" = yes; then
6829 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6830$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6831{ as_fn_set_status 77
6832as_fn_error "cannot compute sizeof (size_t)
6833See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006834 else
6835 ac_cv_sizeof_size_t=0
6836 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006838
Martin v. Löwis18e16552006-02-15 17:27:45 +00006839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6841$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006842
6843
6844
Martin v. Löwis18e16552006-02-15 17:27:45 +00006845cat >>confdefs.h <<_ACEOF
6846#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6847_ACEOF
6848
6849
Christian Heimes400adb02008-02-01 08:12:03 +00006850# The cast to long int works around a bug in the HP C Compiler
6851# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6852# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6853# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6855$as_echo_n "checking size of pid_t... " >&6; }
6856if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6857 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006858else
Matthias Kloseb9621712010-04-24 17:59:49 +00006859 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 +00006860
Christian Heimes400adb02008-02-01 08:12:03 +00006861else
Matthias Kloseb9621712010-04-24 17:59:49 +00006862 if test "$ac_cv_type_pid_t" = yes; then
6863 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6864$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6865{ as_fn_set_status 77
6866as_fn_error "cannot compute sizeof (pid_t)
6867See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006868 else
6869 ac_cv_sizeof_pid_t=0
6870 fi
6871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006872
Christian Heimes400adb02008-02-01 08:12:03 +00006873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6875$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006876
6877
6878
6879cat >>confdefs.h <<_ACEOF
6880#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6881_ACEOF
6882
6883
Michael W. Hudson54241132001-12-07 15:38:26 +00006884
Matthias Kloseb9621712010-04-24 17:59:49 +00006885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6886$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006887have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006889/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006890
Martin v. Löwis11437992002-04-12 09:54:03 +00006891int
6892main ()
6893{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006894long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006895 ;
6896 return 0;
6897}
6898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006899if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006900
6901
Matthias Kloseb9621712010-04-24 17:59:49 +00006902$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006903
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006904 have_long_long=yes
6905
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6909$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006910if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006911# The cast to long int works around a bug in the HP C Compiler
6912# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6913# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6914# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6916$as_echo_n "checking size of long long... " >&6; }
6917if test "${ac_cv_sizeof_long_long+set}" = set; then :
6918 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006919else
Matthias Kloseb9621712010-04-24 17:59:49 +00006920 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 +00006921
Martin v. Löwis11437992002-04-12 09:54:03 +00006922else
Matthias Kloseb9621712010-04-24 17:59:49 +00006923 if test "$ac_cv_type_long_long" = yes; then
6924 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6925$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6926{ as_fn_set_status 77
6927as_fn_error "cannot compute sizeof (long long)
6928See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006929 else
6930 ac_cv_sizeof_long_long=0
6931 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006933
Martin v. Löwis11437992002-04-12 09:54:03 +00006934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6936$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006937
6938
6939
Martin v. Löwis11437992002-04-12 09:54:03 +00006940cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006941#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006942_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006943
Michael W. Hudson54241132001-12-07 15:38:26 +00006944
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006945fi
6946
Matthias Kloseb9621712010-04-24 17:59:49 +00006947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6948$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006949have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006951/* end confdefs.h. */
6952
6953int
6954main ()
6955{
6956long double x; x = (long double)0;
6957 ;
6958 return 0;
6959}
6960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006961if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006962
6963
Matthias Kloseb9621712010-04-24 17:59:49 +00006964$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006965
6966 have_long_double=yes
6967
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006968fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6971$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006972if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006973# The cast to long int works around a bug in the HP C Compiler
6974# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6975# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6976# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6978$as_echo_n "checking size of long double... " >&6; }
6979if test "${ac_cv_sizeof_long_double+set}" = set; then :
6980 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006981else
Matthias Kloseb9621712010-04-24 17:59:49 +00006982 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 +00006983
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006984else
Matthias Kloseb9621712010-04-24 17:59:49 +00006985 if test "$ac_cv_type_long_double" = yes; then
6986 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6987$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6988{ as_fn_set_status 77
6989as_fn_error "cannot compute sizeof (long double)
6990See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006991 else
6992 ac_cv_sizeof_long_double=0
6993 fi
6994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006995
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6998$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006999
7000
7001
7002cat >>confdefs.h <<_ACEOF
7003#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7004_ACEOF
7005
7006
7007fi
7008
7009
Matthias Kloseb9621712010-04-24 17:59:49 +00007010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7011$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007012have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007014/* end confdefs.h. */
7015
7016int
7017main ()
7018{
7019_Bool x; x = (_Bool)0;
7020 ;
7021 return 0;
7022}
7023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007024if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007025
7026
Matthias Kloseb9621712010-04-24 17:59:49 +00007027$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007028
7029 have_c99_bool=yes
7030
Thomas Woutersb2137042007-02-01 18:02:27 +00007031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7034$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007035if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007036# The cast to long int works around a bug in the HP C Compiler
7037# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7038# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7039# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7041$as_echo_n "checking size of _Bool... " >&6; }
7042if test "${ac_cv_sizeof__Bool+set}" = set; then :
7043 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007044else
Matthias Kloseb9621712010-04-24 17:59:49 +00007045 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 +00007046
Thomas Woutersb2137042007-02-01 18:02:27 +00007047else
Matthias Kloseb9621712010-04-24 17:59:49 +00007048 if test "$ac_cv_type__Bool" = yes; then
7049 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7050$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7051{ as_fn_set_status 77
7052as_fn_error "cannot compute sizeof (_Bool)
7053See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007054 else
7055 ac_cv_sizeof__Bool=0
7056 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007057fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007058
Thomas Woutersb2137042007-02-01 18:02:27 +00007059fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7061$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007062
7063
7064
Thomas Woutersb2137042007-02-01 18:02:27 +00007065cat >>confdefs.h <<_ACEOF
7066#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7067_ACEOF
7068
7069
7070fi
7071
Matthias Kloseb9621712010-04-24 17:59:49 +00007072ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007073 #include <stdint.h>
7074 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007075"
7076if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007077
7078cat >>confdefs.h <<_ACEOF
7079#define HAVE_UINTPTR_T 1
7080_ACEOF
7081
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007082# The cast to long int works around a bug in the HP C Compiler
7083# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7084# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7085# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7087$as_echo_n "checking size of uintptr_t... " >&6; }
7088if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7089 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007090else
Matthias Kloseb9621712010-04-24 17:59:49 +00007091 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 +00007092
Martin v. Löwis11437992002-04-12 09:54:03 +00007093else
Matthias Kloseb9621712010-04-24 17:59:49 +00007094 if test "$ac_cv_type_uintptr_t" = yes; then
7095 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7097{ as_fn_set_status 77
7098as_fn_error "cannot compute sizeof (uintptr_t)
7099See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007100 else
7101 ac_cv_sizeof_uintptr_t=0
7102 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007104
Martin v. Löwis11437992002-04-12 09:54:03 +00007105fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7107$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007108
7109
7110
Martin v. Löwis11437992002-04-12 09:54:03 +00007111cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007112#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007113_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007114
Michael W. Hudson54241132001-12-07 15:38:26 +00007115
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007116fi
7117
Thomas Wouters89f507f2006-12-13 04:49:30 +00007118
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007119# The cast to long int works around a bug in the HP C Compiler
7120# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7121# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7122# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7124$as_echo_n "checking size of off_t... " >&6; }
7125if test "${ac_cv_sizeof_off_t+set}" = set; then :
7126 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007127else
Matthias Kloseb9621712010-04-24 17:59:49 +00007128 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007129#ifdef HAVE_SYS_TYPES_H
7130#include <sys/types.h>
7131#endif
7132
Matthias Kloseb9621712010-04-24 17:59:49 +00007133"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007134
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007135else
Matthias Kloseb9621712010-04-24 17:59:49 +00007136 if test "$ac_cv_type_off_t" = yes; then
7137 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7138$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7139{ as_fn_set_status 77
7140as_fn_error "cannot compute sizeof (off_t)
7141See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007142 else
7143 ac_cv_sizeof_off_t=0
7144 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007145fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007146
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007147fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7149$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007150
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007151
7152
Martin v. Löwis11437992002-04-12 09:54:03 +00007153cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007154#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007155_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007156
Michael W. Hudson54241132001-12-07 15:38:26 +00007157
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007158
Matthias Kloseb9621712010-04-24 17:59:49 +00007159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7160$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007161if test "$have_long_long" = yes
7162then
7163if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007164 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007165
Matthias Kloseb9621712010-04-24 17:59:49 +00007166$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007167
Matthias Kloseb9621712010-04-24 17:59:49 +00007168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7169$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007170else
Matthias Kloseb9621712010-04-24 17:59:49 +00007171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7172$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007173fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007174else
Matthias Kloseb9621712010-04-24 17:59:49 +00007175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7176$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007177fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007178
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007179# The cast to long int works around a bug in the HP C Compiler
7180# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7181# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7182# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7184$as_echo_n "checking size of time_t... " >&6; }
7185if test "${ac_cv_sizeof_time_t+set}" = set; then :
7186 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007187else
Matthias Kloseb9621712010-04-24 17:59:49 +00007188 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007189#ifdef HAVE_SYS_TYPES_H
7190#include <sys/types.h>
7191#endif
7192#ifdef HAVE_TIME_H
7193#include <time.h>
7194#endif
7195
Matthias Kloseb9621712010-04-24 17:59:49 +00007196"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007197
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007198else
Matthias Kloseb9621712010-04-24 17:59:49 +00007199 if test "$ac_cv_type_time_t" = yes; then
7200 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7201$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7202{ as_fn_set_status 77
7203as_fn_error "cannot compute sizeof (time_t)
7204See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007205 else
7206 ac_cv_sizeof_time_t=0
7207 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007209
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007210fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7212$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007213
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007214
7215
Martin v. Löwis11437992002-04-12 09:54:03 +00007216cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007217#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007218_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007219
Michael W. Hudson54241132001-12-07 15:38:26 +00007220
7221
Trent Mick635f6fb2000-08-23 21:33:05 +00007222# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007223ac_save_cc="$CC"
7224if test "$ac_cv_kpthread" = "yes"
7225then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007226elif test "$ac_cv_kthread" = "yes"
7227then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007228elif test "$ac_cv_pthread" = "yes"
7229then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007230fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007231
Matthias Kloseb9621712010-04-24 17:59:49 +00007232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7233$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007234have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007236/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007237
7238 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007239int
7240main ()
7241{
Guido van Rossum12580492000-09-24 16:47:19 +00007242pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007243 ;
7244 return 0;
7245}
Matthias Kloseb159a552010-04-25 21:00:44 +00007246
Martin v. Löwis11437992002-04-12 09:54:03 +00007247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007248if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007249 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7253$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007254if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007255 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007256# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7257# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7258# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7260$as_echo_n "checking size of pthread_t... " >&6; }
7261if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7262 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007263else
Matthias Kloseb9621712010-04-24 17:59:49 +00007264 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007265#ifdef HAVE_PTHREAD_H
7266#include <pthread.h>
7267#endif
7268
Matthias Kloseb9621712010-04-24 17:59:49 +00007269"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007270
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007271else
Matthias Kloseb9621712010-04-24 17:59:49 +00007272 if test "$ac_cv_type_pthread_t" = yes; then
7273 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7274$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7275{ as_fn_set_status 77
7276as_fn_error "cannot compute sizeof (pthread_t)
7277See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007278 else
7279 ac_cv_sizeof_pthread_t=0
7280 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007281fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007282
Trent Mick635f6fb2000-08-23 21:33:05 +00007283fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7285$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007286
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007287
7288
Martin v. Löwis11437992002-04-12 09:54:03 +00007289cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007290#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007291_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007292
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007293
Trent Mick635f6fb2000-08-23 21:33:05 +00007294fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007295CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007296
Michael W. Hudson54241132001-12-07 15:38:26 +00007297
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007298case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007299 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007300 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7301 ;;
7302 Darwin/*)
7303 OTHER_LIBTOOL_OPT=""
7304 ;;
7305esac
7306
7307
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007308ARCH_RUN_32BIT=""
7309
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007310case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007311 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007312 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7313 if test "${enable_universalsdk}"; then
7314 :
7315 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007316 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007317 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007318 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007319 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007320 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007321 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007322 if test ${gcc_version} '<' 4.0
7323 then
7324 LIBTOOL_CRUFT="-lcc_dynamic"
7325 else
7326 LIBTOOL_CRUFT=""
7327 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007328 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007329 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007330else
Matthias Kloseb9621712010-04-24 17:59:49 +00007331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007332/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007333
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007334 #include <unistd.h>
7335 int main(int argc, char*argv[])
7336 {
7337 if (sizeof(long) == 4) {
7338 return 0;
7339 } else {
7340 return 1;
7341 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007342 }
7343
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007345if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007346 ac_osx_32bit=yes
7347else
Matthias Kloseb9621712010-04-24 17:59:49 +00007348 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007349fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007350rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7351 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007352fi
7353
7354
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007355 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007356 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007357 i386)
7358 MACOSX_DEFAULT_ARCH="i386"
7359 ;;
7360 ppc)
7361 MACOSX_DEFAULT_ARCH="ppc"
7362 ;;
7363 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007364 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007365 ;;
7366 esac
7367 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007368 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007369 i386)
7370 MACOSX_DEFAULT_ARCH="x86_64"
7371 ;;
7372 ppc)
7373 MACOSX_DEFAULT_ARCH="ppc64"
7374 ;;
7375 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007376 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007377 ;;
7378 esac
7379
7380 #ARCH_RUN_32BIT="true"
7381 fi
7382
7383 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007384 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007385 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007386esac
7387
Matthias Kloseb9621712010-04-24 17:59:49 +00007388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7389$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007390if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007391then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007392 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007393 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007394 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007395
Matthias Kloseb9621712010-04-24 17:59:49 +00007396$as_echo "#define WITH_NEXT_FRAMEWORK 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: yes" >&5
7399$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007400 if test $enable_shared = "yes"
7401 then
Matthias Kloseb9621712010-04-24 17:59:49 +00007402 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 +00007403 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007404else
Matthias Kloseb9621712010-04-24 17:59:49 +00007405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7406$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007407fi
7408
Matthias Kloseb9621712010-04-24 17:59:49 +00007409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7410$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007411case $ac_sys_system/$ac_sys_release in
7412 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007413
Matthias Kloseb9621712010-04-24 17:59:49 +00007414$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007415
Matthias Kloseb9621712010-04-24 17:59:49 +00007416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7417$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007418 ;;
7419 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7421$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007422 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007423esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007424
Guido van Rossum0a516c91994-09-12 10:58:40 +00007425# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007426
Michael W. Hudson54241132001-12-07 15:38:26 +00007427
7428
7429
7430
Benjamin Peterson99f03762010-04-11 22:15:28 +00007431
Guido van Rossum0a516c91994-09-12 10:58:40 +00007432# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007433# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Kloseb9621712010-04-24 17:59:49 +00007434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7435$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007436if test -z "$SO"
7437then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007438 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +00007439 hp*|HP*)
7440 case `uname -m` in
7441 ia64) SO=.so;;
7442 *) SO=.sl;;
7443 esac
7444 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007445 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007446 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007447 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007448else
7449 # this might also be a termcap variable, see #610332
7450 echo
7451 echo '====================================================================='
7452 echo '+ +'
7453 echo '+ WARNING: You have set SO in your environment. +'
7454 echo '+ Do you really mean to change the extension for shared libraries? +'
7455 echo '+ Continuing in 10 seconds to let you to ponder. +'
7456 echo '+ +'
7457 echo '====================================================================='
7458 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007459fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7461$as_echo "$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00007462
Georg Brandlb1441c72009-01-03 22:33:39 +00007463
Thomas Wouters477c8d52006-05-27 19:21:47 +00007464cat >>confdefs.h <<_ACEOF
7465#define SHLIB_EXT "$SO"
7466_ACEOF
7467
Guido van Rossum0a516c91994-09-12 10:58:40 +00007468# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007469# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007470# (Shared libraries in this instance are shared modules to be loaded into
7471# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7473$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007474if test -z "$LDSHARED"
7475then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007476 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007477 AIX*)
7478 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007479 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007480 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007481 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007482 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007483 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007484 if test "$GCC" = "yes" ; then
7485 LDSHARED='$(CC) -shared'
7486 LDCXXSHARED='$(CXX) -shared'
7487 else
7488 LDSHARED='$(CC) -G'
7489 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007490 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007491 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007492 if test "$GCC" = "yes" ; then
7493 LDSHARED='$(CC) -shared'
7494 LDCXXSHARED='$(CXX) -shared'
7495 else
7496 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007497 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007498 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007499 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00007500 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007501 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007502 if test "$enable_framework" ; then
7503 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007504 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7505 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007506 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007507 else
7508 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007509 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007510 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007511 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007512 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +00007513 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007514 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007515 if test "$enable_framework" ; then
7516 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007517 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7518 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007519 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007520 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007521 # No framework, use the Python app as bundle-loader
7522 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007523 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007524 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007525 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007526 Darwin/*)
7527 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7528 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007529
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007530 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007531 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007532 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007533 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007534 fi
Jack Jansen6b08a402004-06-03 12:41:45 +00007535 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007536 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007537 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007538 else
7539 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007540 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007541 if test "$enable_framework" ; then
7542 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007543 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7544 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007545 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007546 else
7547 # No framework, use the Python app as bundle-loader
7548 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7549 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007550 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007551 fi
7552 fi
7553 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007554 Linux*|GNU*|QNX*)
7555 LDSHARED='$(CC) -shared'
7556 LDCXXSHARED='$(CXX) -shared';;
7557 BSD/OS*/4*)
7558 LDSHARED="gcc -shared"
7559 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007560 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007561 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007562 then
Benjamin Petersonab0a7522010-03-14 15:18:25 +00007563 LDSHARED='$(CC) -shared ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007564 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007565 else
7566 LDSHARED="ld -Bshareable ${LDFLAGS}"
7567 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007568 OpenBSD*)
7569 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7570 then
7571 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007572 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007573 else
7574 case `uname -r` in
7575 [01].* | 2.[0-7] | 2.[0-7].*)
7576 LDSHARED="ld -Bshareable ${LDFLAGS}"
7577 ;;
7578 *)
7579 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007580 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007581 ;;
7582 esac
7583 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007584 NetBSD*|DragonFly*)
7585 LDSHARED="cc -shared ${LDFLAGS}"
7586 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007587 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007588 if test "$GCC" = "yes" ; then
7589 LDSHARED='$(CC) -shared'
7590 LDCXXSHARED='$(CXX) -shared'
7591 else
7592 LDSHARED='$(CC) -G'
7593 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007594 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007595 SCO_SV*)
7596 LDSHARED='$(CC) -Wl,-G,-Bexport'
7597 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7598 CYGWIN*)
7599 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7600 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007601 *) LDSHARED="ld";;
7602 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007603fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7605$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007606LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007607BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007608# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007609# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7611$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007612if test -z "$CCSHARED"
7613then
Guido van Rossum07397971997-04-29 21:49:50 +00007614 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007615 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007616 then CCSHARED="-fPIC";
7617 elif test `uname -p` = sparc;
7618 then CCSHARED="-xcode=pic32";
7619 else CCSHARED="-Kpic";
7620 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007621 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007622 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007623 else CCSHARED="+z";
7624 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007625 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007626 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007627 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007628 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007629 if test "$GCC" = "yes"
7630 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007631 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007632 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007633 SCO_SV*)
7634 if test "$GCC" = "yes"
7635 then CCSHARED="-fPIC"
7636 else CCSHARED="-Kpic -belf"
7637 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007638 IRIX*/6*) case $CC in
7639 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007640 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007641 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007642 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7645$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007646# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007647# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7649$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007650if test -z "$LINKFORSHARED"
7651then
Guido van Rossum07397971997-04-29 21:49:50 +00007652 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007653 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007654 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007655 LINKFORSHARED="-Wl,-E -Wl,+s";;
7656# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007657 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007658 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007659 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007660 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007661 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007662 if test "$enable_framework"
7663 then
Jack Jansenda49e192005-01-07 13:08:22 +00007664 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007665 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007666 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007667 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007668 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007669 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007670 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007671 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7672 then
7673 LINKFORSHARED="-Wl,--export-dynamic"
7674 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007675 SunOS/5*) case $CC in
7676 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007677 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007678 then
7679 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007680 fi;;
7681 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007682 CYGWIN*)
7683 if test $enable_shared = "no"
7684 then
7685 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7686 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007687 QNX*)
7688 # -Wl,-E causes the symbols to be added to the dynamic
7689 # symbol table so that they can be found when a module
7690 # is loaded. -N 2048K causes the stack size to be set
7691 # to 2048 kilobytes so that the stack doesn't overflow
7692 # when running test_compile.py.
7693 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007694 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7697$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007698
Michael W. Hudson54241132001-12-07 15:38:26 +00007699
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007700
Matthias Kloseb9621712010-04-24 17:59:49 +00007701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7702$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007703if test ! "$LIBRARY" = "$LDLIBRARY"
7704then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007705 case $ac_sys_system in
7706 CYGWIN*)
7707 # Cygwin needs CCSHARED when building extension DLLs
7708 # but not when building the interpreter DLL.
7709 CFLAGSFORSHARED='';;
7710 *)
7711 CFLAGSFORSHARED='$(CCSHARED)'
7712 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007713fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7715$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007716
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007717# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7718# library (with --enable-shared).
7719# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007720# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7721# if it is not required, since it creates a dependency of the shared library
7722# to LIBS. This, in turn, means that applications linking the shared libpython
7723# don't need to link LIBS explicitly. The default should be only changed
7724# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007725
Matthias Kloseb9621712010-04-24 17:59:49 +00007726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7727$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007728case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007729 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007730 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007731esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7733$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007734
7735
Guido van Rossum627b2d71993-12-24 10:39:16 +00007736# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7738$as_echo_n "checking for dlopen in -ldl... " >&6; }
7739if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7740 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007741else
Martin v. Löwis11437992002-04-12 09:54:03 +00007742 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007743LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007746
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007747/* Override any GCC internal prototype to avoid an error.
7748 Use char because int might match the return type of a GCC
7749 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007750#ifdef __cplusplus
7751extern "C"
7752#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007753char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007754int
7755main ()
7756{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007757return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007758 ;
7759 return 0;
7760}
7761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007762if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007763 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007764else
Matthias Kloseb9621712010-04-24 17:59:49 +00007765 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007767rm -f core conftest.err conftest.$ac_objext \
7768 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007769LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7772$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7773if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007774 cat >>confdefs.h <<_ACEOF
7775#define HAVE_LIBDL 1
7776_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007777
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007778 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007779
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007780fi
7781 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7783$as_echo_n "checking for shl_load in -ldld... " >&6; }
7784if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7785 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007786else
Martin v. Löwis11437992002-04-12 09:54:03 +00007787 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007788LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007790/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007791
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007792/* Override any GCC internal prototype to avoid an error.
7793 Use char because int might match the return type of a GCC
7794 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007795#ifdef __cplusplus
7796extern "C"
7797#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007798char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007799int
7800main ()
7801{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007803 ;
7804 return 0;
7805}
7806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007807if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007808 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007809else
Matthias Kloseb9621712010-04-24 17:59:49 +00007810 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007811fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007812rm -f core conftest.err conftest.$ac_objext \
7813 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007814LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7817$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7818if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007819 cat >>confdefs.h <<_ACEOF
7820#define HAVE_LIBDLD 1
7821_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007822
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007823 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007824
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007825fi
7826 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007827
Georg Brandlb1441c72009-01-03 22:33:39 +00007828# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007829if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7831$as_echo_n "checking for library containing sem_init... " >&6; }
7832if test "${ac_cv_search_sem_init+set}" = set; then :
7833 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007834else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007835 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007837/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839/* Override any GCC internal prototype to avoid an error.
7840 Use char because int might match the return type of a GCC
7841 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007842#ifdef __cplusplus
7843extern "C"
7844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007845char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007846int
7847main ()
7848{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007849return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007850 ;
7851 return 0;
7852}
7853_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007854for ac_lib in '' pthread rt posix4; do
7855 if test -z "$ac_lib"; then
7856 ac_res="none required"
7857 else
7858 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007859 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007860 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007861 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007862 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007864rm -f core conftest.err conftest.$ac_objext \
7865 conftest$ac_exeext
7866 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869done
Matthias Kloseb9621712010-04-24 17:59:49 +00007870if test "${ac_cv_search_sem_init+set}" = set; then :
7871
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007872else
7873 ac_cv_search_sem_init=no
7874fi
7875rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007876LIBS=$ac_func_search_save_LIBS
7877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7879$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007881if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007882 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007883
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007884fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007885 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007886 # posix4 on Solaris 2.6
7887 # pthread (first!) on Linux
7888fi
7889
Martin v. Löwis19d17342003-06-14 21:03:05 +00007890# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7892$as_echo_n "checking for textdomain in -lintl... " >&6; }
7893if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
7894 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007895else
7896 ac_check_lib_save_LIBS=$LIBS
7897LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007899/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007900
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007901/* Override any GCC internal prototype to avoid an error.
7902 Use char because int might match the return type of a GCC
7903 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007904#ifdef __cplusplus
7905extern "C"
7906#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007907char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007908int
7909main ()
7910{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007911return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007912 ;
7913 return 0;
7914}
7915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007916if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007917 ac_cv_lib_intl_textdomain=yes
7918else
Matthias Kloseb9621712010-04-24 17:59:49 +00007919 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007921rm -f core conftest.err conftest.$ac_objext \
7922 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007923LIBS=$ac_check_lib_save_LIBS
7924fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7926$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
7927if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007928
Matthias Kloseb9621712010-04-24 17:59:49 +00007929$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007930
Brett Cannonc6d936e2009-06-07 20:09:53 +00007931 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007932fi
7933
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007934
7935# checks for system dependent C++ extensions support
7936case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007937 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7938$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007940/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007941
7942 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007943int
7944main ()
7945{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007946loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007947 ;
7948 return 0;
7949}
Matthias Kloseb159a552010-04-25 21:00:44 +00007950
Martin v. Löwis11437992002-04-12 09:54:03 +00007951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007952if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007953
Matthias Kloseb159a552010-04-25 21:00:44 +00007954
Matthias Kloseb9621712010-04-24 17:59:49 +00007955$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007956
Matthias Kloseb159a552010-04-25 21:00:44 +00007957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007958$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007959
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007960else
Matthias Kloseb159a552010-04-25 21:00:44 +00007961
7962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007963$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007964
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007966rm -f core conftest.err conftest.$ac_objext \
7967 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007968 *) ;;
7969esac
7970
Guido van Rossum70c7f481998-03-26 18:44:10 +00007971# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7973$as_echo_n "checking for t_open in -lnsl... " >&6; }
7974if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
7975 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007976else
Martin v. Löwis11437992002-04-12 09:54:03 +00007977 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007978LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007980/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007981
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007982/* Override any GCC internal prototype to avoid an error.
7983 Use char because int might match the return type of a GCC
7984 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007985#ifdef __cplusplus
7986extern "C"
7987#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007988char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007989int
7990main ()
7991{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007992return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007993 ;
7994 return 0;
7995}
7996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007997if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007998 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007999else
Matthias Kloseb9621712010-04-24 17:59:49 +00008000 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008002rm -f core conftest.err conftest.$ac_objext \
8003 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008004LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8007$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
8008if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008009 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008010fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008011 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8013$as_echo_n "checking for socket in -lsocket... " >&6; }
8014if test "${ac_cv_lib_socket_socket+set}" = set; then :
8015 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008016else
Martin v. Löwis11437992002-04-12 09:54:03 +00008017 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008018LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008020/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008021
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008022/* Override any GCC internal prototype to avoid an error.
8023 Use char because int might match the return type of a GCC
8024 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008025#ifdef __cplusplus
8026extern "C"
8027#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008028char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008029int
8030main ()
8031{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008032return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008033 ;
8034 return 0;
8035}
8036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008037if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008038 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008039else
Matthias Kloseb9621712010-04-24 17:59:49 +00008040 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008041fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008042rm -f core conftest.err conftest.$ac_objext \
8043 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008044LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8047$as_echo "$ac_cv_lib_socket_socket" >&6; }
8048if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008049 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008050fi
8051 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008052
Matthias Kloseb9621712010-04-24 17:59:49 +00008053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8054$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008057if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008058 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8060$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008061LIBS="$withval $LIBS"
8062
8063else
Matthias Kloseb9621712010-04-24 17:59:49 +00008064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8065$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008066fi
8067
Guido van Rossum7f43da71994-08-01 12:15:30 +00008068
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008069if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008070 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8071set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8073$as_echo_n "checking for $ac_word... " >&6; }
8074if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8075 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008076else
8077 case $PKG_CONFIG in
8078 [\\/]* | ?:[\\/]*)
8079 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8080 ;;
8081 *)
8082 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8083for as_dir in $PATH
8084do
8085 IFS=$as_save_IFS
8086 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008087 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008088 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8089 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008090 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008091 break 2
8092 fi
8093done
Matthias Kloseb9621712010-04-24 17:59:49 +00008094 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008095IFS=$as_save_IFS
8096
8097 ;;
8098esac
8099fi
8100PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8101if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8103$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008104else
Matthias Kloseb9621712010-04-24 17:59:49 +00008105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8106$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008107fi
8108
8109
8110fi
8111if test -z "$ac_cv_path_PKG_CONFIG"; then
8112 ac_pt_PKG_CONFIG=$PKG_CONFIG
8113 # Extract the first word of "pkg-config", so it can be a program name with args.
8114set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8116$as_echo_n "checking for $ac_word... " >&6; }
8117if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8118 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008119else
8120 case $ac_pt_PKG_CONFIG in
8121 [\\/]* | ?:[\\/]*)
8122 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8123 ;;
8124 *)
8125 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8126for as_dir in $PATH
8127do
8128 IFS=$as_save_IFS
8129 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008130 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008131 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8132 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008134 break 2
8135 fi
8136done
Matthias Kloseb9621712010-04-24 17:59:49 +00008137 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008138IFS=$as_save_IFS
8139
8140 ;;
8141esac
8142fi
8143ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8144if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8146$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008147else
Matthias Kloseb9621712010-04-24 17:59:49 +00008148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8149$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008150fi
8151
8152 if test "x$ac_pt_PKG_CONFIG" = x; then
8153 PKG_CONFIG=""
8154 else
8155 case $cross_compiling:$ac_tool_warned in
8156yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008157{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8158$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008159ac_tool_warned=yes ;;
8160esac
8161 PKG_CONFIG=$ac_pt_PKG_CONFIG
8162 fi
8163else
8164 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8165fi
8166
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008167
8168# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8170$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008171
8172# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008173if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008174 withval=$with_system_expat;
8175fi
8176
8177
Matthias Kloseb9621712010-04-24 17:59:49 +00008178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8179$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008180
8181# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8183$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008184
8185# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008186if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008187 withval=$with_system_ffi;
8188fi
8189
8190
8191if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008192 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8193else
8194 LIBFFI_INCLUDEDIR=""
8195fi
8196
8197
Matthias Kloseb9621712010-04-24 17:59:49 +00008198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8199$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008200
Matthias Klose55708cc2009-04-30 08:06:49 +00008201# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8203$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008204
8205# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008206if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008207 withval=$with_dbmliborder;
8208if test x$with_dbmliborder = xyes
8209then
Matthias Kloseb9621712010-04-24 17:59:49 +00008210as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008211else
8212 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8213 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8214 then
Matthias Kloseb9621712010-04-24 17:59:49 +00008215 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008216 fi
8217 done
8218fi
8219fi
8220
Matthias Kloseb9621712010-04-24 17:59:49 +00008221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8222$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008223
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008224# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008225
8226
Matthias Kloseb9621712010-04-24 17:59:49 +00008227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8228$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008229
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008230# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008231if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008232 withval=$with_signal_module;
8233fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008234
8235
8236if test -z "$with_signal_module"
8237then with_signal_module="yes"
8238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8240$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008241
8242if test "${with_signal_module}" = "yes"; then
8243 USE_SIGNAL_MODULE=""
8244 SIGNAL_OBJS=""
8245else
8246 USE_SIGNAL_MODULE="#"
8247 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8248fi
8249
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008250# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008251
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008252USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008253
Matthias Kloseb9621712010-04-24 17:59:49 +00008254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8255$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008256
Guido van Rossumec2f0731997-01-22 20:54:01 +00008257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008258# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008259if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008260 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8262$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008263LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008264if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008265 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008266fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008267else
Matthias Kloseb9621712010-04-24 17:59:49 +00008268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8269$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008270fi
8271
Martin v. Löwis11437992002-04-12 09:54:03 +00008272
8273# Templates for things AC_DEFINEd more than once.
8274# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008275
8276
Martin v. Löwis11437992002-04-12 09:54:03 +00008277
8278
Matthias Kloseb9621712010-04-24 17:59:49 +00008279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8280$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008281
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008282# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008283if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008284 withval=$with_threads;
8285fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008286
8287
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008288# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008289
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008290# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008291if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008292 withval=$with_thread; with_threads=$with_thread
8293fi
8294
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008295
8296if test -z "$with_threads"
8297then with_threads="yes"
8298fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8300$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008301
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008302
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008303if test "$with_threads" = "no"
8304then
8305 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008306elif test "$ac_cv_pthread_is_default" = yes
8307then
Matthias Kloseb9621712010-04-24 17:59:49 +00008308 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008309
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008310 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008311 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008312
8313 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008314 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008315elif test "$ac_cv_kpthread" = "yes"
8316then
8317 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008318 if test "$ac_cv_cxx_thread" = "yes"; then
8319 CXX="$CXX -Kpthread"
8320 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008321 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008322
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008323 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008324 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008325elif test "$ac_cv_kthread" = "yes"
8326then
8327 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008328 if test "$ac_cv_cxx_thread" = "yes"; then
8329 CXX="$CXX -Kthread"
8330 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008331 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008332
8333 posix_threads=yes
8334 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008335elif test "$ac_cv_pthread" = "yes"
8336then
8337 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008338 if test "$ac_cv_cxx_thread" = "yes"; then
8339 CXX="$CXX -pthread"
8340 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008341 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008342
8343 posix_threads=yes
8344 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008345else
8346 if test ! -z "$with_threads" -a -d "$with_threads"
8347 then LDFLAGS="$LDFLAGS -L$with_threads"
8348 fi
8349 if test ! -z "$withval" -a -d "$withval"
8350 then LDFLAGS="$LDFLAGS -L$withval"
8351 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008352
8353 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008354 # define _POSIX_THREADS in unistd.h. Some apparently don't
8355 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8357$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008359/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008360
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008361#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008362#ifdef _POSIX_THREADS
8363yes
8364#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008365
8366_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008367if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008368 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008369 unistd_defines_pthreads=yes
8370else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008371 unistd_defines_pthreads=no
8372fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008373rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008374
Matthias Kloseb9621712010-04-24 17:59:49 +00008375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8376$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008377
Matthias Kloseb9621712010-04-24 17:59:49 +00008378 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008379
Matthias Kloseb9621712010-04-24 17:59:49 +00008380 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8381if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8382 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008383
Matthias Kloseb9621712010-04-24 17:59:49 +00008384 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008385
Martin v. Löwis11437992002-04-12 09:54:03 +00008386
Matthias Kloseb9621712010-04-24 17:59:49 +00008387$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008388
8389 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008390 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008391else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008392
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8394if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8395 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008396
Matthias Kloseb9621712010-04-24 17:59:49 +00008397 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008398
Martin v. Löwis11437992002-04-12 09:54:03 +00008399
Matthias Kloseb9621712010-04-24 17:59:49 +00008400$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008401
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008402 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008403else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008404
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008405 # Just looking for pthread_create in libpthread is not enough:
8406 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8407 # So we really have to include pthread.h, and then link.
8408 _libs=$LIBS
8409 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8411$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008413/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008414#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008415
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008416void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008417int
8418main ()
8419{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008420
8421pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008422 ;
8423 return 0;
8424}
8425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008426if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008427
Matthias Kloseb9621712010-04-24 17:59:49 +00008428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8429$as_echo "yes" >&6; }
8430 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008431
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008432 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008433 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008434else
Martin v. Löwis11437992002-04-12 09:54:03 +00008435
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008436 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008437 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8438if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8439 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008440
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008441 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008442 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008443else
Guido van Rossumad678af1998-10-02 14:42:15 +00008444
Matthias Kloseb9621712010-04-24 17:59:49 +00008445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8446$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8447if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8448 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008449else
Martin v. Löwis11437992002-04-12 09:54:03 +00008450 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008451LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008453/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008454
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008455/* Override any GCC internal prototype to avoid an error.
8456 Use char because int might match the return type of a GCC
8457 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008458#ifdef __cplusplus
8459extern "C"
8460#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008461char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008462int
8463main ()
8464{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008465return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008466 ;
8467 return 0;
8468}
8469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008470if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008471 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008472else
Matthias Kloseb9621712010-04-24 17:59:49 +00008473 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008474fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008475rm -f core conftest.err conftest.$ac_objext \
8476 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008477LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8480$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8481if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8482 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008483
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008484 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008485 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008486 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008487else
Greg Steinadf63d62000-07-05 10:38:09 +00008488
Matthias Kloseb9621712010-04-24 17:59:49 +00008489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8490$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8491if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8492 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008493else
Martin v. Löwis11437992002-04-12 09:54:03 +00008494 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008495LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008497/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008498
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008499/* Override any GCC internal prototype to avoid an error.
8500 Use char because int might match the return type of a GCC
8501 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008502#ifdef __cplusplus
8503extern "C"
8504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008505char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008506int
8507main ()
8508{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008510 ;
8511 return 0;
8512}
8513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008514if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008515 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008516else
Matthias Kloseb9621712010-04-24 17:59:49 +00008517 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008518fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008519rm -f core conftest.err conftest.$ac_objext \
8520 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008521LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8524$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8525if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8526 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008527
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008528 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008529 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008530 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008531else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008532
Matthias Kloseb9621712010-04-24 17:59:49 +00008533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8534$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8535if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8536 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008537else
Martin v. Löwis11437992002-04-12 09:54:03 +00008538 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008539LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008541/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008543/* Override any GCC internal prototype to avoid an error.
8544 Use char because int might match the return type of a GCC
8545 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008546#ifdef __cplusplus
8547extern "C"
8548#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008549char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008550int
8551main ()
8552{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008553return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008554 ;
8555 return 0;
8556}
8557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008558if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008559 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008560else
Matthias Kloseb9621712010-04-24 17:59:49 +00008561 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008563rm -f core conftest.err conftest.$ac_objext \
8564 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008565LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8568$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8569if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8570 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008571
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008572 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008573 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008574 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008575else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008576
Matthias Kloseb9621712010-04-24 17:59:49 +00008577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8578$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8579if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8580 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008581else
Martin v. Löwis11437992002-04-12 09:54:03 +00008582 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008583LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008585/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008586
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008587/* Override any GCC internal prototype to avoid an error.
8588 Use char because int might match the return type of a GCC
8589 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008590#ifdef __cplusplus
8591extern "C"
8592#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008593char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008594int
8595main ()
8596{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008597return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008598 ;
8599 return 0;
8600}
8601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008602if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008603 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008604else
Matthias Kloseb9621712010-04-24 17:59:49 +00008605 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008606fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008607rm -f core conftest.err conftest.$ac_objext \
8608 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008609LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008610fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8612$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8613if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8614 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008615
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008616 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008617 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008618 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008619else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008620
Martin v. Löwis130fb172001-07-19 11:00:41 +00008621 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008622fi
8623
Guido van Rossum627b2d71993-12-24 10:39:16 +00008624
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008625fi
8626
Guido van Rossum0be3e491997-05-22 20:33:33 +00008627fi
8628
Guido van Rossum49545951997-12-02 19:28:29 +00008629fi
8630
Guido van Rossumb93a8621998-05-07 13:27:32 +00008631fi
8632
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008634rm -f core conftest.err conftest.$ac_objext \
8635 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008636fi
8637
Martin v. Löwis11437992002-04-12 09:54:03 +00008638
8639fi
8640
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008641
Michael W. Hudson54241132001-12-07 15:38:26 +00008642
Matthias Kloseb9621712010-04-24 17:59:49 +00008643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8644$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8645if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8646 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008647else
Martin v. Löwis11437992002-04-12 09:54:03 +00008648 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008649LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008653/* Override any GCC internal prototype to avoid an error.
8654 Use char because int might match the return type of a GCC
8655 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008656#ifdef __cplusplus
8657extern "C"
8658#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008659char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008660int
8661main ()
8662{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008663return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008664 ;
8665 return 0;
8666}
8667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008668if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008669 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008670else
Matthias Kloseb9621712010-04-24 17:59:49 +00008671 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008673rm -f core conftest.err conftest.$ac_objext \
8674 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008675LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8678$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8679if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8680 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008681
Martin v. Löwis130fb172001-07-19 11:00:41 +00008682 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008683 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008684 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008685fi
8686
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008687
Neal Norwitza978ab02002-11-02 16:58:05 +00008688 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8690$as_echo_n "checking for thr_create in -lthread... " >&6; }
8691if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8692 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008693else
Martin v. Löwis11437992002-04-12 09:54:03 +00008694 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008695LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008698
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008699/* Override any GCC internal prototype to avoid an error.
8700 Use char because int might match the return type of a GCC
8701 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008702#ifdef __cplusplus
8703extern "C"
8704#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008705char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008706int
8707main ()
8708{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008709return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008710 ;
8711 return 0;
8712}
8713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008714if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008715 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008716else
Matthias Kloseb9621712010-04-24 17:59:49 +00008717 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008719rm -f core conftest.err conftest.$ac_objext \
8720 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008721LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8724$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8725if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8726 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008727
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008728 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008729 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008730 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008731fi
8732
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008733 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008734
Martin v. Löwis130fb172001-07-19 11:00:41 +00008735 if test "$USE_THREAD_MODULE" != "#"
8736 then
8737 # If the above checks didn't disable threads, (at least) OSF1
8738 # needs this '-threads' argument during linking.
8739 case $ac_sys_system in
8740 OSF1) LDLAST=-threads;;
8741 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008742 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008743fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008744
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008745if test "$posix_threads" = "yes"; then
8746 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008747
Matthias Kloseb9621712010-04-24 17:59:49 +00008748$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008749
8750 fi
8751
8752 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8753 case $ac_sys_system/$ac_sys_release in
8754 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008755$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008756
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008757 ;;
8758 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008759$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008760
8761 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008762 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008763$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008764
8765 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008766 esac
8767
Matthias Kloseb9621712010-04-24 17:59:49 +00008768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8769$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8770 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8771 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008772else
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008774 ac_cv_pthread_system_supported=no
8775else
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008777/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008778#include <pthread.h>
8779 void *foo(void *parm) {
8780 return NULL;
8781 }
8782 main() {
8783 pthread_attr_t attr;
8784 pthread_t id;
8785 if (pthread_attr_init(&attr)) exit(-1);
8786 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8787 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8788 exit(0);
8789 }
8790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008791if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008792 ac_cv_pthread_system_supported=yes
8793else
Matthias Kloseb9621712010-04-24 17:59:49 +00008794 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8797 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008798fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008799
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008800
Guido van Rossum627b2d71993-12-24 10:39:16 +00008801fi
8802
Matthias Kloseb9621712010-04-24 17:59:49 +00008803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8804$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008805 if test "$ac_cv_pthread_system_supported" = "yes"; then
8806
Matthias Kloseb9621712010-04-24 17:59:49 +00008807$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008808
8809 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008810 for ac_func in pthread_sigmask
8811do :
8812 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8813if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008814 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008815#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008816_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008817 case $ac_sys_system in
8818 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008819
Matthias Kloseb9621712010-04-24 17:59:49 +00008820$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008821
8822 ;;
8823 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008824fi
8825done
8826
8827fi
8828
8829
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008830# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008831
Matthias Kloseb9621712010-04-24 17:59:49 +00008832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8833$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008834# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008835if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008836 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008837 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8839$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008840 ipv6=no
8841 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008842 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8843$as_echo "yes" >&6; }
8844 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008845
8846 ipv6=yes
8847 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008848 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008849else
Martin v. Löwis11437992002-04-12 09:54:03 +00008850
Matthias Kloseb9621712010-04-24 17:59:49 +00008851 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008852
Matthias Kloseb9621712010-04-24 17:59:49 +00008853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8854$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008855 ipv6=no
8856
8857else
Matthias Kloseb9621712010-04-24 17:59:49 +00008858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008859/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008860 /* AF_INET6 available check */
8861#include <sys/types.h>
8862#include <sys/socket.h>
8863main()
8864{
8865 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8866 exit(1);
8867 else
8868 exit(0);
8869}
8870
Martin v. Löwis11437992002-04-12 09:54:03 +00008871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008872if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008873
Matthias Kloseb9621712010-04-24 17:59:49 +00008874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8875$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008876 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008877
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008878else
Matthias Kloseb159a552010-04-25 21:00:44 +00008879
Matthias Kloseb9621712010-04-24 17:59:49 +00008880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8881$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008882 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008883
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8886 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008887fi
8888
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008889
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008890if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8892$as_echo_n "checking if RFC2553 API is available... " >&6; }
8893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008894/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008895
8896 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008897#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008898int
8899main ()
8900{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008901struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008902 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 ;
8904 return 0;
8905}
Matthias Kloseb159a552010-04-25 21:00:44 +00008906
Martin v. Löwis11437992002-04-12 09:54:03 +00008907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008908if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008909
8910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008911$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008912 ipv6=yes
8913
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008914else
Matthias Kloseb159a552010-04-25 21:00:44 +00008915
8916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008917$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008918 ipv6=no
8919
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008922fi
8923
8924if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008925 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008926
8927fi
8928
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008929fi
8930
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008931
8932ipv6type=unknown
8933ipv6lib=none
8934ipv6trylibc=no
8935
8936if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8938$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008939 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8940 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008941 case $i in
8942 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008944/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008945
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008946#include <netinet/in.h>
8947#ifdef IPV6_INRIA_VERSION
8948yes
8949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008950_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008951if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008952 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008953 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008954fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008955rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008956
8957 ;;
8958 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008960/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008961
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008962#include <netinet/in.h>
8963#ifdef __KAME__
8964yes
8965#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008966_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008967if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008968 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008969 ipv6type=$i;
8970 ipv6lib=inet6
8971 ipv6libdir=/usr/local/v6/lib
8972 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008973fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008974rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008975
8976 ;;
8977 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008979/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008980
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008981#include <features.h>
8982#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8983yes
8984#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008985_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008986if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008987 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008988 ipv6type=$i;
8989 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008990fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008991rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008992
8993 ;;
8994 linux-inet6)
8995 if test -d /usr/inet6; then
8996 ipv6type=$i
8997 ipv6lib=inet6
8998 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008999 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009000 fi
9001 ;;
9002 solaris)
9003 if test -f /etc/netconfig; then
9004 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
9005 ipv6type=$i
9006 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009007 fi
9008 fi
9009 ;;
9010 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009012/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009013
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009014#include <sys/param.h>
9015#ifdef _TOSHIBA_INET6
9016yes
9017#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009018_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009019if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009020 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009021 ipv6type=$i;
9022 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009023 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009024fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009025rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009026
9027 ;;
9028 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009030/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009031
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009032#include </usr/local/v6/include/sys/v6config.h>
9033#ifdef __V6D__
9034yes
9035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009036_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009038 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009039 ipv6type=$i;
9040 ipv6lib=v6;
9041 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009042 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009043fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009044rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009045
9046 ;;
9047 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009049/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009050
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009051#include <sys/param.h>
9052#ifdef _ZETA_MINAMI_INET6
9053yes
9054#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009055_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009056if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009057 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009058 ipv6type=$i;
9059 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009060 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009061fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009062rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009063
9064 ;;
9065 esac
9066 if test "$ipv6type" != "unknown"; then
9067 break
9068 fi
9069 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9071$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009072fi
9073
9074if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9075 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9076 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9077 echo "using lib$ipv6lib"
9078 else
9079 if test $ipv6trylibc = "yes"; then
9080 echo "using libc"
9081 else
9082 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9083 echo "You need to fetch lib$ipv6lib.a from appropriate"
9084 echo 'ipv6 kit and compile beforehand.'
9085 exit 1
9086 fi
9087 fi
9088fi
9089
Matthias Kloseb9621712010-04-24 17:59:49 +00009090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9091$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009093/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009094
9095 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009096int
9097main ()
9098{
9099FSIORefNum fRef = 0
9100 ;
9101 return 0;
9102}
Matthias Kloseb159a552010-04-25 21:00:44 +00009103
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009104_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009105if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009106
Matthias Kloseb159a552010-04-25 21:00:44 +00009107
Matthias Kloseb9621712010-04-24 17:59:49 +00009108$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009109
Matthias Kloseb9621712010-04-24 17:59:49 +00009110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9111$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009112
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009113else
Matthias Kloseb159a552010-04-25 21:00:44 +00009114
Matthias Kloseb9621712010-04-24 17:59:49 +00009115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9116$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009117
9118fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9120
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009121# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9123$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009125# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009126if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009127 withval=$with_doc_strings;
9128fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009129
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009130
9131if test -z "$with_doc_strings"
9132then with_doc_strings="yes"
9133fi
9134if test "$with_doc_strings" != "no"
9135then
9136
Matthias Kloseb9621712010-04-24 17:59:49 +00009137$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009138
9139fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9141$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009142
Neil Schemenauera35c6882001-02-27 04:45:05 +00009143# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9145$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009146
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009147# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009148if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009149 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009150if test "$withval" != no
9151then
9152
Matthias Kloseb9621712010-04-24 17:59:49 +00009153$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009154
Matthias Kloseb9621712010-04-24 17:59:49 +00009155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9156$as_echo "yes" >&6; }
9157else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9158$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009159fi
9160else
Matthias Kloseb9621712010-04-24 17:59:49 +00009161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9162$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009163fi
9164
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009165
9166# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9168$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009169
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009170# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009171if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009172 withval=$with_pymalloc;
9173fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009174
Neil Schemenauera35c6882001-02-27 04:45:05 +00009175
Neil Schemenauer16c22972002-03-22 15:34:49 +00009176if test -z "$with_pymalloc"
9177then with_pymalloc="yes"
9178fi
9179if test "$with_pymalloc" != "no"
9180then
Martin v. Löwis11437992002-04-12 09:54:03 +00009181
Matthias Kloseb9621712010-04-24 17:59:49 +00009182$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009183
9184fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9186$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009187
Benjamin Peterson05159c42009-12-03 03:01:27 +00009188# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9190$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009191
9192# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009193if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009194 withval=$with_valgrind;
9195else
9196 with_valgrind=no
9197fi
9198
Matthias Kloseb9621712010-04-24 17:59:49 +00009199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9200$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009201if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009202 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9203if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009204
Matthias Kloseb9621712010-04-24 17:59:49 +00009205$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009206
9207else
Matthias Kloseb9621712010-04-24 17:59:49 +00009208 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009209
9210fi
9211
9212
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009213 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009214fi
9215
Barry Warsawef82cd72000-06-30 16:21:01 +00009216# Check for --with-wctype-functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9218$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009219
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009220# Check whether --with-wctype-functions was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009221if test "${with_wctype_functions+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009222 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009223if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009224then
9225
Matthias Kloseb9621712010-04-24 17:59:49 +00009226$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009227
Matthias Kloseb9621712010-04-24 17:59:49 +00009228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9229$as_echo "yes" >&6; }
9230else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9231$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009232fi
9233else
Matthias Kloseb9621712010-04-24 17:59:49 +00009234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9235$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009236fi
9237
Barry Warsawef82cd72000-06-30 16:21:01 +00009238
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009239# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009240
Guido van Rossum98935bf2001-09-05 19:13:16 +00009241DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009242
Guido van Rossume97ee181999-12-20 21:27:22 +00009243# the dlopen() function means we might want to use dynload_shlib.o. some
9244# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009245for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009246do :
9247 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9248if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009249 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009250#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009251_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009252
Guido van Rossume97ee181999-12-20 21:27:22 +00009253fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009254done
Guido van Rossume97ee181999-12-20 21:27:22 +00009255
Michael W. Hudson54241132001-12-07 15:38:26 +00009256
Guido van Rossume97ee181999-12-20 21:27:22 +00009257# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9258# loading of modules.
9259
Matthias Kloseb9621712010-04-24 17:59:49 +00009260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9261$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009262if test -z "$DYNLOADFILE"
9263then
9264 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009265 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9266 if test "$ac_cv_func_dlopen" = yes
9267 then DYNLOADFILE="dynload_shlib.o"
9268 else DYNLOADFILE="dynload_aix.o"
9269 fi
9270 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009271 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009272 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9273 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009274 *)
9275 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9276 # out any dynamic loading
9277 if test "$ac_cv_func_dlopen" = yes
9278 then DYNLOADFILE="dynload_shlib.o"
9279 else DYNLOADFILE="dynload_stub.o"
9280 fi
9281 ;;
9282 esac
9283fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9285$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009286if test "$DYNLOADFILE" != "dynload_stub.o"
9287then
Martin v. Löwis11437992002-04-12 09:54:03 +00009288
Matthias Kloseb9621712010-04-24 17:59:49 +00009289$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009290
9291fi
9292
Neil Schemenauer4e425612001-06-19 15:44:15 +00009293# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9294
Michael W. Hudson54241132001-12-07 15:38:26 +00009295
Matthias Kloseb9621712010-04-24 17:59:49 +00009296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9297$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009298if test -z "$MACHDEP_OBJS"
9299then
Jack Jansene578a632001-08-15 01:27:14 +00009300 MACHDEP_OBJS=$extra_machdep_objs
9301else
9302 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009303fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9305$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009306
Guido van Rossum627b2d71993-12-24 10:39:16 +00009307# checks for library functions
Martin v. Löwis823725e2008-03-24 13:39:54 +00009308for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9309 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009310 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009311 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009312 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009313 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009314 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009315 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9316 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009317 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
9318 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009319 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009320 truncate uname unsetenv utimes waitpid wait3 wait4 \
9321 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009322do :
9323 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9324ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9325eval as_val=\$$as_ac_var
9326 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009327 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009328#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009329_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009330
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009331fi
9332done
9333
Michael W. Hudson54241132001-12-07 15:38:26 +00009334
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009335# For some functions, having a definition is not sufficient, since
9336# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9338$as_echo_n "checking for chroot... " >&6; }
9339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009340/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009341#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009342int
9343main ()
9344{
9345void *x=chroot
9346 ;
9347 return 0;
9348}
9349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009350if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009351
Matthias Kloseb9621712010-04-24 17:59:49 +00009352$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009353
Matthias Kloseb159a552010-04-25 21:00:44 +00009354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009355$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009356else
Matthias Kloseb9621712010-04-24 17:59:49 +00009357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9358$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009359
9360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9363$as_echo_n "checking for link... " >&6; }
9364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009365/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009366#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009367int
9368main ()
9369{
9370void *x=link
9371 ;
9372 return 0;
9373}
9374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009375if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009376
Matthias Kloseb9621712010-04-24 17:59:49 +00009377$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009378
Matthias Kloseb159a552010-04-25 21:00:44 +00009379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009380$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009381else
Matthias Kloseb9621712010-04-24 17:59:49 +00009382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9383$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009384
9385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9388$as_echo_n "checking for symlink... " >&6; }
9389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009390/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009391#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009392int
9393main ()
9394{
9395void *x=symlink
9396 ;
9397 return 0;
9398}
9399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009400if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009401
Matthias Kloseb9621712010-04-24 17:59:49 +00009402$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009403
Matthias Kloseb159a552010-04-25 21:00:44 +00009404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009405$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009406else
Matthias Kloseb9621712010-04-24 17:59:49 +00009407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9408$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009409
9410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9413$as_echo_n "checking for fchdir... " >&6; }
9414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009415/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009416#include <unistd.h>
9417int
9418main ()
9419{
9420void *x=fchdir
9421 ;
9422 return 0;
9423}
9424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009425if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009426
Matthias Kloseb9621712010-04-24 17:59:49 +00009427$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009428
Matthias Kloseb159a552010-04-25 21:00:44 +00009429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009430$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009431else
Matthias Kloseb9621712010-04-24 17:59:49 +00009432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9433$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009434
9435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9438$as_echo_n "checking for fsync... " >&6; }
9439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009440/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009441#include <unistd.h>
9442int
9443main ()
9444{
9445void *x=fsync
9446 ;
9447 return 0;
9448}
9449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009450if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009451
Matthias Kloseb9621712010-04-24 17:59:49 +00009452$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009453
Matthias Kloseb159a552010-04-25 21:00:44 +00009454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009455$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009456else
Matthias Kloseb9621712010-04-24 17:59:49 +00009457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9458$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009459
9460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9463$as_echo_n "checking for fdatasync... " >&6; }
9464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009465/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009466#include <unistd.h>
9467int
9468main ()
9469{
9470void *x=fdatasync
9471 ;
9472 return 0;
9473}
9474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009475if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009476
Matthias Kloseb9621712010-04-24 17:59:49 +00009477$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009478
Matthias Kloseb159a552010-04-25 21:00:44 +00009479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009480$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009481else
Matthias Kloseb9621712010-04-24 17:59:49 +00009482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9483$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009484
9485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9488$as_echo_n "checking for epoll... " >&6; }
9489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009490/* end confdefs.h. */
9491#include <sys/epoll.h>
9492int
9493main ()
9494{
9495void *x=epoll_create
9496 ;
9497 return 0;
9498}
9499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009500if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009501
Matthias Kloseb9621712010-04-24 17:59:49 +00009502$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009503
Matthias Kloseb159a552010-04-25 21:00:44 +00009504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009505$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009506else
Matthias Kloseb9621712010-04-24 17:59:49 +00009507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9508$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009509
9510fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9513$as_echo_n "checking for kqueue... " >&6; }
9514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009515/* end confdefs.h. */
9516
9517#include <sys/types.h>
9518#include <sys/event.h>
9519
9520int
9521main ()
9522{
9523int x=kqueue()
9524 ;
9525 return 0;
9526}
9527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009528if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009529
Matthias Kloseb9621712010-04-24 17:59:49 +00009530$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009531
Matthias Kloseb159a552010-04-25 21:00:44 +00009532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009533$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009534else
Matthias Kloseb9621712010-04-24 17:59:49 +00009535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9536$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009537
9538fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009540# On some systems (eg. FreeBSD 5), we would find a definition of the
9541# functions ctermid_r, setgroups in the library, but no prototype
9542# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9543# address to avoid compiler warnings and potential miscompilations
9544# because of the missing prototypes.
9545
Matthias Kloseb9621712010-04-24 17:59:49 +00009546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9547$as_echo_n "checking for ctermid_r... " >&6; }
9548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009549/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009550
9551#include "confdefs.h"
9552#include <stdio.h>
9553
Martin v. Löwisd5843682002-11-21 20:41:28 +00009554int
9555main ()
9556{
9557void* p = ctermid_r
9558 ;
9559 return 0;
9560}
9561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009562if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009563
Matthias Kloseb9621712010-04-24 17:59:49 +00009564$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009565
Matthias Kloseb159a552010-04-25 21:00:44 +00009566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009567$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009568else
Matthias Kloseb9621712010-04-24 17:59:49 +00009569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9570$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009571
9572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9574
Matthias Kloseb9621712010-04-24 17:59:49 +00009575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
9576$as_echo_n "checking for flock... " >&6; }
9577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009578/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009579
9580#include "confdefs.h"
9581#include <sys/file.h>
9582
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009583int
9584main ()
9585{
9586void* p = flock
9587 ;
9588 return 0;
9589}
9590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009591if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009592
Matthias Kloseb9621712010-04-24 17:59:49 +00009593$as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009594
Matthias Kloseb159a552010-04-25 21:00:44 +00009595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009596$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009597else
Matthias Kloseb9621712010-04-24 17:59:49 +00009598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9599$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009600
9601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9603
Matthias Kloseb9621712010-04-24 17:59:49 +00009604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9605$as_echo_n "checking for getpagesize... " >&6; }
9606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009607/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009608
9609#include "confdefs.h"
9610#include <unistd.h>
9611
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009612int
9613main ()
9614{
9615void* p = getpagesize
9616 ;
9617 return 0;
9618}
9619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009620if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009621
Matthias Kloseb9621712010-04-24 17:59:49 +00009622$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009623
Matthias Kloseb159a552010-04-25 21:00:44 +00009624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009625$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009626else
Matthias Kloseb9621712010-04-24 17:59:49 +00009627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9628$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009629
9630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009632
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009633for ac_prog in true
9634do
9635 # Extract the first word of "$ac_prog", so it can be a program name with args.
9636set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9638$as_echo_n "checking for $ac_word... " >&6; }
9639if test "${ac_cv_prog_TRUE+set}" = set; then :
9640 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009641else
9642 if test -n "$TRUE"; then
9643 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9644else
9645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9646for as_dir in $PATH
9647do
9648 IFS=$as_save_IFS
9649 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009650 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009651 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 +00009652 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009653 $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 +00009654 break 2
9655 fi
9656done
Matthias Kloseb9621712010-04-24 17:59:49 +00009657 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009658IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009659
9660fi
9661fi
9662TRUE=$ac_cv_prog_TRUE
9663if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9665$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009666else
Matthias Kloseb9621712010-04-24 17:59:49 +00009667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9668$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009669fi
9670
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009671
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009672 test -n "$TRUE" && break
9673done
9674test -n "$TRUE" || TRUE="/bin/true"
9675
9676
Matthias Kloseb9621712010-04-24 17:59:49 +00009677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9678$as_echo_n "checking for inet_aton in -lc... " >&6; }
9679if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
9680 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009681else
9682 ac_check_lib_save_LIBS=$LIBS
9683LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009685/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009687/* Override any GCC internal prototype to avoid an error.
9688 Use char because int might match the return type of a GCC
9689 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009690#ifdef __cplusplus
9691extern "C"
9692#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009693char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009694int
9695main ()
9696{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009697return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009698 ;
9699 return 0;
9700}
9701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009702if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009703 ac_cv_lib_c_inet_aton=yes
9704else
Matthias Kloseb9621712010-04-24 17:59:49 +00009705 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009707rm -f core conftest.err conftest.$ac_objext \
9708 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009709LIBS=$ac_check_lib_save_LIBS
9710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9712$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
9713if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009714 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009715else
Matthias Kloseb9621712010-04-24 17:59:49 +00009716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9717$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
9718if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
9719 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009720else
9721 ac_check_lib_save_LIBS=$LIBS
9722LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009724/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009725
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726/* Override any GCC internal prototype to avoid an error.
9727 Use char because int might match the return type of a GCC
9728 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009729#ifdef __cplusplus
9730extern "C"
9731#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009732char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009733int
9734main ()
9735{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009736return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009737 ;
9738 return 0;
9739}
9740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009741if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009742 ac_cv_lib_resolv_inet_aton=yes
9743else
Matthias Kloseb9621712010-04-24 17:59:49 +00009744 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009746rm -f core conftest.err conftest.$ac_objext \
9747 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009748LIBS=$ac_check_lib_save_LIBS
9749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9751$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
9752if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009753 cat >>confdefs.h <<_ACEOF
9754#define HAVE_LIBRESOLV 1
9755_ACEOF
9756
9757 LIBS="-lresolv $LIBS"
9758
9759fi
9760
9761
9762fi
9763
9764
Christian Heimesd0764e22007-12-04 15:00:33 +00009765# On Tru64, chflags seems to be present, but calling it will
9766# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9768$as_echo_n "checking for chflags... " >&6; }
9769if test "${ac_cv_have_chflags+set}" = set; then :
9770 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009771else
Matthias Kloseb9621712010-04-24 17:59:49 +00009772 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009773 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009774else
Matthias Kloseb9621712010-04-24 17:59:49 +00009775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009776/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009777[
Christian Heimesd0764e22007-12-04 15:00:33 +00009778#include <sys/stat.h>
9779#include <unistd.h>
9780int main(int argc, char*argv[])
9781{
9782 if(chflags(argv[0], 0) != 0)
9783 return 1;
9784 return 0;
9785}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009786]
Christian Heimesd0764e22007-12-04 15:00:33 +00009787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009788if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009789 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009790else
Matthias Kloseb9621712010-04-24 17:59:49 +00009791 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009793rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9794 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009795fi
9796
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009797
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9800$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009801if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009802 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
9803if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009804 ac_cv_have_chflags="yes"
9805else
9806 ac_cv_have_chflags="no"
9807fi
9808
9809fi
9810if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009811
Matthias Kloseb9621712010-04-24 17:59:49 +00009812$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009813
9814fi
9815
Matthias Kloseb9621712010-04-24 17:59:49 +00009816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9817$as_echo_n "checking for lchflags... " >&6; }
9818if test "${ac_cv_have_lchflags+set}" = set; then :
9819 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009820else
Matthias Kloseb9621712010-04-24 17:59:49 +00009821 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009822 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009823else
Matthias Kloseb9621712010-04-24 17:59:49 +00009824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009825/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009826[
Christian Heimesd0764e22007-12-04 15:00:33 +00009827#include <sys/stat.h>
9828#include <unistd.h>
9829int main(int argc, char*argv[])
9830{
9831 if(lchflags(argv[0], 0) != 0)
9832 return 1;
9833 return 0;
9834}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009835]
Christian Heimesd0764e22007-12-04 15:00:33 +00009836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009837if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009838 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009839else
Matthias Kloseb9621712010-04-24 17:59:49 +00009840 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9843 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009844fi
9845
9846
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9849$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009850if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009851 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
9852if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009853 ac_cv_have_lchflags="yes"
9854else
9855 ac_cv_have_lchflags="no"
9856fi
9857
9858fi
9859if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009860
Matthias Kloseb9621712010-04-24 17:59:49 +00009861$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009862
9863fi
9864
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009865case $ac_sys_system/$ac_sys_release in
9866Darwin/*)
9867 _CUR_CFLAGS="${CFLAGS}"
9868 _CUR_LDFLAGS="${LDFLAGS}"
9869 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9870 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9871 ;;
9872esac
9873
Matthias Kloseb9621712010-04-24 17:59:49 +00009874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9875$as_echo_n "checking for inflateCopy in -lz... " >&6; }
9876if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
9877 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009878else
9879 ac_check_lib_save_LIBS=$LIBS
9880LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009882/* end confdefs.h. */
9883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009884/* Override any GCC internal prototype to avoid an error.
9885 Use char because int might match the return type of a GCC
9886 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009887#ifdef __cplusplus
9888extern "C"
9889#endif
9890char inflateCopy ();
9891int
9892main ()
9893{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009894return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009895 ;
9896 return 0;
9897}
9898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009899if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009900 ac_cv_lib_z_inflateCopy=yes
9901else
Matthias Kloseb9621712010-04-24 17:59:49 +00009902 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009904rm -f core conftest.err conftest.$ac_objext \
9905 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009906LIBS=$ac_check_lib_save_LIBS
9907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9909$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
9910if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009911
Matthias Kloseb9621712010-04-24 17:59:49 +00009912$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009913
9914fi
9915
9916
9917case $ac_sys_system/$ac_sys_release in
9918Darwin/*)
9919 CFLAGS="${_CUR_CFLAGS}"
9920 LDFLAGS="${_CUR_LDFLAGS}"
9921 ;;
9922esac
9923
Matthias Kloseb9621712010-04-24 17:59:49 +00009924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9925$as_echo_n "checking for hstrerror... " >&6; }
9926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009927/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009928
9929#include "confdefs.h"
9930#include <netdb.h>
9931
Martin v. Löwise9416172003-05-03 10:12:45 +00009932int
9933main ()
9934{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009935void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009936 ;
9937 return 0;
9938}
9939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009940if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009941
Matthias Kloseb9621712010-04-24 17:59:49 +00009942$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009943
Matthias Kloseb159a552010-04-25 21:00:44 +00009944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009945$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009946else
Matthias Kloseb9621712010-04-24 17:59:49 +00009947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9948$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009949
9950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009951rm -f core conftest.err conftest.$ac_objext \
9952 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009953
Matthias Kloseb9621712010-04-24 17:59:49 +00009954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9955$as_echo_n "checking for inet_aton... " >&6; }
9956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009957/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009958
9959#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +00009960#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009961#include <sys/socket.h>
9962#include <netinet/in.h>
9963#include <arpa/inet.h>
9964
Martin v. Löwise9416172003-05-03 10:12:45 +00009965int
9966main ()
9967{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009968void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009969 ;
9970 return 0;
9971}
9972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009973if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009974
Matthias Kloseb9621712010-04-24 17:59:49 +00009975$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009976
Matthias Kloseb159a552010-04-25 21:00:44 +00009977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009978$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009979else
Matthias Kloseb9621712010-04-24 17:59:49 +00009980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9981$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009982
9983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009984rm -f core conftest.err conftest.$ac_objext \
9985 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009986
Matthias Kloseb9621712010-04-24 17:59:49 +00009987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
9988$as_echo_n "checking for inet_pton... " >&6; }
9989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009990/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009991
9992#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009993#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009994#include <sys/socket.h>
9995#include <netinet/in.h>
9996#include <arpa/inet.h>
9997
Martin v. Löwise9416172003-05-03 10:12:45 +00009998int
9999main ()
10000{
10001void* p = inet_pton
10002 ;
10003 return 0;
10004}
10005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010006if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010007
Matthias Kloseb9621712010-04-24 17:59:49 +000010008$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010009
Matthias Kloseb159a552010-04-25 21:00:44 +000010010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010011$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010012else
Matthias Kloseb9621712010-04-24 17:59:49 +000010013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10014$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010015
10016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010018
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010019# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10021$as_echo_n "checking for setgroups... " >&6; }
10022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010023/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010024
10025#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010026#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010027#ifdef HAVE_GRP_H
10028#include <grp.h>
10029#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010030
Martin v. Löwisd5843682002-11-21 20:41:28 +000010031int
10032main ()
10033{
10034void* p = setgroups
10035 ;
10036 return 0;
10037}
10038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010039if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010040
Matthias Kloseb9621712010-04-24 17:59:49 +000010041$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010042
Matthias Kloseb159a552010-04-25 21:00:44 +000010043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010044$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010045else
Matthias Kloseb9621712010-04-24 17:59:49 +000010046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10047$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010048
10049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010051
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010052# check for openpty and forkpty
10053
10054for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010055do :
10056 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
10057if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010058 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010059#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010060_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010061
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010062else
Matthias Kloseb9621712010-04-24 17:59:49 +000010063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10064$as_echo_n "checking for openpty in -lutil... " >&6; }
10065if test "${ac_cv_lib_util_openpty+set}" = set; then :
10066 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010067else
Martin v. Löwis11437992002-04-12 09:54:03 +000010068 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010069LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010073/* Override any GCC internal prototype to avoid an error.
10074 Use char because int might match the return type of a GCC
10075 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010076#ifdef __cplusplus
10077extern "C"
10078#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010079char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010080int
10081main ()
10082{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010083return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010084 ;
10085 return 0;
10086}
10087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010088if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010089 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010090else
Matthias Kloseb9621712010-04-24 17:59:49 +000010091 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010093rm -f core conftest.err conftest.$ac_objext \
10094 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010095LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010096fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10098$as_echo "$ac_cv_lib_util_openpty" >&6; }
10099if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10100 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010101 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010102else
Matthias Kloseb9621712010-04-24 17:59:49 +000010103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10104$as_echo_n "checking for openpty in -lbsd... " >&6; }
10105if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
10106 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010107else
10108 ac_check_lib_save_LIBS=$LIBS
10109LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010111/* end confdefs.h. */
10112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010113/* Override any GCC internal prototype to avoid an error.
10114 Use char because int might match the return type of a GCC
10115 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010116#ifdef __cplusplus
10117extern "C"
10118#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010119char openpty ();
10120int
10121main ()
10122{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010123return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010124 ;
10125 return 0;
10126}
10127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010128if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010129 ac_cv_lib_bsd_openpty=yes
10130else
Matthias Kloseb9621712010-04-24 17:59:49 +000010131 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010132fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010133rm -f core conftest.err conftest.$ac_objext \
10134 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010135LIBS=$ac_check_lib_save_LIBS
10136fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10138$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10139if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10140 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010141 LIBS="$LIBS -lbsd"
10142fi
10143
10144
10145fi
10146
Fred Drake8cef4cf2000-06-28 16:40:38 +000010147
10148fi
10149done
10150
10151for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010152do :
10153 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10154if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010155 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010156#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010157_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010158
Fred Drake8cef4cf2000-06-28 16:40:38 +000010159else
Matthias Kloseb9621712010-04-24 17:59:49 +000010160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10161$as_echo_n "checking for forkpty in -lutil... " >&6; }
10162if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10163 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010164else
Martin v. Löwis11437992002-04-12 09:54:03 +000010165 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010166LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010168/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010170/* Override any GCC internal prototype to avoid an error.
10171 Use char because int might match the return type of a GCC
10172 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010173#ifdef __cplusplus
10174extern "C"
10175#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010176char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010177int
10178main ()
10179{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010180return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010181 ;
10182 return 0;
10183}
10184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010185if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010187else
Matthias Kloseb9621712010-04-24 17:59:49 +000010188 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010190rm -f core conftest.err conftest.$ac_objext \
10191 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010192LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10195$as_echo "$ac_cv_lib_util_forkpty" >&6; }
10196if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10197 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010198 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010199else
Matthias Kloseb9621712010-04-24 17:59:49 +000010200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10201$as_echo_n "checking for forkpty in -lbsd... " >&6; }
10202if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10203 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010204else
10205 ac_check_lib_save_LIBS=$LIBS
10206LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010208/* end confdefs.h. */
10209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010210/* Override any GCC internal prototype to avoid an error.
10211 Use char because int might match the return type of a GCC
10212 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010213#ifdef __cplusplus
10214extern "C"
10215#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010216char forkpty ();
10217int
10218main ()
10219{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010220return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010221 ;
10222 return 0;
10223}
10224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010225if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010226 ac_cv_lib_bsd_forkpty=yes
10227else
Matthias Kloseb9621712010-04-24 17:59:49 +000010228 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010230rm -f core conftest.err conftest.$ac_objext \
10231 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010232LIBS=$ac_check_lib_save_LIBS
10233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10235$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10236if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10237 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010238 LIBS="$LIBS -lbsd"
10239fi
10240
10241
10242fi
10243
Fred Drake8cef4cf2000-06-28 16:40:38 +000010244
10245fi
10246done
10247
Jack Jansendd19cf82001-12-06 22:36:17 +000010248
Christian Heimesb186d002008-03-18 15:15:01 +000010249# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010250for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010251do :
10252 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10253if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010254 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010255#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010256_ACEOF
10257
10258fi
10259done
10260
10261
Michael W. Hudson54241132001-12-07 15:38:26 +000010262# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010263for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010264do :
10265 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10266ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10267eval as_val=\$$as_ac_var
10268 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010269 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010270#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010271_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010272
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010273fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010274done
10275
Michael W. Hudson54241132001-12-07 15:38:26 +000010276
Christian Heimesb186d002008-03-18 15:15:01 +000010277for ac_func in dup2 getcwd strdup
Matthias Kloseb9621712010-04-24 17:59:49 +000010278do :
10279 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10280ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10281eval as_val=\$$as_ac_var
10282 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010283 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010284#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010285_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010286
Martin v. Löwis1142de32002-03-29 16:28:31 +000010287else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010288 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010289 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010290 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
10291 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010292esac
10293
Martin v. Löwis1142de32002-03-29 16:28:31 +000010294fi
10295done
10296
10297
10298for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010299do :
10300 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10301if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010302 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010303#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010306/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010307#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010308int
10309main ()
10310{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010311getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010312 ;
10313 return 0;
10314}
10315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010316if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010317
Matthias Kloseb9621712010-04-24 17:59:49 +000010318$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010319
Guido van Rossum627b2d71993-12-24 10:39:16 +000010320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010322
Guido van Rossum627b2d71993-12-24 10:39:16 +000010323fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010324done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010325
Jack Jansen150753c2003-03-29 22:07:47 +000010326for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010327do :
10328 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10329if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010330 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010331#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010334/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010335#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010336int
10337main ()
10338{
10339setpgrp(0,0);
10340 ;
10341 return 0;
10342}
10343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010344if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010345
Matthias Kloseb9621712010-04-24 17:59:49 +000010346$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010347
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010350
10351fi
10352done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010353
Thomas Wouters3a584202000-08-05 23:28:51 +000010354for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010355do :
10356 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10357if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010358 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010359#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010362/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010363#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010364int
10365main ()
10366{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010367gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010368 ;
10369 return 0;
10370}
10371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010372if ac_fn_c_try_compile "$LINENO"; then :
10373
Guido van Rossum627b2d71993-12-24 10:39:16 +000010374else
Skip Montanaro6dead952003-09-25 14:50:04 +000010375
Matthias Kloseb9621712010-04-24 17:59:49 +000010376$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010377
Martin v. Löwis11437992002-04-12 09:54:03 +000010378
Guido van Rossum627b2d71993-12-24 10:39:16 +000010379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010381
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010382fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010383done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010384
Michael W. Hudson54241132001-12-07 15:38:26 +000010385
Matthias Kloseb9621712010-04-24 17:59:49 +000010386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10387$as_echo_n "checking for major... " >&6; }
10388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010389/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010390
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010391#if defined(MAJOR_IN_MKDEV)
10392#include <sys/mkdev.h>
10393#elif defined(MAJOR_IN_SYSMACROS)
10394#include <sys/sysmacros.h>
10395#else
10396#include <sys/types.h>
10397#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010398
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010399int
10400main ()
10401{
10402
10403 makedev(major(0),minor(0));
10404
10405 ;
10406 return 0;
10407}
10408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010409if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010410
10411
Matthias Kloseb9621712010-04-24 17:59:49 +000010412$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010413
Matthias Kloseb9621712010-04-24 17:59:49 +000010414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10415$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010416
10417else
Skip Montanaro6dead952003-09-25 14:50:04 +000010418
Matthias Kloseb9621712010-04-24 17:59:49 +000010419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10420$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010421
10422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010423rm -f core conftest.err conftest.$ac_objext \
10424 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010425
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010426# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010427# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10429$as_echo_n "checking for getaddrinfo... " >&6; }
10430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010431/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010432
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010433#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010434#include <sys/socket.h>
10435#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010436#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010437
Martin v. Löwis11437992002-04-12 09:54:03 +000010438int
10439main ()
10440{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010441getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010442 ;
10443 return 0;
10444}
10445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010446if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010447 have_getaddrinfo=yes
10448else
Matthias Kloseb9621712010-04-24 17:59:49 +000010449 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010450fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010451rm -f core conftest.err conftest.$ac_objext \
10452 conftest$ac_exeext conftest.$ac_ext
10453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10454$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010455if test $have_getaddrinfo = yes
10456then
Matthias Kloseb9621712010-04-24 17:59:49 +000010457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10458$as_echo_n "checking getaddrinfo bug... " >&6; }
10459 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10460 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010461else
Matthias Kloseb9621712010-04-24 17:59:49 +000010462 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010463 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010464else
Matthias Kloseb9621712010-04-24 17:59:49 +000010465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010466/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010467
10468#include <sys/types.h>
10469#include <netdb.h>
10470#include <string.h>
10471#include <sys/socket.h>
10472#include <netinet/in.h>
10473
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010474int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010475{
10476 int passive, gaierr, inet4 = 0, inet6 = 0;
10477 struct addrinfo hints, *ai, *aitop;
10478 char straddr[INET6_ADDRSTRLEN], strport[16];
10479
10480 for (passive = 0; passive <= 1; passive++) {
10481 memset(&hints, 0, sizeof(hints));
10482 hints.ai_family = AF_UNSPEC;
10483 hints.ai_flags = passive ? AI_PASSIVE : 0;
10484 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010485 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010486 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10487 (void)gai_strerror(gaierr);
10488 goto bad;
10489 }
10490 for (ai = aitop; ai; ai = ai->ai_next) {
10491 if (ai->ai_addr == NULL ||
10492 ai->ai_addrlen == 0 ||
10493 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10494 straddr, sizeof(straddr), strport, sizeof(strport),
10495 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10496 goto bad;
10497 }
10498 switch (ai->ai_family) {
10499 case AF_INET:
10500 if (strcmp(strport, "54321") != 0) {
10501 goto bad;
10502 }
10503 if (passive) {
10504 if (strcmp(straddr, "0.0.0.0") != 0) {
10505 goto bad;
10506 }
10507 } else {
10508 if (strcmp(straddr, "127.0.0.1") != 0) {
10509 goto bad;
10510 }
10511 }
10512 inet4++;
10513 break;
10514 case AF_INET6:
10515 if (strcmp(strport, "54321") != 0) {
10516 goto bad;
10517 }
10518 if (passive) {
10519 if (strcmp(straddr, "::") != 0) {
10520 goto bad;
10521 }
10522 } else {
10523 if (strcmp(straddr, "::1") != 0) {
10524 goto bad;
10525 }
10526 }
10527 inet6++;
10528 break;
10529 case AF_UNSPEC:
10530 goto bad;
10531 break;
10532 default:
10533 /* another family support? */
10534 break;
10535 }
10536 }
10537 }
10538
10539 if (!(inet4 == 0 || inet4 == 2))
10540 goto bad;
10541 if (!(inet6 == 0 || inet6 == 2))
10542 goto bad;
10543
10544 if (aitop)
10545 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010546 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010547
10548 bad:
10549 if (aitop)
10550 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010551 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010552}
10553
Martin v. Löwis11437992002-04-12 09:54:03 +000010554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010555if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010556 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010557else
Matthias Kloseb9621712010-04-24 17:59:49 +000010558 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010559fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10561 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010562fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010563
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010564fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010565
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010567
Mark Dickinson2df5d282009-12-31 21:22:50 +000010568if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010569then
10570 if test $ipv6 = yes
10571 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010572 echo 'Fatal: You must get working getaddrinfo() function.'
10573 echo ' or you can specify "--disable-ipv6"'.
10574 exit 1
10575 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010576else
Martin v. Löwis11437992002-04-12 09:54:03 +000010577
Matthias Kloseb9621712010-04-24 17:59:49 +000010578$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010579
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010580fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010581for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010582do :
10583 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10584if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010585 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010586#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010587_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010588
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010589fi
10590done
10591
Michael W. Hudson54241132001-12-07 15:38:26 +000010592
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010593# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10595$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10596if test "${ac_cv_header_time+set}" = set; then :
10597 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010598else
Matthias Kloseb9621712010-04-24 17:59:49 +000010599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010600/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010601#include <sys/types.h>
10602#include <sys/time.h>
10603#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010604
Martin v. Löwis11437992002-04-12 09:54:03 +000010605int
10606main ()
10607{
10608if ((struct tm *) 0)
10609return 0;
10610 ;
10611 return 0;
10612}
10613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010614if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010615 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010616else
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010620fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10622$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010623if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010624
Matthias Kloseb9621712010-04-24 17:59:49 +000010625$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010626
10627fi
10628
Matthias Kloseb9621712010-04-24 17:59:49 +000010629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10630$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10631if test "${ac_cv_struct_tm+set}" = set; then :
10632 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010633else
Matthias Kloseb9621712010-04-24 17:59:49 +000010634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010635/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010636#include <sys/types.h>
10637#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010638
Martin v. Löwis11437992002-04-12 09:54:03 +000010639int
10640main ()
10641{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642struct tm tm;
10643 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010644 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010645 ;
10646 return 0;
10647}
10648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010649if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010650 ac_cv_struct_tm=time.h
10651else
Matthias Kloseb9621712010-04-24 17:59:49 +000010652 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010655fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10657$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010658if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010659
Matthias Kloseb9621712010-04-24 17:59:49 +000010660$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010661
10662fi
10663
Matthias Kloseb9621712010-04-24 17:59:49 +000010664ac_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 +000010665#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010666
Matthias Kloseb9621712010-04-24 17:59:49 +000010667"
10668if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010669
10670cat >>confdefs.h <<_ACEOF
10671#define HAVE_STRUCT_TM_TM_ZONE 1
10672_ACEOF
10673
10674
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010675fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010676
Martin v. Löwis11437992002-04-12 09:54:03 +000010677if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10678
Matthias Kloseb9621712010-04-24 17:59:49 +000010679$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010680
10681else
Matthias Kloseb9621712010-04-24 17:59:49 +000010682 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10683"
10684if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10685 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010686else
Matthias Kloseb9621712010-04-24 17:59:49 +000010687 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010688fi
10689
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010690cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010691#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010692_ACEOF
10693
Matthias Kloseb9621712010-04-24 17:59:49 +000010694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10695$as_echo_n "checking for tzname... " >&6; }
10696if test "${ac_cv_var_tzname+set}" = set; then :
10697 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010698else
Matthias Kloseb9621712010-04-24 17:59:49 +000010699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010700/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010701#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010702#if !HAVE_DECL_TZNAME
10703extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010704#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010705
Martin v. Löwis11437992002-04-12 09:54:03 +000010706int
10707main ()
10708{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010709return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010710 ;
10711 return 0;
10712}
10713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010714if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010715 ac_cv_var_tzname=yes
10716else
Matthias Kloseb9621712010-04-24 17:59:49 +000010717 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010719rm -f core conftest.err conftest.$ac_objext \
10720 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10723$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010724 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010725
Matthias Kloseb9621712010-04-24 17:59:49 +000010726$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010727
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010728 fi
10729fi
10730
Matthias Kloseb9621712010-04-24 17:59:49 +000010731ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10732if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010733
10734cat >>confdefs.h <<_ACEOF
10735#define HAVE_STRUCT_STAT_ST_RDEV 1
10736_ACEOF
10737
10738
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010739fi
10740
Matthias Kloseb9621712010-04-24 17:59:49 +000010741ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10742if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010743
Martin v. Löwis11437992002-04-12 09:54:03 +000010744cat >>confdefs.h <<_ACEOF
10745#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10746_ACEOF
10747
10748
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010749fi
10750
Matthias Kloseb9621712010-04-24 17:59:49 +000010751ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10752if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010753
10754cat >>confdefs.h <<_ACEOF
10755#define HAVE_STRUCT_STAT_ST_FLAGS 1
10756_ACEOF
10757
10758
10759fi
10760
Matthias Kloseb9621712010-04-24 17:59:49 +000010761ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10762if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010763
10764cat >>confdefs.h <<_ACEOF
10765#define HAVE_STRUCT_STAT_ST_GEN 1
10766_ACEOF
10767
10768
10769fi
10770
Matthias Kloseb9621712010-04-24 17:59:49 +000010771ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10772if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010773
10774cat >>confdefs.h <<_ACEOF
10775#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10776_ACEOF
10777
10778
10779fi
10780
Matthias Kloseb9621712010-04-24 17:59:49 +000010781ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10782if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010783
Martin v. Löwis11437992002-04-12 09:54:03 +000010784cat >>confdefs.h <<_ACEOF
10785#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10786_ACEOF
10787
10788
Matthias Kloseb9621712010-04-24 17:59:49 +000010789$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010790
10791else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010792 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010793 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010794 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10795 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010796esac
10797
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010798fi
10799
Michael W. Hudson54241132001-12-07 15:38:26 +000010800
Martin v. Löwis11437992002-04-12 09:54:03 +000010801
Matthias Kloseb9621712010-04-24 17:59:49 +000010802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10803$as_echo_n "checking for time.h that defines altzone... " >&6; }
10804if test "${ac_cv_header_time_altzone+set}" = set; then :
10805 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010806else
Matthias Kloseb159a552010-04-25 21:00:44 +000010807
Matthias Kloseb9621712010-04-24 17:59:49 +000010808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010809/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010810#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010811int
10812main ()
10813{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010814return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010815 ;
10816 return 0;
10817}
10818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010819if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010820 ac_cv_header_time_altzone=yes
10821else
Matthias Kloseb9621712010-04-24 17:59:49 +000010822 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010823fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010826fi
10827
Matthias Kloseb9621712010-04-24 17:59:49 +000010828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10829$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010830if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010831
Matthias Kloseb9621712010-04-24 17:59:49 +000010832$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010833
10834fi
10835
Guido van Rossumda88dad1995-01-26 00:46:29 +000010836was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10838$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010840/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010841
10842#include <sys/types.h>
10843#include <sys/select.h>
10844#include <sys/time.h>
10845
Martin v. Löwis11437992002-04-12 09:54:03 +000010846int
10847main ()
10848{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010849;
Martin v. Löwis11437992002-04-12 09:54:03 +000010850 ;
10851 return 0;
10852}
10853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010854if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010855
10856
Matthias Kloseb9621712010-04-24 17:59:49 +000010857$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010858
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010859 was_it_defined=yes
10860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10864$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010865
Matthias Kloseb9621712010-04-24 17:59:49 +000010866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10867$as_echo_n "checking for addrinfo... " >&6; }
10868if test "${ac_cv_struct_addrinfo+set}" = set; then :
10869 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010870else
Matthias Kloseb9621712010-04-24 17:59:49 +000010871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010872/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010873#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010874int
10875main ()
10876{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010877struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010878 ;
10879 return 0;
10880}
10881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010882if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010883 ac_cv_struct_addrinfo=yes
10884else
Matthias Kloseb9621712010-04-24 17:59:49 +000010885 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10888fi
10889
Matthias Kloseb9621712010-04-24 17:59:49 +000010890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10891$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010892if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010893
Matthias Kloseb9621712010-04-24 17:59:49 +000010894$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010895
10896fi
10897
Matthias Kloseb9621712010-04-24 17:59:49 +000010898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10899$as_echo_n "checking for sockaddr_storage... " >&6; }
10900if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
10901 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010902else
Matthias Kloseb9621712010-04-24 17:59:49 +000010903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010904/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010905
10906# include <sys/types.h>
10907# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010908int
10909main ()
10910{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010911struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010912 ;
10913 return 0;
10914}
10915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010916if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010917 ac_cv_struct_sockaddr_storage=yes
10918else
Matthias Kloseb9621712010-04-24 17:59:49 +000010919 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10922fi
10923
Matthias Kloseb9621712010-04-24 17:59:49 +000010924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10925$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010926if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010927
Matthias Kloseb9621712010-04-24 17:59:49 +000010928$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010929
10930fi
10931
Guido van Rossum627b2d71993-12-24 10:39:16 +000010932# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010933
Matthias Kloseb9621712010-04-24 17:59:49 +000010934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10935$as_echo_n "checking whether char is unsigned... " >&6; }
10936if test "${ac_cv_c_char_unsigned+set}" = set; then :
10937 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010938else
Matthias Kloseb9621712010-04-24 17:59:49 +000010939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010941$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010942int
10943main ()
10944{
10945static int test_array [1 - 2 * !(((char) -1) < 0)];
10946test_array [0] = 0
10947
10948 ;
10949 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010950}
Martin v. Löwis11437992002-04-12 09:54:03 +000010951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010952if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010953 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010954else
Matthias Kloseb9621712010-04-24 17:59:49 +000010955 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010956fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010958fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10960$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010961if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010962 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010963
10964fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010965
Matthias Kloseb9621712010-04-24 17:59:49 +000010966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10967$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10968if test "${ac_cv_c_const+set}" = set; then :
10969 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010970else
Matthias Kloseb9621712010-04-24 17:59:49 +000010971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010972/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010973
Martin v. Löwis11437992002-04-12 09:54:03 +000010974int
10975main ()
10976{
10977/* FIXME: Include the comments suggested by Paul. */
10978#ifndef __cplusplus
10979 /* Ultrix mips cc rejects this. */
10980 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010981 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000010982 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010983 char const *const *pcpcc;
10984 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010985 /* NEC SVR4.0.2 mips cc rejects this. */
10986 struct point {int x, y;};
10987 static struct point const zero = {0,0};
10988 /* AIX XL C 1.02.0.0 rejects this.
10989 It does not let you subtract one const X* pointer from another in
10990 an arm of an if-expression whose if-part is not a constant
10991 expression */
10992 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010993 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010994 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010995 ++pcpcc;
10996 ppc = (char**) pcpcc;
10997 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010998 { /* SCO 3.2v4 cc rejects this. */
10999 char *t;
11000 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011001
Martin v. Löwis11437992002-04-12 09:54:03 +000011002 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011003 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011004 }
11005 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11006 int x[] = {25, 17};
11007 const int *foo = &x[0];
11008 ++foo;
11009 }
11010 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11011 typedef const int *iptr;
11012 iptr p = 0;
11013 ++p;
11014 }
11015 { /* AIX XL C 1.02.0.0 rejects this saying
11016 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11017 struct s { int j; const int *ap[3]; };
11018 struct s *b; b->j = 5;
11019 }
11020 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11021 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011022 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011023 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011024 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011025#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011026
Martin v. Löwis11437992002-04-12 09:54:03 +000011027 ;
11028 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011029}
Martin v. Löwis11437992002-04-12 09:54:03 +000011030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011031if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011032 ac_cv_c_const=yes
11033else
Matthias Kloseb9621712010-04-24 17:59:49 +000011034 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011037fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11039$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011040if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011041
Matthias Kloseb9621712010-04-24 17:59:49 +000011042$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011043
11044fi
11045
Michael W. Hudson54241132001-12-07 15:38:26 +000011046
Guido van Rossumda88dad1995-01-26 00:46:29 +000011047works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11049$as_echo_n "checking for working volatile... " >&6; }
11050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011051/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011052
Martin v. Löwis11437992002-04-12 09:54:03 +000011053int
11054main ()
11055{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011056volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011057 ;
11058 return 0;
11059}
11060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011061if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011062 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011063else
Skip Montanaro6dead952003-09-25 14:50:04 +000011064
Matthias Kloseb9621712010-04-24 17:59:49 +000011065$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011066
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011067
Guido van Rossum627b2d71993-12-24 10:39:16 +000011068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11071$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011072
Guido van Rossumda88dad1995-01-26 00:46:29 +000011073works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11075$as_echo_n "checking for working signed char... " >&6; }
11076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011077/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011078
Martin v. Löwis11437992002-04-12 09:54:03 +000011079int
11080main ()
11081{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011082signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011083 ;
11084 return 0;
11085}
11086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011087if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011088 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011089else
Skip Montanaro6dead952003-09-25 14:50:04 +000011090
Matthias Kloseb9621712010-04-24 17:59:49 +000011091$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011092
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011093
Guido van Rossum7f43da71994-08-01 12:15:30 +000011094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11097$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011098
Guido van Rossumda88dad1995-01-26 00:46:29 +000011099have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11101$as_echo_n "checking for prototypes... " >&6; }
11102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011103/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011104int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011105int
11106main ()
11107{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011108return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011109 ;
11110 return 0;
11111}
11112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011113if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011114
Matthias Kloseb9621712010-04-24 17:59:49 +000011115$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011116
Matthias Kloseb159a552010-04-25 21:00:44 +000011117 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11121$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011122
Guido van Rossumda88dad1995-01-26 00:46:29 +000011123works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11125$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011127/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011128
11129#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011130int foo(int x, ...) {
11131 va_list va;
11132 va_start(va, x);
11133 va_arg(va, int);
11134 va_arg(va, char *);
11135 va_arg(va, double);
11136 return 0;
11137}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011138
Martin v. Löwis11437992002-04-12 09:54:03 +000011139int
11140main ()
11141{
Guido van Rossum90eea071996-08-30 20:58:57 +000011142return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011143 ;
11144 return 0;
11145}
11146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011147if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011148
11149
Matthias Kloseb9621712010-04-24 17:59:49 +000011150$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011151
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011152 works=yes
11153
Guido van Rossum627b2d71993-12-24 10:39:16 +000011154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11157$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011158
Martin v. Löwisd6320502004-08-12 13:45:08 +000011159# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11161$as_echo_n "checking for socketpair... " >&6; }
11162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011163/* end confdefs.h. */
11164
11165#include <sys/types.h>
11166#include <sys/socket.h>
11167
11168int
11169main ()
11170{
11171void *x=socketpair
11172 ;
11173 return 0;
11174}
11175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011176if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011177
Matthias Kloseb9621712010-04-24 17:59:49 +000011178$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011179
Matthias Kloseb159a552010-04-25 21:00:44 +000011180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011181$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011182else
Matthias Kloseb9621712010-04-24 17:59:49 +000011183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11184$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011185
11186fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011188
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011189# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11191$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011193/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011194#include <sys/types.h>
11195#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011196int
11197main ()
11198{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011199struct sockaddr x;
11200x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011201 ;
11202 return 0;
11203}
11204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011205if ac_fn_c_try_compile "$LINENO"; then :
11206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11207$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011208
Matthias Kloseb9621712010-04-24 17:59:49 +000011209$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011210
11211else
Matthias Kloseb9621712010-04-24 17:59:49 +000011212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11213$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011214
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011217
Guido van Rossumda88dad1995-01-26 00:46:29 +000011218va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11220$as_echo_n "checking whether va_list is an array... " >&6; }
11221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011222/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011223
11224#ifdef HAVE_STDARG_PROTOTYPES
11225#include <stdarg.h>
11226#else
11227#include <varargs.h>
11228#endif
11229
Martin v. Löwis11437992002-04-12 09:54:03 +000011230int
11231main ()
11232{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011233va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011234 ;
11235 return 0;
11236}
11237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011238if ac_fn_c_try_compile "$LINENO"; then :
11239
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011240else
Skip Montanaro6dead952003-09-25 14:50:04 +000011241
Martin v. Löwis11437992002-04-12 09:54:03 +000011242
Matthias Kloseb9621712010-04-24 17:59:49 +000011243$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011244
Guido van Rossumda88dad1995-01-26 00:46:29 +000011245 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011246
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11250$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011251
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011252# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011253
11254
Matthias Kloseb9621712010-04-24 17:59:49 +000011255ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11256if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011257
Matthias Kloseb9621712010-04-24 17:59:49 +000011258 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011259
Matthias Kloseb9621712010-04-24 17:59:49 +000011260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11261$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011262 OLD_CFLAGS=$CFLAGS
11263 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011265/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011266
11267# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011268
Martin v. Löwis11437992002-04-12 09:54:03 +000011269int
11270main ()
11271{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011272
11273 char *name;
11274 struct hostent *he, *res;
11275 char buffer[2048];
11276 int buflen = 2048;
11277 int h_errnop;
11278
11279 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011280
11281 ;
11282 return 0;
11283}
11284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011285if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011286
Matthias Kloseb9621712010-04-24 17:59:49 +000011287 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011288
Martin v. Löwis11437992002-04-12 09:54:03 +000011289
Matthias Kloseb9621712010-04-24 17:59:49 +000011290$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011291
Matthias Kloseb9621712010-04-24 17:59:49 +000011292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11293$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011294
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011295else
Skip Montanaro6dead952003-09-25 14:50:04 +000011296
Matthias Kloseb9621712010-04-24 17:59:49 +000011297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11298$as_echo "no" >&6; }
11299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11300$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011302/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011303
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011304# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011305
Martin v. Löwis11437992002-04-12 09:54:03 +000011306int
11307main ()
11308{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011309
11310 char *name;
11311 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011312 char buffer[2048];
11313 int buflen = 2048;
11314 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011315
Matthias Kloseb159a552010-04-25 21:00:44 +000011316 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011317
11318 ;
11319 return 0;
11320}
11321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011322if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011323
Matthias Kloseb9621712010-04-24 17:59:49 +000011324 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011325
Martin v. Löwis11437992002-04-12 09:54:03 +000011326
Matthias Kloseb159a552010-04-25 21:00:44 +000011327$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011328
Matthias Kloseb9621712010-04-24 17:59:49 +000011329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11330$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011331
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011332else
Skip Montanaro6dead952003-09-25 14:50:04 +000011333
Matthias Kloseb9621712010-04-24 17:59:49 +000011334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11335$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11337$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11339/* end confdefs.h. */
11340
11341# include <netdb.h>
11342
11343int
11344main ()
11345{
11346
11347 char *name;
11348 struct hostent *he;
11349 struct hostent_data data;
11350
11351 (void) gethostbyname_r(name, he, &data);
11352
11353 ;
11354 return 0;
11355}
11356_ACEOF
11357if ac_fn_c_try_compile "$LINENO"; then :
11358
11359 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11360
11361
11362$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11363
11364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11365$as_echo "yes" >&6; }
11366
11367else
11368
11369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11370$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011371
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011374
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011377
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011380 CFLAGS=$OLD_CFLAGS
11381
11382else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011383
Matthias Kloseb9621712010-04-24 17:59:49 +000011384 for ac_func in gethostbyname
11385do :
11386 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11387if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011388 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011389#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011390_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011391
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011392fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011393done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011394
Michael W. Hudson54241132001-12-07 15:38:26 +000011395
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011396fi
11397
Michael W. Hudson54241132001-12-07 15:38:26 +000011398
11399
11400
11401
11402
11403
Guido van Rossum627b2d71993-12-24 10:39:16 +000011404# checks for system services
11405# (none yet)
11406
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011407# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011408ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11409if test "x$ac_cv_func___fpu_control" = x""yes; then :
11410
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011411else
Matthias Kloseb9621712010-04-24 17:59:49 +000011412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11413$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11414if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11415 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011416else
Martin v. Löwis11437992002-04-12 09:54:03 +000011417 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011418LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011420/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011421
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011422/* Override any GCC internal prototype to avoid an error.
11423 Use char because int might match the return type of a GCC
11424 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011425#ifdef __cplusplus
11426extern "C"
11427#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011428char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011429int
11430main ()
11431{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011432return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011433 ;
11434 return 0;
11435}
11436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011437if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011438 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011439else
Matthias Kloseb9621712010-04-24 17:59:49 +000011440 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011441fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011442rm -f core conftest.err conftest.$ac_objext \
11443 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011444LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011445fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11447$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11448if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011449 cat >>confdefs.h <<_ACEOF
11450#define HAVE_LIBIEEE 1
11451_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011452
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011453 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011454
Guido van Rossum627b2d71993-12-24 10:39:16 +000011455fi
11456
Michael W. Hudson54241132001-12-07 15:38:26 +000011457
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011458fi
11459
Michael W. Hudson54241132001-12-07 15:38:26 +000011460
Guido van Rossum7f253911997-05-09 02:42:48 +000011461# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11463$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011464
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011465# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011466if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011467 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011468if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011469then
11470
Matthias Kloseb9621712010-04-24 17:59:49 +000011471$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011472
Matthias Kloseb9621712010-04-24 17:59:49 +000011473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11474$as_echo "yes" >&6; }
11475else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11476$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011477fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011478else
Matthias Kloseb9621712010-04-24 17:59:49 +000011479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11480$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011481fi
11482
Guido van Rossum7f253911997-05-09 02:42:48 +000011483
Guido van Rossum7f43da71994-08-01 12:15:30 +000011484# check for --with-libm=...
11485
Guido van Rossum563e7081996-09-10 18:20:48 +000011486case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011487Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011488*) LIBM=-lm
11489esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11491$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011492
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011493# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011494if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011495 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011496if test "$withval" = no
11497then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11499$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011500elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011501then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11503$as_echo "set LIBM=\"$withval\"" >&6; }
11504else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011505fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011506else
Matthias Kloseb9621712010-04-24 17:59:49 +000011507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11508$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011509fi
11510
Guido van Rossum7f43da71994-08-01 12:15:30 +000011511
11512# check for --with-libc=...
11513
Matthias Kloseb9621712010-04-24 17:59:49 +000011514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11515$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011516
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011517# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011518if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011519 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011520if test "$withval" = no
11521then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11523$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011524elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011525then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11527$as_echo "set LIBC=\"$withval\"" >&6; }
11528else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011529fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011530else
Matthias Kloseb9621712010-04-24 17:59:49 +000011531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11532$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011533fi
11534
Guido van Rossum7f43da71994-08-01 12:15:30 +000011535
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011536# **************************************************
11537# * Check for various properties of floating point *
11538# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011539
Matthias Kloseb9621712010-04-24 17:59:49 +000011540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11541$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11542if test "${ac_cv_little_endian_double+set}" = set; then :
11543 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011544else
11545
Matthias Kloseb9621712010-04-24 17:59:49 +000011546if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011547 ac_cv_little_endian_double=no
11548else
Matthias Kloseb9621712010-04-24 17:59:49 +000011549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011550/* end confdefs.h. */
11551
11552#include <string.h>
11553int main() {
11554 double x = 9006104071832581.0;
11555 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11556 return 0;
11557 else
11558 return 1;
11559}
11560
11561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011562if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011563 ac_cv_little_endian_double=yes
11564else
Matthias Kloseb9621712010-04-24 17:59:49 +000011565 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011566fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011567rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11568 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011569fi
11570
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011571fi
11572
Matthias Kloseb9621712010-04-24 17:59:49 +000011573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11574$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011575if test "$ac_cv_little_endian_double" = yes
11576then
11577
Matthias Kloseb9621712010-04-24 17:59:49 +000011578$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011579
11580fi
11581
Matthias Kloseb9621712010-04-24 17:59:49 +000011582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11583$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11584if test "${ac_cv_big_endian_double+set}" = set; then :
11585 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011586else
11587
Matthias Kloseb9621712010-04-24 17:59:49 +000011588if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011589 ac_cv_big_endian_double=no
11590else
Matthias Kloseb9621712010-04-24 17:59:49 +000011591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011592/* end confdefs.h. */
11593
11594#include <string.h>
11595int main() {
11596 double x = 9006104071832581.0;
11597 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11598 return 0;
11599 else
11600 return 1;
11601}
11602
11603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011604if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011605 ac_cv_big_endian_double=yes
11606else
Matthias Kloseb9621712010-04-24 17:59:49 +000011607 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011608fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011609rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11610 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011611fi
11612
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011613fi
11614
Matthias Kloseb9621712010-04-24 17:59:49 +000011615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11616$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011617if test "$ac_cv_big_endian_double" = yes
11618then
11619
Matthias Kloseb9621712010-04-24 17:59:49 +000011620$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011621
11622fi
11623
11624# Some ARM platforms use a mixed-endian representation for doubles.
11625# While Python doesn't currently have full support for these platforms
11626# (see e.g., issue 1762561), we can at least make sure that float <-> string
11627# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11629$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11630if test "${ac_cv_mixed_endian_double+set}" = set; then :
11631 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011632else
11633
Matthias Kloseb9621712010-04-24 17:59:49 +000011634if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011635 ac_cv_mixed_endian_double=no
11636else
Matthias Kloseb9621712010-04-24 17:59:49 +000011637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011638/* end confdefs.h. */
11639
11640#include <string.h>
11641int main() {
11642 double x = 9006104071832581.0;
11643 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11644 return 0;
11645 else
11646 return 1;
11647}
11648
11649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011650if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011651 ac_cv_mixed_endian_double=yes
11652else
Matthias Kloseb9621712010-04-24 17:59:49 +000011653 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011654fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011655rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11656 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011657fi
11658
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011659fi
11660
Matthias Kloseb9621712010-04-24 17:59:49 +000011661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11662$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011663if test "$ac_cv_mixed_endian_double" = yes
11664then
11665
Matthias Kloseb9621712010-04-24 17:59:49 +000011666$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011667
11668fi
11669
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011670# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011671# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011672# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011673# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011674# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011675# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011676
11677# This inline assembler syntax may also work for suncc and icc,
11678# so we try it on all platforms.
11679
Matthias Kloseb9621712010-04-24 17:59:49 +000011680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11681$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011683/* end confdefs.h. */
11684
11685int
11686main ()
11687{
11688
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011689 unsigned short cw;
11690 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11691 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011692
11693 ;
11694 return 0;
11695}
11696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011697if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011698 have_gcc_asm_for_x87=yes
11699else
Matthias Kloseb9621712010-04-24 17:59:49 +000011700 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011701fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11704$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011705if test "$have_gcc_asm_for_x87" = yes
11706then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011707
Matthias Kloseb9621712010-04-24 17:59:49 +000011708$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011709
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011710fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011711
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011712# Detect whether system arithmetic is subject to x87-style double
11713# rounding issues. The result of this test has little meaning on non
11714# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11715# mode is round-to-nearest and double rounding issues are present, and
11716# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11718$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011719# $BASECFLAGS may affect the result
11720ac_save_cc="$CC"
11721CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011722if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011723 ac_cv_x87_double_rounding=no
11724else
Matthias Kloseb9621712010-04-24 17:59:49 +000011725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011726/* end confdefs.h. */
11727
11728#include <stdlib.h>
11729#include <math.h>
11730int main() {
11731 volatile double x, y, z;
11732 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11733 x = 0.99999999999999989; /* 1-2**-53 */
11734 y = 1./x;
11735 if (y != 1.)
11736 exit(0);
11737 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11738 x = 1e16;
11739 y = 2.99999;
11740 z = x + y;
11741 if (z != 1e16+4.)
11742 exit(0);
11743 /* both tests show evidence of double rounding */
11744 exit(1);
11745}
11746
11747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011748if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011749 ac_cv_x87_double_rounding=no
11750else
Matthias Kloseb9621712010-04-24 17:59:49 +000011751 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011752fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011753rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11754 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011755fi
11756
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011757CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11759$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011760if test "$ac_cv_x87_double_rounding" = yes
11761then
11762
Matthias Kloseb9621712010-04-24 17:59:49 +000011763$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011764
11765fi
11766
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011767# ************************************
11768# * Check for mathematical functions *
11769# ************************************
11770
11771LIBS_SAVE=$LIBS
11772LIBS="$LIBS $LIBM"
11773
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011774# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11775# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11777$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
11778if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
11779 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011780else
11781
Matthias Kloseb9621712010-04-24 17:59:49 +000011782if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011783 ac_cv_tanh_preserves_zero_sign=no
11784else
Matthias Kloseb9621712010-04-24 17:59:49 +000011785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011786/* end confdefs.h. */
11787
11788#include <math.h>
11789#include <stdlib.h>
11790int main() {
11791 /* return 0 if either negative zeros don't exist
11792 on this platform or if negative zeros exist
11793 and tanh(-0.) == -0. */
11794 if (atan2(0., -1.) == atan2(-0., -1.) ||
11795 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11796 else exit(1);
11797}
11798
11799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011800if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011801 ac_cv_tanh_preserves_zero_sign=yes
11802else
Matthias Kloseb9621712010-04-24 17:59:49 +000011803 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011805rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11806 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011807fi
11808
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011809fi
11810
Matthias Kloseb9621712010-04-24 17:59:49 +000011811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11812$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011813if test "$ac_cv_tanh_preserves_zero_sign" = yes
11814then
11815
Matthias Kloseb9621712010-04-24 17:59:49 +000011816$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011817
11818fi
11819
Mark Dickinson9c113362009-09-05 10:36:23 +000011820for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011821do :
11822 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11823ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11824eval as_val=\$$as_ac_var
11825 if test "x$as_val" = x""yes; then :
Mark Dickinson9c113362009-09-05 10:36:23 +000011826 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011827#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000011828_ACEOF
11829
11830fi
11831done
11832
Mark Dickinson9c113362009-09-05 10:36:23 +000011833for ac_func in hypot lgamma log1p round tgamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011834do :
11835 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11836ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11837eval as_val=\$$as_ac_var
11838 if test "x$as_val" = x""yes; then :
Christian Heimes99170a52007-12-19 02:07:34 +000011839 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011840#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000011841_ACEOF
11842
11843fi
11844done
11845
Matthias Kloseb9621712010-04-24 17:59:49 +000011846ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11847"
11848if test "x$ac_cv_have_decl_isinf" = x""yes; then :
11849 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011850else
Matthias Kloseb9621712010-04-24 17:59:49 +000011851 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011852fi
11853
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011854cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011855#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011857ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11858"
11859if test "x$ac_cv_have_decl_isnan" = x""yes; then :
11860 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011861else
Matthias Kloseb9621712010-04-24 17:59:49 +000011862 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011863fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011864
11865cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011866#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011868ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11869"
11870if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
11871 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011872else
Matthias Kloseb9621712010-04-24 17:59:49 +000011873 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011874fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011875
11876cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011877#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011878_ACEOF
11879
11880
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011881LIBS=$LIBS_SAVE
11882
Mark Dickinsona614f042009-11-28 12:48:43 +000011883# For multiprocessing module, check that sem_open
11884# actually works. For FreeBSD versions <= 7.2,
11885# the kernel module that provides POSIX semaphores
11886# isn't loaded by default, so an attempt to call
11887# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11889$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
11890if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
11891 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011892else
Matthias Kloseb9621712010-04-24 17:59:49 +000011893 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011894 ac_cv_posix_semaphores_enabled=yes
11895else
Matthias Kloseb9621712010-04-24 17:59:49 +000011896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011897/* end confdefs.h. */
11898
11899#include <unistd.h>
11900#include <fcntl.h>
11901#include <stdio.h>
11902#include <semaphore.h>
11903#include <sys/stat.h>
11904
11905int main(void) {
11906 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11907 if (a == SEM_FAILED) {
11908 perror("sem_open");
11909 return 1;
11910 }
11911 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011912 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011913 return 0;
11914}
11915
11916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011917if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011918 ac_cv_posix_semaphores_enabled=yes
11919else
Matthias Kloseb9621712010-04-24 17:59:49 +000011920 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11923 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011924fi
11925
11926
Mark Dickinsona614f042009-11-28 12:48:43 +000011927fi
11928
Matthias Kloseb9621712010-04-24 17:59:49 +000011929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11930$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011931if test $ac_cv_posix_semaphores_enabled = no
11932then
11933
Matthias Kloseb9621712010-04-24 17:59:49 +000011934$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000011935
11936fi
11937
Mark Dickinson10683072009-04-18 21:18:19 +000011938# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000011939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
11940$as_echo_n "checking for broken sem_getvalue... " >&6; }
11941if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
11942 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011943else
Matthias Kloseb9621712010-04-24 17:59:49 +000011944 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011945 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000011946else
Matthias Kloseb9621712010-04-24 17:59:49 +000011947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000011948/* end confdefs.h. */
11949
11950#include <unistd.h>
11951#include <fcntl.h>
11952#include <stdio.h>
11953#include <semaphore.h>
11954#include <sys/stat.h>
11955
11956int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000011957 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000011958 int count;
11959 int res;
11960 if(a==SEM_FAILED){
11961 perror("sem_open");
11962 return 1;
11963
11964 }
11965 res = sem_getvalue(a, &count);
11966 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011967 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000011968 return res==-1 ? 1 : 0;
11969}
11970
Mark Dickinson10683072009-04-18 21:18:19 +000011971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011972if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011973 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000011974else
Matthias Kloseb9621712010-04-24 17:59:49 +000011975 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011976fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011977rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11978 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011979fi
11980
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011981
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011982fi
11983
Matthias Kloseb9621712010-04-24 17:59:49 +000011984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
11985$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011986if test $ac_cv_broken_sem_getvalue = yes
11987then
11988
Matthias Kloseb9621712010-04-24 17:59:49 +000011989$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011990
11991fi
11992
Mark Dickinsonbd792642009-03-18 20:06:12 +000011993# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000011994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
11995$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011996# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011997if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000011998 enableval=$enable_big_digits; case $enable_big_digits in
11999yes)
12000 enable_big_digits=30 ;;
12001no)
12002 enable_big_digits=15 ;;
1200315|30)
12004 ;;
12005*)
Matthias Kloseb9621712010-04-24 17:59:49 +000012006 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 +000012007esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12009$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012010
12011cat >>confdefs.h <<_ACEOF
12012#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12013_ACEOF
12014
12015
12016else
Matthias Kloseb9621712010-04-24 17:59:49 +000012017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12018$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012019fi
12020
12021
Guido van Rossumef2255b2000-03-10 22:30:29 +000012022# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012023ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
12024if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012025
12026
Matthias Kloseb9621712010-04-24 17:59:49 +000012027$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012028
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012029 wchar_h="yes"
12030
Guido van Rossumef2255b2000-03-10 22:30:29 +000012031else
Martin v. Löwis11437992002-04-12 09:54:03 +000012032 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012033
12034fi
12035
Michael W. Hudson54241132001-12-07 15:38:26 +000012036
Martin v. Löwis11437992002-04-12 09:54:03 +000012037
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012038# determine wchar_t size
12039if test "$wchar_h" = yes
12040then
Matthias Kloseb9621712010-04-24 17:59:49 +000012041 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012042# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12043# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12044# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12046$as_echo_n "checking size of wchar_t... " >&6; }
12047if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
12048 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012049else
Matthias Kloseb9621712010-04-24 17:59:49 +000012050 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12051"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012052
Martin v. Löwis11437992002-04-12 09:54:03 +000012053else
Matthias Kloseb9621712010-04-24 17:59:49 +000012054 if test "$ac_cv_type_wchar_t" = yes; then
12055 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12056$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12057{ as_fn_set_status 77
12058as_fn_error "cannot compute sizeof (wchar_t)
12059See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012060 else
12061 ac_cv_sizeof_wchar_t=0
12062 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012063fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012064
Martin v. Löwis11437992002-04-12 09:54:03 +000012065fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12067$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012068
12069
12070
Martin v. Löwis11437992002-04-12 09:54:03 +000012071cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012072#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012073_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012074
Michael W. Hudson54241132001-12-07 15:38:26 +000012075
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012076fi
12077
Matthias Kloseb9621712010-04-24 17:59:49 +000012078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12079$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012080have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012082/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012083
12084#include <tcl.h>
12085#if TCL_UTF_MAX != 6
12086# error "NOT UCS4_TCL"
12087#endif
12088int
12089main ()
12090{
12091
12092 ;
12093 return 0;
12094}
12095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012096if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012097
12098
Matthias Kloseb9621712010-04-24 17:59:49 +000012099$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012100
12101 have_ucs4_tcl=yes
12102
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12106$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012107
Skip Montanaro6dead952003-09-25 14:50:04 +000012108# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012109if test "$wchar_h" = yes
12110then
12111 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12113$as_echo_n "checking whether wchar_t is signed... " >&6; }
12114 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12115 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012116else
12117
Matthias Kloseb9621712010-04-24 17:59:49 +000012118 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012119 ac_cv_wchar_t_signed=yes
12120else
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012122/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012123
12124 #include <wchar.h>
12125 int main()
12126 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012127 /* Success: exit code 0 */
12128 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012129 }
12130
12131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012132if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012133 ac_cv_wchar_t_signed=yes
12134else
Matthias Kloseb9621712010-04-24 17:59:49 +000012135 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012136fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012137rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12138 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012139fi
12140
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012141fi
12142
Matthias Kloseb9621712010-04-24 17:59:49 +000012143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12144$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012145fi
12146
Matthias Kloseb9621712010-04-24 17:59:49 +000012147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12148$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012149
12150# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012151if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012152 withval=$with_wide_unicode;
12153if test "$withval" != no
12154then unicode_size="4"
12155else unicode_size="2"
12156fi
12157
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012158else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012159
Georg Brandl52d168a2008-01-07 18:10:24 +000012160case "$have_ucs4_tcl" in
12161 yes) unicode_size="4" ;;
12162 *) unicode_size="2" ;;
12163esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012164
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012165fi
12166
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012167
12168
Georg Brandl52d168a2008-01-07 18:10:24 +000012169case "$unicode_size" in
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 4) $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012171 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012172 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012173 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012174esac
12175
Michael W. Hudson54241132001-12-07 15:38:26 +000012176
Martin v. Löwis11437992002-04-12 09:54:03 +000012177
Georg Brandl52d168a2008-01-07 18:10:24 +000012178# wchar_t is only usable if it maps to an unsigned type
12179if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012180 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012181then
12182 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012183
Matthias Kloseb9621712010-04-24 17:59:49 +000012184$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012185
Matthias Kloseb9621712010-04-24 17:59:49 +000012186 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012187
Georg Brandl52d168a2008-01-07 18:10:24 +000012188elif test "$ac_cv_sizeof_short" = "$unicode_size"
12189then
12190 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012191 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012192
Georg Brandl52d168a2008-01-07 18:10:24 +000012193elif test "$ac_cv_sizeof_long" = "$unicode_size"
12194then
12195 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012196 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012197
Georg Brandl52d168a2008-01-07 18:10:24 +000012198else
12199 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12202$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012203
12204# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12206$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12207if test "${ac_cv_c_bigendian+set}" = set; then :
12208 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012209else
Matthias Kloseb9621712010-04-24 17:59:49 +000012210 ac_cv_c_bigendian=unknown
12211 # See if we're dealing with a universal compiler.
12212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12213/* end confdefs.h. */
12214#ifndef __APPLE_CC__
12215 not a universal capable compiler
12216 #endif
12217 typedef int dummy;
12218
Skip Montanaro6dead952003-09-25 14:50:04 +000012219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012220if ac_fn_c_try_compile "$LINENO"; then :
12221
12222 # Check for potential -arch flags. It is not universal unless
12223 # there are at least two -arch flags with different values.
12224 ac_arch=
12225 ac_prev=
12226 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12227 if test -n "$ac_prev"; then
12228 case $ac_word in
12229 i?86 | x86_64 | ppc | ppc64)
12230 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12231 ac_arch=$ac_word
12232 else
12233 ac_cv_c_bigendian=universal
12234 break
12235 fi
12236 ;;
12237 esac
12238 ac_prev=
12239 elif test "x$ac_word" = "x-arch"; then
12240 ac_prev=arch
12241 fi
12242 done
12243fi
12244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12245 if test $ac_cv_c_bigendian = unknown; then
12246 # See if sys/param.h defines the BYTE_ORDER macro.
12247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012248/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012249#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012250 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012251
Martin v. Löwis11437992002-04-12 09:54:03 +000012252int
12253main ()
12254{
Matthias Kloseb9621712010-04-24 17:59:49 +000012255#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12256 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12257 && LITTLE_ENDIAN)
12258 bogus endian macros
12259 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012260
12261 ;
12262 return 0;
12263}
12264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012265if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012266 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012268/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012269#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012270 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012271
Martin v. Löwis11437992002-04-12 09:54:03 +000012272int
12273main ()
12274{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012275#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012276 not big endian
12277 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012278
12279 ;
12280 return 0;
12281}
12282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012283if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012284 ac_cv_c_bigendian=yes
12285else
Matthias Kloseb9621712010-04-24 17:59:49 +000012286 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012289fi
12290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12291 fi
12292 if test $ac_cv_c_bigendian = unknown; then
12293 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012295/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012296#include <limits.h>
12297
Martin v. Löwis11437992002-04-12 09:54:03 +000012298int
12299main ()
12300{
Matthias Kloseb9621712010-04-24 17:59:49 +000012301#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12302 bogus endian macros
12303 #endif
12304
Martin v. Löwis11437992002-04-12 09:54:03 +000012305 ;
12306 return 0;
12307}
12308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012309if ac_fn_c_try_compile "$LINENO"; then :
12310 # It does; now see whether it defined to _BIG_ENDIAN or not.
12311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12312/* end confdefs.h. */
12313#include <limits.h>
12314
12315int
12316main ()
12317{
12318#ifndef _BIG_ENDIAN
12319 not big endian
12320 #endif
12321
12322 ;
12323 return 0;
12324}
12325_ACEOF
12326if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012327 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012328else
Matthias Kloseb9621712010-04-24 17:59:49 +000012329 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012330fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12332fi
12333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12334 fi
12335 if test $ac_cv_c_bigendian = unknown; then
12336 # Compile a test program.
12337 if test "$cross_compiling" = yes; then :
12338 # Try to guess by grepping values from an object file.
12339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12340/* end confdefs.h. */
12341short int ascii_mm[] =
12342 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12343 short int ascii_ii[] =
12344 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12345 int use_ascii (int i) {
12346 return ascii_mm[i] + ascii_ii[i];
12347 }
12348 short int ebcdic_ii[] =
12349 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12350 short int ebcdic_mm[] =
12351 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12352 int use_ebcdic (int i) {
12353 return ebcdic_mm[i] + ebcdic_ii[i];
12354 }
12355 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012356
Matthias Kloseb9621712010-04-24 17:59:49 +000012357int
12358main ()
12359{
12360return use_ascii (foo) == use_ebcdic (foo);
12361 ;
12362 return 0;
12363}
12364_ACEOF
12365if ac_fn_c_try_compile "$LINENO"; then :
12366 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12367 ac_cv_c_bigendian=yes
12368 fi
12369 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12370 if test "$ac_cv_c_bigendian" = unknown; then
12371 ac_cv_c_bigendian=no
12372 else
12373 # finding both strings is unlikely to happen, but who knows?
12374 ac_cv_c_bigendian=unknown
12375 fi
12376 fi
12377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012379else
Matthias Kloseb9621712010-04-24 17:59:49 +000012380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012381/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012382$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012383int
12384main ()
12385{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012386
Matthias Kloseb9621712010-04-24 17:59:49 +000012387 /* Are we little or big endian? From Harbison&Steele. */
12388 union
12389 {
12390 long int l;
12391 char c[sizeof (long int)];
12392 } u;
12393 u.l = 1;
12394 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012395
12396 ;
12397 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012398}
Martin v. Löwis11437992002-04-12 09:54:03 +000012399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012400if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012401 ac_cv_c_bigendian=no
12402else
Matthias Kloseb9621712010-04-24 17:59:49 +000012403 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012405rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12406 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012408
Matthias Kloseb9621712010-04-24 17:59:49 +000012409 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012410fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12412$as_echo "$ac_cv_c_bigendian" >&6; }
12413 case $ac_cv_c_bigendian in #(
12414 yes)
12415 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12416;; #(
12417 no)
12418 ;; #(
12419 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012420
Matthias Kloseb9621712010-04-24 17:59:49 +000012421$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012422
Matthias Kloseb9621712010-04-24 17:59:49 +000012423 ;; #(
12424 *)
12425 as_fn_error "unknown endianness
12426 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12427 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012428
Michael W. Hudson54241132001-12-07 15:38:26 +000012429
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012430# Check whether right shifting a negative integer extends the sign bit
12431# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12433$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12434if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12435 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012436else
Martin v. Löwis11437992002-04-12 09:54:03 +000012437
Matthias Kloseb9621712010-04-24 17:59:49 +000012438if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012439 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012440else
Matthias Kloseb9621712010-04-24 17:59:49 +000012441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012442/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012443
12444int main()
12445{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012446 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012447}
12448
Martin v. Löwis11437992002-04-12 09:54:03 +000012449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012450if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012451 ac_cv_rshift_extends_sign=yes
12452else
Matthias Kloseb9621712010-04-24 17:59:49 +000012453 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012454fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012455rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12456 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012457fi
12458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012459fi
12460
Matthias Kloseb9621712010-04-24 17:59:49 +000012461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12462$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012463if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012464then
Martin v. Löwis11437992002-04-12 09:54:03 +000012465
Matthias Kloseb9621712010-04-24 17:59:49 +000012466$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012467
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012468fi
12469
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012470# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12472$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12473if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12474 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012475else
Martin v. Löwis11437992002-04-12 09:54:03 +000012476
Matthias Kloseb9621712010-04-24 17:59:49 +000012477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012478/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012479#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012480int
12481main ()
12482{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012483
12484 FILE *f = fopen("/dev/null", "r");
12485 flockfile(f);
12486 getc_unlocked(f);
12487 funlockfile(f);
12488
Martin v. Löwis11437992002-04-12 09:54:03 +000012489 ;
12490 return 0;
12491}
12492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012493if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012494 ac_cv_have_getc_unlocked=yes
12495else
Matthias Kloseb9621712010-04-24 17:59:49 +000012496 ac_cv_have_getc_unlocked=no
12497fi
12498rm -f core conftest.err conftest.$ac_objext \
12499 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012501
Matthias Kloseb9621712010-04-24 17:59:49 +000012502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12503$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012504if test "$ac_cv_have_getc_unlocked" = yes
12505then
Martin v. Löwis11437992002-04-12 09:54:03 +000012506
Matthias Kloseb9621712010-04-24 17:59:49 +000012507$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012508
12509fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012510
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012511# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012512# save the value of LIBS so we don't actually link Python with readline
12513LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012514
Gregory P. Smith18820942008-09-07 06:24:49 +000012515# On some systems we need to link readline to a termcap compatible
12516# library. NOTE: Keep the precedence of listed libraries synchronised
12517# with setup.py.
12518py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12520$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012521for py_libtermcap in "" ncursesw ncurses curses termcap; do
12522 if test -z "$py_libtermcap"; then
12523 READLINE_LIBS="-lreadline"
12524 else
12525 READLINE_LIBS="-lreadline -l$py_libtermcap"
12526 fi
12527 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012529/* end confdefs.h. */
12530
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012531/* Override any GCC internal prototype to avoid an error.
12532 Use char because int might match the return type of a GCC
12533 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012534#ifdef __cplusplus
12535extern "C"
12536#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012537char readline ();
12538int
12539main ()
12540{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012541return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012542 ;
12543 return 0;
12544}
12545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012546if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012547 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012549rm -f core conftest.err conftest.$ac_objext \
12550 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012551 if test $py_cv_lib_readline = yes; then
12552 break
12553 fi
12554done
12555# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12556#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012557if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12559$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012560else
Matthias Kloseb9621712010-04-24 17:59:49 +000012561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12562$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012563
Matthias Kloseb9621712010-04-24 17:59:49 +000012564$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012565
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012566fi
12567
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012568# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12570$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12571if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12572 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012573else
12574 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012575LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012577/* end confdefs.h. */
12578
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012579/* Override any GCC internal prototype to avoid an error.
12580 Use char because int might match the return type of a GCC
12581 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012582#ifdef __cplusplus
12583extern "C"
12584#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012585char rl_callback_handler_install ();
12586int
12587main ()
12588{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012589return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012590 ;
12591 return 0;
12592}
12593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012594if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012595 ac_cv_lib_readline_rl_callback_handler_install=yes
12596else
Matthias Kloseb9621712010-04-24 17:59:49 +000012597 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012598fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012599rm -f core conftest.err conftest.$ac_objext \
12600 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012601LIBS=$ac_check_lib_save_LIBS
12602fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12604$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12605if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012606
Matthias Kloseb9621712010-04-24 17:59:49 +000012607$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012608
12609fi
12610
12611
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012612# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012614/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012615#include <readline/readline.h>
12616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012617if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012618 have_readline=yes
12619else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012620 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012621
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012622fi
12623rm -f conftest.err conftest.$ac_ext
12624if test $have_readline = yes
12625then
Matthias Kloseb9621712010-04-24 17:59:49 +000012626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012627/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012628#include <readline/readline.h>
12629
12630_ACEOF
12631if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012632 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012633
Matthias Kloseb9621712010-04-24 17:59:49 +000012634$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012635
12636fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012637rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012638
Matthias Kloseb9621712010-04-24 17:59:49 +000012639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012640/* end confdefs.h. */
12641#include <readline/readline.h>
12642
12643_ACEOF
12644if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012645 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012646
Matthias Kloseb9621712010-04-24 17:59:49 +000012647$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012648
12649fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012650rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012651
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012652fi
12653
Martin v. Löwis0daad592001-09-30 21:09:59 +000012654# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12656$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12657if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12658 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012659else
Martin v. Löwis11437992002-04-12 09:54:03 +000012660 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012661LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012663/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012664
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012665/* Override any GCC internal prototype to avoid an error.
12666 Use char because int might match the return type of a GCC
12667 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012668#ifdef __cplusplus
12669extern "C"
12670#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012671char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012672int
12673main ()
12674{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012675return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012676 ;
12677 return 0;
12678}
12679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012680if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012681 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012682else
Matthias Kloseb9621712010-04-24 17:59:49 +000012683 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012684fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012685rm -f core conftest.err conftest.$ac_objext \
12686 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012687LIBS=$ac_check_lib_save_LIBS
12688fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12690$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12691if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012692
Matthias Kloseb9621712010-04-24 17:59:49 +000012693$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012694
Martin v. Löwis0daad592001-09-30 21:09:59 +000012695fi
12696
Michael W. Hudson54241132001-12-07 15:38:26 +000012697
Thomas Wouters89d996e2007-09-08 17:39:28 +000012698# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12700$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12701if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12702 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012703else
12704 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012705LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012707/* end confdefs.h. */
12708
12709/* Override any GCC internal prototype to avoid an error.
12710 Use char because int might match the return type of a GCC
12711 builtin and then its argument prototype would still apply. */
12712#ifdef __cplusplus
12713extern "C"
12714#endif
12715char rl_completion_display_matches_hook ();
12716int
12717main ()
12718{
12719return rl_completion_display_matches_hook ();
12720 ;
12721 return 0;
12722}
12723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012724if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012725 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12726else
Matthias Kloseb9621712010-04-24 17:59:49 +000012727 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012729rm -f core conftest.err conftest.$ac_objext \
12730 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012731LIBS=$ac_check_lib_save_LIBS
12732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12734$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12735if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012736
Matthias Kloseb9621712010-04-24 17:59:49 +000012737$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012738
12739fi
12740
12741
Martin v. Löwis0daad592001-09-30 21:09:59 +000012742# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12744$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12745if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12746 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012747else
Martin v. Löwis11437992002-04-12 09:54:03 +000012748 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012749LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012752
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012753/* Override any GCC internal prototype to avoid an error.
12754 Use char because int might match the return type of a GCC
12755 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012756#ifdef __cplusplus
12757extern "C"
12758#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012759char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012760int
12761main ()
12762{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012763return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012764 ;
12765 return 0;
12766}
12767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012768if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012769 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012770else
Matthias Kloseb9621712010-04-24 17:59:49 +000012771 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012772fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012773rm -f core conftest.err conftest.$ac_objext \
12774 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012775LIBS=$ac_check_lib_save_LIBS
12776fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12778$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
12779if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012780
Matthias Kloseb9621712010-04-24 17:59:49 +000012781$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012782
Guido van Rossum353ae582001-07-10 16:45:32 +000012783fi
12784
Jack Jansendd19cf82001-12-06 22:36:17 +000012785
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012786# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012788/* end confdefs.h. */
12789#include <readline/readline.h>
12790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012791if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012792 have_readline=yes
12793else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012794 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012795
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012796fi
12797rm -f conftest.err conftest.$ac_ext
12798if test $have_readline = yes
12799then
Matthias Kloseb9621712010-04-24 17:59:49 +000012800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012801/* end confdefs.h. */
12802#include <readline/readline.h>
12803
12804_ACEOF
12805if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012806 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012807
Matthias Kloseb9621712010-04-24 17:59:49 +000012808$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012809
12810fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012811rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012812
12813fi
12814
Martin v. Löwis82bca632006-02-10 20:49:30 +000012815# End of readline checks: restore LIBS
12816LIBS=$LIBS_no_readline
12817
Matthias Kloseb9621712010-04-24 17:59:49 +000012818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12819$as_echo_n "checking for broken nice()... " >&6; }
12820if test "${ac_cv_broken_nice+set}" = set; then :
12821 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012822else
Martin v. Löwis11437992002-04-12 09:54:03 +000012823
Matthias Kloseb9621712010-04-24 17:59:49 +000012824if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012825 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012826else
Matthias Kloseb9621712010-04-24 17:59:49 +000012827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012828/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012829
12830int main()
12831{
12832 int val1 = nice(1);
12833 if (val1 != -1 && val1 == nice(2))
12834 exit(0);
12835 exit(1);
12836}
12837
Martin v. Löwis11437992002-04-12 09:54:03 +000012838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012839if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012840 ac_cv_broken_nice=yes
12841else
Matthias Kloseb9621712010-04-24 17:59:49 +000012842 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12845 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012846fi
12847
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012848fi
12849
Matthias Kloseb9621712010-04-24 17:59:49 +000012850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12851$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012852if test "$ac_cv_broken_nice" = yes
12853then
Martin v. Löwis11437992002-04-12 09:54:03 +000012854
Matthias Kloseb9621712010-04-24 17:59:49 +000012855$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012856
12857fi
12858
Matthias Kloseb9621712010-04-24 17:59:49 +000012859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12860$as_echo_n "checking for broken poll()... " >&6; }
12861if test "${ac_cv_broken_poll+set}" = set; then :
12862 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012863else
Matthias Kloseb9621712010-04-24 17:59:49 +000012864 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012865 ac_cv_broken_poll=no
12866else
Matthias Kloseb9621712010-04-24 17:59:49 +000012867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012868/* end confdefs.h. */
12869
12870#include <poll.h>
12871
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012872int main()
12873{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012874 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012875 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012876
12877 close (42);
12878
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012879 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012880 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012881 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012882 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012883 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012884 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012885 return 1;
12886}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012887
12888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012889if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012890 ac_cv_broken_poll=yes
12891else
Matthias Kloseb9621712010-04-24 17:59:49 +000012892 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012893fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12895 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012897
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012898fi
12899
Matthias Kloseb9621712010-04-24 17:59:49 +000012900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
12901$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012902if test "$ac_cv_broken_poll" = yes
12903then
12904
Matthias Kloseb9621712010-04-24 17:59:49 +000012905$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012906
12907fi
12908
Brett Cannon43802422005-02-10 20:48:03 +000012909# 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 +000012910# (which is not required by ISO C or UNIX spec) and/or if we support
12911# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000012912ac_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 +000012913#include <$ac_cv_struct_tm>
12914
Matthias Kloseb9621712010-04-24 17:59:49 +000012915"
12916if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000012917
12918cat >>confdefs.h <<_ACEOF
12919#define HAVE_STRUCT_TM_TM_ZONE 1
12920_ACEOF
12921
12922
12923fi
12924
12925if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12926
Matthias Kloseb9621712010-04-24 17:59:49 +000012927$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012928
12929else
Matthias Kloseb9621712010-04-24 17:59:49 +000012930 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12931"
12932if test "x$ac_cv_have_decl_tzname" = x""yes; then :
12933 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012934else
Matthias Kloseb9621712010-04-24 17:59:49 +000012935 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012936fi
12937
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012938cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012939#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012940_ACEOF
12941
Matthias Kloseb9621712010-04-24 17:59:49 +000012942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12943$as_echo_n "checking for tzname... " >&6; }
12944if test "${ac_cv_var_tzname+set}" = set; then :
12945 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012946else
Matthias Kloseb9621712010-04-24 17:59:49 +000012947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012948/* end confdefs.h. */
12949#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012950#if !HAVE_DECL_TZNAME
12951extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000012952#endif
12953
12954int
12955main ()
12956{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012957return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000012958 ;
12959 return 0;
12960}
12961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012962if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000012963 ac_cv_var_tzname=yes
12964else
Matthias Kloseb9621712010-04-24 17:59:49 +000012965 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000012966fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012967rm -f core conftest.err conftest.$ac_objext \
12968 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012969fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12971$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000012972 if test $ac_cv_var_tzname = yes; then
12973
Matthias Kloseb9621712010-04-24 17:59:49 +000012974$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012975
12976 fi
12977fi
12978
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012979
Martin v. Löwis1d459062005-03-14 21:23:33 +000012980# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000012981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
12982$as_echo_n "checking for working tzset()... " >&6; }
12983if test "${ac_cv_working_tzset+set}" = set; then :
12984 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012985else
12986
Matthias Kloseb9621712010-04-24 17:59:49 +000012987if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012988 ac_cv_working_tzset=no
12989else
Matthias Kloseb9621712010-04-24 17:59:49 +000012990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012991/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012992
12993#include <stdlib.h>
12994#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000012995#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000012996
12997#if HAVE_TZNAME
12998extern char *tzname[];
12999#endif
13000
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013001int main()
13002{
Brett Cannon18367812003-09-19 00:59:16 +000013003 /* Note that we need to ensure that not only does tzset(3)
13004 do 'something' with localtime, but it works as documented
13005 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013006 This includes making sure that tzname is set properly if
13007 tm->tm_zone does not exist since it is the alternative way
13008 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013009
13010 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013011 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013012 */
13013
Martin v. Löwis1d459062005-03-14 21:23:33 +000013014 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013015 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13016
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013017 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013018 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013019 if (localtime(&groundhogday)->tm_hour != 0)
13020 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013021#if HAVE_TZNAME
13022 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13023 if (strcmp(tzname[0], "UTC") ||
13024 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13025 exit(1);
13026#endif
Brett Cannon18367812003-09-19 00:59:16 +000013027
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013028 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013029 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013030 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013031 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013032#if HAVE_TZNAME
13033 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13034 exit(1);
13035#endif
Brett Cannon18367812003-09-19 00:59:16 +000013036
13037 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13038 tzset();
13039 if (localtime(&groundhogday)->tm_hour != 11)
13040 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013041#if HAVE_TZNAME
13042 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13043 exit(1);
13044#endif
13045
13046#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013047 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13048 exit(1);
13049 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13050 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013051#endif
Brett Cannon18367812003-09-19 00:59:16 +000013052
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013053 exit(0);
13054}
13055
13056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013057if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013058 ac_cv_working_tzset=yes
13059else
Matthias Kloseb9621712010-04-24 17:59:49 +000013060 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13063 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013064fi
13065
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013066fi
13067
Matthias Kloseb9621712010-04-24 17:59:49 +000013068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13069$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013070if test "$ac_cv_working_tzset" = yes
13071then
13072
Matthias Kloseb9621712010-04-24 17:59:49 +000013073$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013074
13075fi
13076
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013077# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13079$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13080if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13081 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013082else
Matthias Kloseb9621712010-04-24 17:59:49 +000013083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013084/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013085#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013086int
13087main ()
13088{
13089
13090struct stat st;
13091st.st_mtim.tv_nsec = 1;
13092
13093 ;
13094 return 0;
13095}
13096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013097if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013098 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013099else
Matthias Kloseb9621712010-04-24 17:59:49 +000013100 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13103fi
13104
Matthias Kloseb9621712010-04-24 17:59:49 +000013105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13106$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013107if test "$ac_cv_stat_tv_nsec" = yes
13108then
13109
Matthias Kloseb9621712010-04-24 17:59:49 +000013110$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013111
13112fi
13113
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013114# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13116$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13117if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13118 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013119else
Matthias Kloseb9621712010-04-24 17:59:49 +000013120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013121/* end confdefs.h. */
13122#include <sys/stat.h>
13123int
13124main ()
13125{
13126
13127struct stat st;
13128st.st_mtimespec.tv_nsec = 1;
13129
13130 ;
13131 return 0;
13132}
13133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013134if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013135 ac_cv_stat_tv_nsec2=yes
13136else
Matthias Kloseb9621712010-04-24 17:59:49 +000013137 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13140fi
13141
Matthias Kloseb9621712010-04-24 17:59:49 +000013142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13143$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013144if test "$ac_cv_stat_tv_nsec2" = yes
13145then
13146
Matthias Kloseb9621712010-04-24 17:59:49 +000013147$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013148
13149fi
13150
Jack Jansen666b1e72001-10-31 12:11:48 +000013151# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13153$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13154if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13155 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013156else
Matthias Kloseb9621712010-04-24 17:59:49 +000013157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013158/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013159#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013160int
13161main ()
13162{
Jack Jansen666b1e72001-10-31 12:11:48 +000013163
13164 int rtn;
13165 rtn = mvwdelch(0,0,0);
13166
Martin v. Löwis11437992002-04-12 09:54:03 +000013167 ;
13168 return 0;
13169}
13170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013171if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013172 ac_cv_mvwdelch_is_expression=yes
13173else
Matthias Kloseb9621712010-04-24 17:59:49 +000013174 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13177fi
13178
Matthias Kloseb9621712010-04-24 17:59:49 +000013179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13180$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013181
13182if test "$ac_cv_mvwdelch_is_expression" = yes
13183then
Martin v. Löwis11437992002-04-12 09:54:03 +000013184
Matthias Kloseb9621712010-04-24 17:59:49 +000013185$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013186
13187fi
13188
Matthias Kloseb9621712010-04-24 17:59:49 +000013189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13190$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13191if test "${ac_cv_window_has_flags+set}" = set; then :
13192 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013193else
Matthias Kloseb9621712010-04-24 17:59:49 +000013194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013195/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013196#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013197int
13198main ()
13199{
Jack Jansen666b1e72001-10-31 12:11:48 +000013200
13201 WINDOW *w;
13202 w->_flags = 0;
13203
Martin v. Löwis11437992002-04-12 09:54:03 +000013204 ;
13205 return 0;
13206}
13207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013208if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013209 ac_cv_window_has_flags=yes
13210else
Matthias Kloseb9621712010-04-24 17:59:49 +000013211 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013212fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13214fi
13215
Matthias Kloseb9621712010-04-24 17:59:49 +000013216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13217$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013218
Jack Jansen666b1e72001-10-31 12:11:48 +000013219
13220if test "$ac_cv_window_has_flags" = yes
13221then
Martin v. Löwis11437992002-04-12 09:54:03 +000013222
Matthias Kloseb9621712010-04-24 17:59:49 +000013223$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013224
13225fi
13226
Matthias Kloseb9621712010-04-24 17:59:49 +000013227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13228$as_echo_n "checking for is_term_resized... " >&6; }
13229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013230/* end confdefs.h. */
13231#include <curses.h>
13232int
13233main ()
13234{
13235void *x=is_term_resized
13236 ;
13237 return 0;
13238}
13239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013240if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013241
Matthias Kloseb9621712010-04-24 17:59:49 +000013242$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013243
Matthias Kloseb159a552010-04-25 21:00:44 +000013244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013245$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013246else
Matthias Kloseb9621712010-04-24 17:59:49 +000013247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13248$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013249
13250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13254$as_echo_n "checking for resize_term... " >&6; }
13255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013256/* end confdefs.h. */
13257#include <curses.h>
13258int
13259main ()
13260{
13261void *x=resize_term
13262 ;
13263 return 0;
13264}
13265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013266if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013267
Matthias Kloseb9621712010-04-24 17:59:49 +000013268$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013269
Matthias Kloseb159a552010-04-25 21:00:44 +000013270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013271$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013272else
Matthias Kloseb9621712010-04-24 17:59:49 +000013273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13274$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013275
13276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13278
Matthias Kloseb9621712010-04-24 17:59:49 +000013279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13280$as_echo_n "checking for resizeterm... " >&6; }
13281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013282/* end confdefs.h. */
13283#include <curses.h>
13284int
13285main ()
13286{
13287void *x=resizeterm
13288 ;
13289 return 0;
13290}
13291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013292if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013293
Matthias Kloseb9621712010-04-24 17:59:49 +000013294$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013295
Matthias Kloseb159a552010-04-25 21:00:44 +000013296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013297$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013298else
Matthias Kloseb9621712010-04-24 17:59:49 +000013299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13300$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013301
13302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13304
Matthias Kloseb9621712010-04-24 17:59:49 +000013305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13306$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013307
13308if test -r /dev/ptmx
13309then
Matthias Kloseb9621712010-04-24 17:59:49 +000013310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13311$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013312
Matthias Kloseb9621712010-04-24 17:59:49 +000013313$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013314
Thomas Wouters89f507f2006-12-13 04:49:30 +000013315else
Matthias Kloseb9621712010-04-24 17:59:49 +000013316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13317$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013318fi
13319
Matthias Kloseb9621712010-04-24 17:59:49 +000013320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13321$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013322
13323if test -r /dev/ptc
13324then
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13326$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013327
Matthias Kloseb9621712010-04-24 17:59:49 +000013328$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013329
Thomas Wouters89f507f2006-12-13 04:49:30 +000013330else
Matthias Kloseb9621712010-04-24 17:59:49 +000013331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13332$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013333fi
13334
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013335if test "$have_long_long" = yes
13336then
Matthias Kloseb9621712010-04-24 17:59:49 +000013337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13338$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13339 if test "${ac_cv_have_long_long_format+set}" = set; then :
13340 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013341else
Matthias Kloseb9621712010-04-24 17:59:49 +000013342 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013343 ac_cv_have_long_long_format=no
13344else
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013346/* end confdefs.h. */
13347
13348 #include <stdio.h>
13349 #include <stddef.h>
13350 #include <string.h>
13351
13352 #ifdef HAVE_SYS_TYPES_H
13353 #include <sys/types.h>
13354 #endif
13355
13356 int main()
13357 {
13358 char buffer[256];
13359
13360 if (sprintf(buffer, "%lld", (long long)123) < 0)
13361 return 1;
13362 if (strcmp(buffer, "123"))
13363 return 1;
13364
13365 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13366 return 1;
13367 if (strcmp(buffer, "-123"))
13368 return 1;
13369
13370 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13371 return 1;
13372 if (strcmp(buffer, "123"))
13373 return 1;
13374
13375 return 0;
13376 }
13377
13378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013379if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013380 ac_cv_have_long_long_format=yes
13381else
Matthias Kloseb9621712010-04-24 17:59:49 +000013382 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013383fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013384rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13385 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013386fi
13387
13388
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013389fi
13390
Matthias Kloseb9621712010-04-24 17:59:49 +000013391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13392$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013393fi
13394
Mark Dickinson89d7d412009-12-31 20:50:59 +000013395if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013396then
13397
Matthias Kloseb9621712010-04-24 17:59:49 +000013398$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013399
13400fi
13401
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013402if test $ac_sys_system = Darwin
13403then
13404 LIBS="$LIBS -framework CoreFoundation"
13405fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013406
Matthias Kloseb9621712010-04-24 17:59:49 +000013407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13408$as_echo_n "checking for %zd printf() format support... " >&6; }
13409if test "${ac_cv_have_size_t_format+set}" = set; then :
13410 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013411else
Matthias Kloseb9621712010-04-24 17:59:49 +000013412 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013413 ac_cv_have_size_t_format="cross -- assuming yes"
13414
Thomas Wouters477c8d52006-05-27 19:21:47 +000013415else
Matthias Kloseb9621712010-04-24 17:59:49 +000013416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013417/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013418
Thomas Wouters477c8d52006-05-27 19:21:47 +000013419#include <stdio.h>
13420#include <stddef.h>
13421#include <string.h>
13422
Christian Heimes2c181612007-12-17 20:04:13 +000013423#ifdef HAVE_SYS_TYPES_H
13424#include <sys/types.h>
13425#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013426
13427#ifdef HAVE_SSIZE_T
13428typedef ssize_t Py_ssize_t;
13429#elif SIZEOF_VOID_P == SIZEOF_LONG
13430typedef long Py_ssize_t;
13431#else
13432typedef int Py_ssize_t;
13433#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013434
Christian Heimes2c181612007-12-17 20:04:13 +000013435int main()
13436{
13437 char buffer[256];
13438
Thomas Wouters477c8d52006-05-27 19:21:47 +000013439 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13440 return 1;
13441
Thomas Wouters89f507f2006-12-13 04:49:30 +000013442 if (strcmp(buffer, "123"))
13443 return 1;
13444
13445 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13446 return 1;
13447
13448 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013449 return 1;
13450
13451 return 0;
13452}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013453
Thomas Wouters477c8d52006-05-27 19:21:47 +000013454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013455if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013456 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013457else
Matthias Kloseb9621712010-04-24 17:59:49 +000013458 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013459fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013460rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13461 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013462fi
13463
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013464fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13466$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013467if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013468
Matthias Kloseb9621712010-04-24 17:59:49 +000013469$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013470
13471fi
13472
Matthias Kloseb9621712010-04-24 17:59:49 +000013473ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013474#ifdef HAVE_SYS_TYPES_H
13475#include <sys/types.h>
13476#endif
13477#ifdef HAVE_SYS_SOCKET_H
13478#include <sys/socket.h>
13479#endif
13480
Matthias Kloseb9621712010-04-24 17:59:49 +000013481"
13482if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013483
Martin v. Löwis11437992002-04-12 09:54:03 +000013484else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013485
Matthias Kloseb9621712010-04-24 17:59:49 +000013486$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013487
13488fi
13489
Michael W. Hudson54241132001-12-07 15:38:26 +000013490
Matthias Kloseb9621712010-04-24 17:59:49 +000013491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13492$as_echo_n "checking for broken mbstowcs... " >&6; }
13493if test "${ac_cv_broken_mbstowcs+set}" = set; then :
13494 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013495else
Matthias Kloseb9621712010-04-24 17:59:49 +000013496 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013497 ac_cv_broken_mbstowcs=no
13498else
Matthias Kloseb9621712010-04-24 17:59:49 +000013499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013500/* end confdefs.h. */
13501
13502#include<stdlib.h>
13503int main() {
13504 size_t len = -1;
13505 const char *str = "text";
13506 len = mbstowcs(NULL, str, 0);
13507 return (len != 4);
13508}
13509
13510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013511if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013512 ac_cv_broken_mbstowcs=no
13513else
Matthias Kloseb9621712010-04-24 17:59:49 +000013514 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013515fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13517 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013518fi
13519
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013520fi
13521
Matthias Kloseb9621712010-04-24 17:59:49 +000013522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13523$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013524if test "$ac_cv_broken_mbstowcs" = yes
13525then
13526
Matthias Kloseb9621712010-04-24 17:59:49 +000013527$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013528
13529fi
13530
Antoine Pitroub52ec782009-01-25 16:34:23 +000013531# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13533$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013534
13535# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013536if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013537 withval=$with_computed_gotos;
13538if test "$withval" != no
13539then
13540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013542
Matthias Kloseb9621712010-04-24 17:59:49 +000013543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13544$as_echo "yes" >&6; }
13545else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13546$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013547fi
13548else
Matthias Kloseb9621712010-04-24 17:59:49 +000013549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13550$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013551fi
13552
13553
13554
Michael W. Hudson54241132001-12-07 15:38:26 +000013555
13556
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013557for h in `(cd $srcdir;echo Python/thread_*.h)`
13558do
13559 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13560done
13561
Michael W. Hudson54241132001-12-07 15:38:26 +000013562
Neal Norwitzd24499d2005-12-18 21:36:39 +000013563SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13565$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013566for dir in $SRCDIRS; do
13567 if test ! -d $dir; then
13568 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013569 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013570done
Matthias Kloseb9621712010-04-24 17:59:49 +000013571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13572$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013573
Guido van Rossum627b2d71993-12-24 10:39:16 +000013574# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013575ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013576
Martin v. Löwis11437992002-04-12 09:54:03 +000013577cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013578# This file is a shell script that caches the results of configure
13579# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013580# scripts and configure runs, see configure's option --config-cache.
13581# It is not useful on other systems. If it contains results you don't
13582# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013583#
Martin v. Löwis11437992002-04-12 09:54:03 +000013584# config.status only pays attention to the cache file if you give it
13585# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013586#
Skip Montanaro6dead952003-09-25 14:50:04 +000013587# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013588# loading this file, other *unset* `ac_cv_foo' will be assigned the
13589# following values.
13590
13591_ACEOF
13592
Guido van Rossumf78abae1997-01-21 22:02:36 +000013593# The following way of writing the cache mishandles newlines in values,
13594# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013595# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013596# Ultrix sh set writes to stderr and can't be redirected directly,
13597# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013598(
13599 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13600 eval ac_val=\$$ac_var
13601 case $ac_val in #(
13602 *${as_nl}*)
13603 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013604 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13605$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013606 esac
13607 case $ac_var in #(
13608 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013609 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13610 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013611 esac ;;
13612 esac
13613 done
13614
Martin v. Löwis11437992002-04-12 09:54:03 +000013615 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013616 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13617 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013618 # `set' does not quote correctly, so add quotes: double-quote
13619 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013620 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013621 "s/'/'\\\\''/g;
13622 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013623 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013624 *)
13625 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013626 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013627 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013628 esac |
13629 sort
13630) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013631 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013632 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013633 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013634 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013635 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13636 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013637 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13638 :end' >>confcache
13639if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13640 if test -w "$cache_file"; then
13641 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013642 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13643$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013644 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013645 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013646 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13647$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013648 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013649fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013650rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013651
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013652test "x$prefix" = xNONE && prefix=$ac_default_prefix
13653# Let make expand exec_prefix.
13654test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013655
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013656DEFS=-DHAVE_CONFIG_H
13657
Skip Montanaro6dead952003-09-25 14:50:04 +000013658ac_libobjs=
13659ac_ltlibobjs=
13660for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13661 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013662 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013663 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013664 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13665 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013666 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13667 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013668done
13669LIBOBJS=$ac_libobjs
13670
13671LTLIBOBJS=$ac_ltlibobjs
13672
13673
Martin v. Löwis11437992002-04-12 09:54:03 +000013674
Matthias Kloseb9621712010-04-24 17:59:49 +000013675
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013676: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013677ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013678ac_clean_files_save=$ac_clean_files
13679ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013680{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13681$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13682as_write_fail=0
13683cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013684#! $SHELL
13685# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013686# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013687# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013688# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013689
Martin v. Löwis11437992002-04-12 09:54:03 +000013690debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013691ac_cs_recheck=false
13692ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013693
Matthias Kloseb9621712010-04-24 17:59:49 +000013694SHELL=\${CONFIG_SHELL-$SHELL}
13695export SHELL
13696_ASEOF
13697cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13698## -------------------- ##
13699## M4sh Initialization. ##
13700## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013701
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013702# Be more Bourne compatible
13703DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013704if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013705 emulate sh
13706 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013707 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013708 # is contrary to our usage. Disable this feature.
13709 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013710 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013711else
Matthias Kloseb9621712010-04-24 17:59:49 +000013712 case `(set -o) 2>/dev/null` in #(
13713 *posix*) :
13714 set -o posix ;; #(
13715 *) :
13716 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013717esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013718fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013719
13720
Matthias Kloseb9621712010-04-24 17:59:49 +000013721as_nl='
13722'
13723export as_nl
13724# Printing a long string crashes Solaris 7 /usr/bin/printf.
13725as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13726as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13727as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13728# Prefer a ksh shell builtin over an external printf program on Solaris,
13729# but without wasting forks for bash or zsh.
13730if test -z "$BASH_VERSION$ZSH_VERSION" \
13731 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13732 as_echo='print -r --'
13733 as_echo_n='print -rn --'
13734elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13735 as_echo='printf %s\n'
13736 as_echo_n='printf %s'
13737else
13738 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13739 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13740 as_echo_n='/usr/ucb/echo -n'
13741 else
13742 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13743 as_echo_n_body='eval
13744 arg=$1;
13745 case $arg in #(
13746 *"$as_nl"*)
13747 expr "X$arg" : "X\\(.*\\)$as_nl";
13748 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13749 esac;
13750 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13751 '
13752 export as_echo_n_body
13753 as_echo_n='sh -c $as_echo_n_body as_echo'
13754 fi
13755 export as_echo_body
13756 as_echo='sh -c $as_echo_body as_echo'
13757fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013758
13759# The user is always right.
13760if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013761 PATH_SEPARATOR=:
13762 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13763 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13764 PATH_SEPARATOR=';'
13765 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013766fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013767
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013768
13769# IFS
13770# We need space, tab and new line, in precisely that order. Quoting is
13771# there to prevent editors from complaining about space-tab.
13772# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13773# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013774IFS=" "" $as_nl"
13775
13776# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013777case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013778 *[\\/]* ) as_myself=$0 ;;
13779 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013780for as_dir in $PATH
13781do
13782 IFS=$as_save_IFS
13783 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013784 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13785 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013786IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013788 ;;
13789esac
13790# We did not find ourselves, most probably we were run as `sh COMMAND'
13791# in which case we are not to be found in the path.
13792if test "x$as_myself" = x; then
13793 as_myself=$0
13794fi
13795if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013796 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13797 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013798fi
13799
Matthias Kloseb9621712010-04-24 17:59:49 +000013800# Unset variables that we do not need and which cause bugs (e.g. in
13801# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13802# suppresses any "Segmentation fault" message there. '((' could
13803# trigger a bug in pdksh 5.2.14.
13804for as_var in BASH_ENV ENV MAIL MAILPATH
13805do eval test x\${$as_var+set} = xset \
13806 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013807done
13808PS1='$ '
13809PS2='> '
13810PS4='+ '
13811
13812# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000013813LC_ALL=C
13814export LC_ALL
13815LANGUAGE=C
13816export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013817
Matthias Kloseb9621712010-04-24 17:59:49 +000013818# CDPATH.
13819(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13820
13821
13822# as_fn_error ERROR [LINENO LOG_FD]
13823# ---------------------------------
13824# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13825# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
13826# script with status $?, using 1 if that was 0.
13827as_fn_error ()
13828{
13829 as_status=$?; test $as_status -eq 0 && as_status=1
13830 if test "$3"; then
13831 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13832 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
13833 fi
13834 $as_echo "$as_me: error: $1" >&2
13835 as_fn_exit $as_status
13836} # as_fn_error
13837
13838
13839# as_fn_set_status STATUS
13840# -----------------------
13841# Set $? to STATUS, without forking.
13842as_fn_set_status ()
13843{
13844 return $1
13845} # as_fn_set_status
13846
13847# as_fn_exit STATUS
13848# -----------------
13849# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13850as_fn_exit ()
13851{
13852 set +e
13853 as_fn_set_status $1
13854 exit $1
13855} # as_fn_exit
13856
13857# as_fn_unset VAR
13858# ---------------
13859# Portably unset VAR.
13860as_fn_unset ()
13861{
13862 { eval $1=; unset $1;}
13863}
13864as_unset=as_fn_unset
13865# as_fn_append VAR VALUE
13866# ----------------------
13867# Append the text in VALUE to the end of the definition contained in VAR. Take
13868# advantage of any shell optimizations that allow amortized linear growth over
13869# repeated appends, instead of the typical quadratic growth present in naive
13870# implementations.
13871if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13872 eval 'as_fn_append ()
13873 {
13874 eval $1+=\$2
13875 }'
13876else
13877 as_fn_append ()
13878 {
13879 eval $1=\$$1\$2
13880 }
13881fi # as_fn_append
13882
13883# as_fn_arith ARG...
13884# ------------------
13885# Perform arithmetic evaluation on the ARGs, and store the result in the
13886# global $as_val. Take advantage of shells that can avoid forks. The arguments
13887# must be portable across $(()) and expr.
13888if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13889 eval 'as_fn_arith ()
13890 {
13891 as_val=$(( $* ))
13892 }'
13893else
13894 as_fn_arith ()
13895 {
13896 as_val=`expr "$@" || test $? -eq 1`
13897 }
13898fi # as_fn_arith
13899
13900
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013901if expr a : '\(a\)' >/dev/null 2>&1 &&
13902 test "X`expr 00001 : '.*\(...\)'`" = X001; then
13903 as_expr=expr
13904else
13905 as_expr=false
13906fi
13907
13908if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
13909 as_basename=basename
13910else
13911 as_basename=false
13912fi
13913
Matthias Kloseb9621712010-04-24 17:59:49 +000013914if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13915 as_dirname=dirname
13916else
13917 as_dirname=false
13918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013919
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013920as_me=`$as_basename -- "$0" ||
13921$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13922 X"$0" : 'X\(//\)$' \| \
13923 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000013924$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013925 sed '/^.*\/\([^/][^/]*\)\/*$/{
13926 s//\1/
13927 q
13928 }
13929 /^X\/\(\/\/\)$/{
13930 s//\1/
13931 q
13932 }
13933 /^X\/\(\/\).*/{
13934 s//\1/
13935 q
13936 }
13937 s/.*/./; q'`
13938
Matthias Kloseb9621712010-04-24 17:59:49 +000013939# Avoid depending upon Character Ranges.
13940as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13941as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13942as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13943as_cr_digits='0123456789'
13944as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013945
13946ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000013947case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013948-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000013949 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013950 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000013951 xy) ECHO_C='\c';;
13952 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
13953 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013954 esac;;
13955*)
13956 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000013957esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013958
Martin v. Löwis11437992002-04-12 09:54:03 +000013959rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013960if test -d conf$$.dir; then
13961 rm -f conf$$.dir/conf$$.file
13962else
13963 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000013964 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013965fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013966if (echo >conf$$.file) 2>/dev/null; then
13967 if ln -s conf$$.file conf$$ 2>/dev/null; then
13968 as_ln_s='ln -s'
13969 # ... but there are two gotchas:
13970 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13971 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13972 # In both cases, we have to default to `cp -p'.
13973 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13974 as_ln_s='cp -p'
13975 elif ln conf$$.file conf$$ 2>/dev/null; then
13976 as_ln_s=ln
13977 else
Martin v. Löwis11437992002-04-12 09:54:03 +000013978 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000013979 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013980else
13981 as_ln_s='cp -p'
13982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013983rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13984rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000013985
Matthias Kloseb9621712010-04-24 17:59:49 +000013986
13987# as_fn_mkdir_p
13988# -------------
13989# Create "$as_dir" as a directory, including parents if necessary.
13990as_fn_mkdir_p ()
13991{
13992
13993 case $as_dir in #(
13994 -*) as_dir=./$as_dir;;
13995 esac
13996 test -d "$as_dir" || eval $as_mkdir_p || {
13997 as_dirs=
13998 while :; do
13999 case $as_dir in #(
14000 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14001 *) as_qdir=$as_dir;;
14002 esac
14003 as_dirs="'$as_qdir' $as_dirs"
14004 as_dir=`$as_dirname -- "$as_dir" ||
14005$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14006 X"$as_dir" : 'X\(//\)[^/]' \| \
14007 X"$as_dir" : 'X\(//\)$' \| \
14008 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14009$as_echo X"$as_dir" |
14010 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14011 s//\1/
14012 q
14013 }
14014 /^X\(\/\/\)[^/].*/{
14015 s//\1/
14016 q
14017 }
14018 /^X\(\/\/\)$/{
14019 s//\1/
14020 q
14021 }
14022 /^X\(\/\).*/{
14023 s//\1/
14024 q
14025 }
14026 s/.*/./; q'`
14027 test -d "$as_dir" && break
14028 done
14029 test -z "$as_dirs" || eval "mkdir $as_dirs"
14030 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
14031
14032
14033} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014034if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014035 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014036else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014037 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014038 as_mkdir_p=false
14039fi
14040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014041if test -x / >/dev/null 2>&1; then
14042 as_test_x='test -x'
14043else
14044 if ls -dL / >/dev/null 2>&1; then
14045 as_ls_L_option=L
14046 else
14047 as_ls_L_option=
14048 fi
14049 as_test_x='
14050 eval sh -c '\''
14051 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014052 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014053 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014054 case $1 in #(
14055 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014056 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014057 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014058 ???[sx]*):;;*)false;;esac;fi
14059 '\'' sh
14060 '
14061fi
14062as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014063
14064# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014065as_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 +000014066
14067# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014068as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014069
14070
Martin v. Löwis11437992002-04-12 09:54:03 +000014071exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014072## ----------------------------------- ##
14073## Main body of $CONFIG_STATUS script. ##
14074## ----------------------------------- ##
14075_ASEOF
14076test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014077
Matthias Kloseb9621712010-04-24 17:59:49 +000014078cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14079# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014080# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014081# values after options handling.
14082ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014083This file was extended by python $as_me 3.2, which was
Matthias Kloseb9621712010-04-24 17:59:49 +000014084generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014085
14086 CONFIG_FILES = $CONFIG_FILES
14087 CONFIG_HEADERS = $CONFIG_HEADERS
14088 CONFIG_LINKS = $CONFIG_LINKS
14089 CONFIG_COMMANDS = $CONFIG_COMMANDS
14090 $ $0 $@
14091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014092on `(hostname || uname -n) 2>/dev/null | sed 1q`
14093"
14094
Martin v. Löwis11437992002-04-12 09:54:03 +000014095_ACEOF
14096
Matthias Kloseb9621712010-04-24 17:59:49 +000014097case $ac_config_files in *"
14098"*) set x $ac_config_files; shift; ac_config_files=$*;;
14099esac
14100
14101case $ac_config_headers in *"
14102"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14103esac
14104
14105
14106cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014107# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000014108config_files="$ac_config_files"
14109config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014111_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014112
Matthias Kloseb9621712010-04-24 17:59:49 +000014113cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014114ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014115\`$as_me' instantiates files and other configuration actions
14116from templates according to the current configuration. Unless the files
14117and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014118
Matthias Kloseb9621712010-04-24 17:59:49 +000014119Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014120
14121 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014122 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014123 --config print configuration, then exit
14124 -q, --quiet, --silent
14125 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014126 -d, --debug don't remove temporary files
14127 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014128 --file=FILE[:TEMPLATE]
14129 instantiate the configuration file FILE
14130 --header=FILE[:TEMPLATE]
14131 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014132
14133Configuration files:
14134$config_files
14135
14136Configuration headers:
14137$config_headers
14138
Matthias Kloseb9621712010-04-24 17:59:49 +000014139Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014142cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14143ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014144ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014145python config.status 3.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014146configured by $0, generated by GNU Autoconf 2.65,
14147 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014148
Matthias Kloseb9621712010-04-24 17:59:49 +000014149Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014150This config.status script is free software; the Free Software Foundation
14151gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014152
14153ac_pwd='$ac_pwd'
14154srcdir='$srcdir'
14155INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014156test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014157_ACEOF
14158
Matthias Kloseb9621712010-04-24 17:59:49 +000014159cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14160# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014161ac_need_defaults=:
14162while test $# != 0
14163do
14164 case $1 in
14165 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014166 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14167 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014168 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014169 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014170 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014171 ac_option=$1
14172 ac_optarg=$2
14173 ac_shift=shift
14174 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014175 esac
14176
Skip Montanaro6dead952003-09-25 14:50:04 +000014177 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014178 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014179 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14180 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014181 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014182 $as_echo "$ac_cs_version"; exit ;;
14183 --config | --confi | --conf | --con | --co | --c )
14184 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014185 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014186 debug=: ;;
14187 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014188 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014189 case $ac_optarg in
14190 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14191 esac
14192 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014193 ac_need_defaults=false;;
14194 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014195 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014196 case $ac_optarg in
14197 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14198 esac
14199 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014200 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014201 --he | --h)
14202 # Conflict between --help and --header
Matthias Kloseb9621712010-04-24 17:59:49 +000014203 as_fn_error "ambiguous option: \`$1'
14204Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014205 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014206 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014207 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14208 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14209 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014210
14211 # This is an error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014212 -*) as_fn_error "unrecognized option: \`$1'
14213Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014214
Matthias Kloseb9621712010-04-24 17:59:49 +000014215 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014216 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014217
14218 esac
14219 shift
14220done
14221
Skip Montanaro6dead952003-09-25 14:50:04 +000014222ac_configure_extra_args=
14223
14224if $ac_cs_silent; then
14225 exec 6>/dev/null
14226 ac_configure_extra_args="$ac_configure_extra_args --silent"
14227fi
14228
14229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014230cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014231if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014232 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14233 shift
14234 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14235 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014236 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014237 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014238fi
14239
Martin v. Löwis11437992002-04-12 09:54:03 +000014240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014241cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014242exec 5>>config.log
14243{
14244 echo
14245 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14246## Running $as_me. ##
14247_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014248 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014249} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014252cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014253_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014254
Matthias Kloseb9621712010-04-24 17:59:49 +000014255cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014256
14257# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014258for ac_config_target in $ac_config_targets
14259do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014260 case $ac_config_target in
14261 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14262 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14263 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014264 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14265 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014266 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14267 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014268 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014269
Matthias Kloseb9621712010-04-24 17:59:49 +000014270 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014271 esac
14272done
14273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014274
Martin v. Löwis11437992002-04-12 09:54:03 +000014275# If the user did not use the arguments to specify the items to instantiate,
14276# then the envvar interface is used. Set only those that are not.
14277# We use the long form for the default assignment because of an extremely
14278# bizarre bug on SunOS 4.1.3.
14279if $ac_need_defaults; then
14280 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14281 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14282fi
14283
Skip Montanaro6dead952003-09-25 14:50:04 +000014284# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014285# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014286# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014287# Hook for its removal unless debugging.
14288# Note that there is a small window in which the directory will not be cleaned:
14289# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014290$debug ||
14291{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014292 tmp=
14293 trap 'exit_status=$?
14294 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14295' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014296 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014297}
Martin v. Löwis11437992002-04-12 09:54:03 +000014298# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014299
Martin v. Löwis11437992002-04-12 09:54:03 +000014300{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014301 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014302 test -n "$tmp" && test -d "$tmp"
14303} ||
14304{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014305 tmp=./conf$$-$RANDOM
14306 (umask 077 && mkdir "$tmp")
Matthias Kloseb9621712010-04-24 17:59:49 +000014307} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
Matthias Kloseb9621712010-04-24 17:59:49 +000014309# Set up the scripts for CONFIG_FILES section.
14310# No need to generate them if there are no CONFIG_FILES.
14311# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014312if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014313
Matthias Kloseb9621712010-04-24 17:59:49 +000014314
14315ac_cr=`echo X | tr X '\015'`
14316# On cygwin, bash can eat \r inside `` if the user requested igncr.
14317# But we know of no other shell where ac_cr would be empty at this
14318# point, so we can use a bashism as a fallback.
14319if test "x$ac_cr" = x; then
14320 eval ac_cr=\$\'\\r\'
14321fi
14322ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14323if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14324 ac_cs_awk_cr='\r'
14325else
14326 ac_cs_awk_cr=$ac_cr
14327fi
14328
14329echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014330_ACEOF
14331
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014332
Matthias Kloseb9621712010-04-24 17:59:49 +000014333{
14334 echo "cat >conf$$subs.awk <<_ACEOF" &&
14335 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14336 echo "_ACEOF"
14337} >conf$$subs.sh ||
14338 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14339ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014340ac_delim='%!_!# '
14341for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014342 . ./conf$$subs.sh ||
14343 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014344
Matthias Kloseb9621712010-04-24 17:59:49 +000014345 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14346 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014347 break
14348 elif $ac_last_try; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014349 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014350 else
14351 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014352 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014353done
Matthias Kloseb9621712010-04-24 17:59:49 +000014354rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014355
Matthias Kloseb9621712010-04-24 17:59:49 +000014356cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14357cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014359sed -n '
14360h
14361s/^/S["/; s/!.*/"]=/
14362p
14363g
14364s/^[^!]*!//
14365:repl
14366t repl
14367s/'"$ac_delim"'$//
14368t delim
14369:nl
14370h
14371s/\(.\{148\}\)..*/\1/
14372t more1
14373s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14374p
14375n
14376b repl
14377:more1
14378s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14379p
14380g
14381s/.\{148\}//
14382t nl
14383:delim
14384h
14385s/\(.\{148\}\)..*/\1/
14386t more2
14387s/["\\]/\\&/g; s/^/"/; s/$/"/
14388p
14389b
14390:more2
14391s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14392p
14393g
14394s/.\{148\}//
14395t delim
14396' <conf$$subs.awk | sed '
14397/^[^""]/{
14398 N
14399 s/\n//
14400}
14401' >>$CONFIG_STATUS || ac_write_fail=1
14402rm -f conf$$subs.awk
14403cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14404_ACAWK
14405cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14406 for (key in S) S_is_set[key] = 1
14407 FS = ""
14408
14409}
14410{
14411 line = $ 0
14412 nfields = split(line, field, "@")
14413 substed = 0
14414 len = length(field[1])
14415 for (i = 2; i < nfields; i++) {
14416 key = field[i]
14417 keylen = length(key)
14418 if (S_is_set[key]) {
14419 value = S[key]
14420 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14421 len += length(value) + length(field[++i])
14422 substed = 1
14423 } else
14424 len += 1 + keylen
14425 }
14426
14427 print line
14428}
14429
14430_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014432cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14433if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14434 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14435else
14436 cat
14437fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14438 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014439_ACEOF
14440
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014441# VPATH may cause trouble with some makes, so we remove $(srcdir),
14442# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14443# trailing colons and then remove the whole line if VPATH becomes empty
14444# (actually we leave an empty line to preserve line numbers).
14445if test "x$srcdir" = x.; then
14446 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14447s/:*\$(srcdir):*/:/
14448s/:*\${srcdir}:*/:/
14449s/:*@srcdir@:*/:/
14450s/^\([^=]*=[ ]*\):*/\1/
14451s/:*$//
14452s/^[^=]*=[ ]*$//
14453}'
14454fi
14455
Matthias Kloseb9621712010-04-24 17:59:49 +000014456cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014457fi # test -n "$CONFIG_FILES"
14458
Matthias Kloseb9621712010-04-24 17:59:49 +000014459# Set up the scripts for CONFIG_HEADERS section.
14460# No need to generate them if there are no CONFIG_HEADERS.
14461# This happens for instance with `./config.status Makefile'.
14462if test -n "$CONFIG_HEADERS"; then
14463cat >"$tmp/defines.awk" <<\_ACAWK ||
14464BEGIN {
14465_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014466
Matthias Kloseb9621712010-04-24 17:59:49 +000014467# Transform confdefs.h into an awk script `defines.awk', embedded as
14468# here-document in config.status, that substitutes the proper values into
14469# config.h.in to produce config.h.
14470
14471# Create a delimiter string that does not exist in confdefs.h, to ease
14472# handling of long lines.
14473ac_delim='%!_!# '
14474for ac_last_try in false false :; do
14475 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14476 if test -z "$ac_t"; then
14477 break
14478 elif $ac_last_try; then
14479 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
14480 else
14481 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14482 fi
14483done
14484
14485# For the awk script, D is an array of macro values keyed by name,
14486# likewise P contains macro parameters if any. Preserve backslash
14487# newline sequences.
14488
14489ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14490sed -n '
14491s/.\{148\}/&'"$ac_delim"'/g
14492t rset
14493:rset
14494s/^[ ]*#[ ]*define[ ][ ]*/ /
14495t def
14496d
14497:def
14498s/\\$//
14499t bsnl
14500s/["\\]/\\&/g
14501s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14502D["\1"]=" \3"/p
14503s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14504d
14505:bsnl
14506s/["\\]/\\&/g
14507s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14508D["\1"]=" \3\\\\\\n"\\/p
14509t cont
14510s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14511t cont
14512d
14513:cont
14514n
14515s/.\{148\}/&'"$ac_delim"'/g
14516t clear
14517:clear
14518s/\\$//
14519t bsnlc
14520s/["\\]/\\&/g; s/^/"/; s/$/"/p
14521d
14522:bsnlc
14523s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14524b cont
14525' <confdefs.h | sed '
14526s/'"$ac_delim"'/"\\\
14527"/g' >>$CONFIG_STATUS || ac_write_fail=1
14528
14529cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14530 for (key in D) D_is_set[key] = 1
14531 FS = ""
14532}
14533/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14534 line = \$ 0
14535 split(line, arg, " ")
14536 if (arg[1] == "#") {
14537 defundef = arg[2]
14538 mac1 = arg[3]
14539 } else {
14540 defundef = substr(arg[1], 2)
14541 mac1 = arg[2]
14542 }
14543 split(mac1, mac2, "(") #)
14544 macro = mac2[1]
14545 prefix = substr(line, 1, index(line, defundef) - 1)
14546 if (D_is_set[macro]) {
14547 # Preserve the white space surrounding the "#".
14548 print prefix "define", macro P[macro] D[macro]
14549 next
14550 } else {
14551 # Replace #undef with comments. This is necessary, for example,
14552 # in the case of _POSIX_SOURCE, which is predefined and required
14553 # on some systems where configure will not decide to define it.
14554 if (defundef == "undef") {
14555 print "/*", prefix defundef, macro, "*/"
14556 next
14557 }
14558 }
14559}
14560{ print }
14561_ACAWK
14562_ACEOF
14563cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14564 as_fn_error "could not setup config headers machinery" "$LINENO" 5
14565fi # test -n "$CONFIG_HEADERS"
14566
14567
14568eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14569shift
14570for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014571do
14572 case $ac_tag in
14573 :[FHLC]) ac_mode=$ac_tag; continue;;
14574 esac
14575 case $ac_mode$ac_tag in
14576 :[FHL]*:*);;
Matthias Kloseb9621712010-04-24 17:59:49 +000014577 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014578 :[FH]-) ac_tag=-:-;;
14579 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14580 esac
14581 ac_save_IFS=$IFS
14582 IFS=:
14583 set x $ac_tag
14584 IFS=$ac_save_IFS
14585 shift
14586 ac_file=$1
14587 shift
14588
14589 case $ac_mode in
14590 :L) ac_source=$1;;
14591 :[FH])
14592 ac_file_inputs=
14593 for ac_f
14594 do
14595 case $ac_f in
14596 -) ac_f="$tmp/stdin";;
14597 *) # Look for the file first in the build tree, then in the source tree
14598 # (if the path is not absolute). The absolute path cannot be DOS-style,
14599 # because $ac_f cannot contain `:'.
14600 test -f "$ac_f" ||
14601 case $ac_f in
14602 [\\/$]*) false;;
14603 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14604 esac ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014605 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014606 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014607 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14608 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014609 done
14610
14611 # Let's still pretend it is `configure' which instantiates (i.e., don't
14612 # use $as_me), people would be surprised to read:
14613 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014614 configure_input='Generated from '`
14615 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14616 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014617 if test x"$ac_file" != x-; then
14618 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014619 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14620$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014621 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014622 # Neutralize special characters interpreted by sed in replacement strings.
14623 case $configure_input in #(
14624 *\&* | *\|* | *\\* )
14625 ac_sed_conf_input=`$as_echo "$configure_input" |
14626 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14627 *) ac_sed_conf_input=$configure_input;;
14628 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014629
14630 case $ac_tag in
Matthias Kloseb9621712010-04-24 17:59:49 +000014631 *:-:* | *:-) cat >"$tmp/stdin" \
14632 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014633 esac
14634 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014635 esac
14636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014637 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014638$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014639 X"$ac_file" : 'X\(//\)[^/]' \| \
14640 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014641 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014642$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014643 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14644 s//\1/
14645 q
14646 }
14647 /^X\(\/\/\)[^/].*/{
14648 s//\1/
14649 q
14650 }
14651 /^X\(\/\/\)$/{
14652 s//\1/
14653 q
14654 }
14655 /^X\(\/\).*/{
14656 s//\1/
14657 q
14658 }
14659 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014660 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014661 ac_builddir=.
14662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014663case "$ac_dir" in
14664.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14665*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014666 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014667 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014668 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014669 case $ac_top_builddir_sub in
14670 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14671 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14672 esac ;;
14673esac
14674ac_abs_top_builddir=$ac_pwd
14675ac_abs_builddir=$ac_pwd$ac_dir_suffix
14676# for backward compatibility:
14677ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014678
14679case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014680 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014681 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014682 ac_top_srcdir=$ac_top_builddir_sub
14683 ac_abs_top_srcdir=$ac_pwd ;;
14684 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014685 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014686 ac_top_srcdir=$srcdir
14687 ac_abs_top_srcdir=$srcdir ;;
14688 *) # Relative name.
14689 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14690 ac_top_srcdir=$ac_top_build_prefix$srcdir
14691 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014692esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014693ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014694
Martin v. Löwis11437992002-04-12 09:54:03 +000014695
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014696 case $ac_mode in
14697 :F)
14698 #
14699 # CONFIG_FILE
14700 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014701
14702 case $INSTALL in
14703 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014704 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014705 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014706_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014707
Matthias Kloseb9621712010-04-24 17:59:49 +000014708cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014709# If the template does not know about datarootdir, expand it.
14710# FIXME: This hack should be removed a few years after 2.60.
14711ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014712ac_sed_dataroot='
14713/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014714 p
14715 q
14716}
14717/@datadir@/p
14718/@docdir@/p
14719/@infodir@/p
14720/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014721/@mandir@/p'
14722case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014723*datarootdir*) ac_datarootdir_seen=yes;;
14724*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14726$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014728cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014729 ac_datarootdir_hack='
14730 s&@datadir@&$datadir&g
14731 s&@docdir@&$docdir&g
14732 s&@infodir@&$infodir&g
14733 s&@localedir@&$localedir&g
14734 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014735 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014736esac
14737_ACEOF
14738
14739# Neutralize VPATH when `$srcdir' = `.'.
14740# Shell code in configure.ac might set extrasub.
14741# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014742cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14743ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014744$extrasub
14745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014746cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014747:t
14748/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014749s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014750s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014751s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014752s&@srcdir@&$ac_srcdir&;t t
14753s&@abs_srcdir@&$ac_abs_srcdir&;t t
14754s&@top_srcdir@&$ac_top_srcdir&;t t
14755s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14756s&@builddir@&$ac_builddir&;t t
14757s&@abs_builddir@&$ac_abs_builddir&;t t
14758s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14759s&@INSTALL@&$ac_INSTALL&;t t
14760$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014761"
14762eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
14763 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014764
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014765test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14766 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14767 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014768 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014769which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014770$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014771which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014773 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014774 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +000014775 -) cat "$tmp/out" && rm -f "$tmp/out";;
14776 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14777 esac \
14778 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014779 ;;
14780 :H)
14781 #
14782 # CONFIG_HEADER
14783 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014784 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014785 {
14786 $as_echo "/* $configure_input */" \
14787 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14788 } >"$tmp/config.h" \
14789 || as_fn_error "could not create $ac_file" "$LINENO" 5
14790 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14791 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14792$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014793 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014794 rm -f "$ac_file"
14795 mv "$tmp/config.h" "$ac_file" \
14796 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014797 fi
14798 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014799 $as_echo "/* $configure_input */" \
14800 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
14801 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014802 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014803 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014804
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014805
14806 esac
14807
14808done # for ac_tag
14809
Guido van Rossum627b2d71993-12-24 10:39:16 +000014810
Matthias Kloseb9621712010-04-24 17:59:49 +000014811as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000014812_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014813ac_clean_files=$ac_clean_files_save
14814
Matthias Kloseb9621712010-04-24 17:59:49 +000014815test $ac_write_fail = 0 ||
14816 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
14817
Martin v. Löwis11437992002-04-12 09:54:03 +000014818
14819# configure is writing to config.log, and then calls config.status.
14820# config.status does its own redirection, appending to config.log.
14821# Unfortunately, on DOS this fails, as config.log is still kept open
14822# by configure, so config.status won't be able to write to it; its
14823# output is simply discarded. So we exec the FD to /dev/null,
14824# effectively closing config.log, so it can be properly (re)opened and
14825# appended to by config.status. When coming back to configure, we
14826# need to make the FD available again.
14827if test "$no_create" != yes; then
14828 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000014829 ac_config_status_args=
14830 test "$silent" = yes &&
14831 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000014832 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000014833 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000014834 exec 5>>config.log
14835 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14836 # would make configure fail if this is the last instruction.
Matthias Kloseb9621712010-04-24 17:59:49 +000014837 $ac_cs_success || as_fn_exit $?
14838fi
14839if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14840 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14841$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014842fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014843
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014844
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014845echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014846if test ! -f Modules/Setup
14847then
14848 cp $srcdir/Modules/Setup.dist Modules/Setup
14849fi
14850
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014851echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014852if test ! -f Modules/Setup.local
14853then
14854 echo "# Edit this file for local setup changes" >Modules/Setup.local
14855fi
14856
14857echo "creating Makefile"
14858$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
14859 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000014860 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014861mv config.c Modules