blob: a29a0213da37980f3b977cbbe33ca47c8ea22f81 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klosebada4c32010-04-25 21:18:48 +00002# From configure.in Revision: 80478 .
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
667FRAMEWORKUNIXTOOLSPREFIX
668FRAMEWORKALTINSTALLLAST
669FRAMEWORKALTINSTALLFIRST
670FRAMEWORKINSTALLLAST
671FRAMEWORKINSTALLFIRST
672PYTHONFRAMEWORKINSTALLDIR
673PYTHONFRAMEWORKPREFIX
674PYTHONFRAMEWORKDIR
675PYTHONFRAMEWORKIDENTIFIER
676PYTHONFRAMEWORK
677LIPO_32BIT_FLAGS
678ARCH_RUN_32BIT
679UNIVERSALSDK
680CONFIG_ARGS
681SOVERSION
682VERSION
683target_alias
684host_alias
685build_alias
686LIBS
687ECHO_T
688ECHO_N
689ECHO_C
690DEFS
691mandir
692localedir
693libdir
694psdir
695pdfdir
696dvidir
697htmldir
698infodir
699docdir
700oldincludedir
701includedir
702localstatedir
703sharedstatedir
704sysconfdir
705datadir
706datarootdir
707libexecdir
708sbindir
709bindir
710program_transform_name
711prefix
712exec_prefix
713PACKAGE_URL
714PACKAGE_BUGREPORT
715PACKAGE_STRING
716PACKAGE_VERSION
717PACKAGE_TARNAME
718PACKAGE_NAME
719PATH_SEPARATOR
720SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000721ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000722ac_user_opts='
723enable_option_checking
724enable_universalsdk
725with_universal_archs
726with_framework_name
727enable_framework
728with_gcc
729with_cxx_main
730with_suffix
731enable_shared
732enable_profiling
733with_pydebug
734with_libs
735with_system_expat
736with_system_ffi
737with_dbmliborder
738with_signal_module
739with_dec_threads
740with_threads
741with_thread
742enable_ipv6
743with_doc_strings
744with_tsc
745with_pymalloc
746with_valgrind
747with_wctype_functions
748with_fpectl
749with_libm
750with_libc
751enable_big_digits
752with_wide_unicode
753with_computed_gotos
754'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000755 ac_precious_vars='build_alias
756host_alias
757target_alias
758CC
759CFLAGS
760LDFLAGS
761LIBS
762CPPFLAGS
763CPP'
764
Guido van Rossum627b2d71993-12-24 10:39:16 +0000765
Guido van Rossum7f43da71994-08-01 12:15:30 +0000766# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000767ac_init_help=
768ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000769ac_unrecognized_opts=
770ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000771# The variables have the same names as the options, with
772# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000773cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000774exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000775no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000776no_recursion=
777prefix=NONE
778program_prefix=NONE
779program_suffix=NONE
780program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000781silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000782site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000783srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000785x_includes=NONE
786x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000787
788# Installation directory options.
789# These are left unexpanded so users can "make install exec_prefix=/foo"
790# and all the variables that are supposed to be based on exec_prefix
791# by default will actually change.
792# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000793# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000794bindir='${exec_prefix}/bin'
795sbindir='${exec_prefix}/sbin'
796libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000797datarootdir='${prefix}/share'
798datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000799sysconfdir='${prefix}/etc'
800sharedstatedir='${prefix}/com'
801localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000802includedir='${prefix}/include'
803oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000804docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
805infodir='${datarootdir}/info'
806htmldir='${docdir}'
807dvidir='${docdir}'
808pdfdir='${docdir}'
809psdir='${docdir}'
810libdir='${exec_prefix}/lib'
811localedir='${datarootdir}/locale'
812mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000813
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000815ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000817do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818 # If the previous option needs an argument, assign it.
819 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000820 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000821 ac_prev=
822 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000823 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000825 case $ac_option in
826 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
827 *) ac_optarg=yes ;;
828 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830 # Accept the important Cygnus configure options, so we can diagnose typos.
831
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000832 case $ac_dashdash$ac_option in
833 --)
834 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000836 -bindir | --bindir | --bindi | --bind | --bin | --bi)
837 ac_prev=bindir ;;
838 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000839 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000840
841 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000842 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000843 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000844 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000846 -cache-file | --cache-file | --cache-fil | --cache-fi \
847 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
848 ac_prev=cache_file ;;
849 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
850 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000851 cache_file=$ac_optarg ;;
852
853 --config-cache | -C)
854 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000856 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000857 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000859 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000860
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
862 | --dataroo | --dataro | --datar)
863 ac_prev=datarootdir ;;
864 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
865 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
866 datarootdir=$ac_optarg ;;
867
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000869 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000871 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
872 as_fn_error "invalid feature name: $ac_useropt"
873 ac_useropt_orig=$ac_useropt
874 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
875 case $ac_user_opts in
876 *"
877"enable_$ac_useropt"
878"*) ;;
879 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
880 ac_unrecognized_sep=', ';;
881 esac
882 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883
884 -docdir | --docdir | --docdi | --doc | --do)
885 ac_prev=docdir ;;
886 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
887 docdir=$ac_optarg ;;
888
889 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
890 ac_prev=dvidir ;;
891 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
892 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
894 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000895 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000896 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000897 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
898 as_fn_error "invalid feature name: $ac_useropt"
899 ac_useropt_orig=$ac_useropt
900 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
901 case $ac_user_opts in
902 *"
903"enable_$ac_useropt"
904"*) ;;
905 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
906 ac_unrecognized_sep=', ';;
907 esac
908 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
911 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
912 | --exec | --exe | --ex)
913 ac_prev=exec_prefix ;;
914 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
915 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
916 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918
919 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000920 # Obsolete; use --with-gas.
921 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 -help | --help | --hel | --he | -h)
924 ac_init_help=long ;;
925 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
926 ac_init_help=recursive ;;
927 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
928 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
930 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000935 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
936 ac_prev=htmldir ;;
937 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
938 | --ht=*)
939 htmldir=$ac_optarg ;;
940
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 -includedir | --includedir | --includedi | --included | --include \
942 | --includ | --inclu | --incl | --inc)
943 ac_prev=includedir ;;
944 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
945 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947
948 -infodir | --infodir | --infodi | --infod | --info | --inf)
949 ac_prev=infodir ;;
950 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952
953 -libdir | --libdir | --libdi | --libd)
954 ac_prev=libdir ;;
955 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
958 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
959 | --libexe | --libex | --libe)
960 ac_prev=libexecdir ;;
961 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
962 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000963 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000965 -localedir | --localedir | --localedi | --localed | --locale)
966 ac_prev=localedir ;;
967 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
968 localedir=$ac_optarg ;;
969
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000971 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972 ac_prev=localstatedir ;;
973 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000974 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976
977 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
978 ac_prev=mandir ;;
979 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000981
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000983 # Obsolete; use --without-fp.
984 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985
986 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988 no_create=yes ;;
989
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000990 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
991 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
992 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000994 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
995 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
996 | --oldin | --oldi | --old | --ol | --o)
997 ac_prev=oldincludedir ;;
998 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
999 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1000 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001002
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1004 ac_prev=prefix ;;
1005 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
1008 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1009 | --program-pre | --program-pr | --program-p)
1010 ac_prev=program_prefix ;;
1011 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1012 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
1015 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1016 | --program-suf | --program-su | --program-s)
1017 ac_prev=program_suffix ;;
1018 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1019 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
1022 -program-transform-name | --program-transform-name \
1023 | --program-transform-nam | --program-transform-na \
1024 | --program-transform-n | --program-transform- \
1025 | --program-transform | --program-transfor \
1026 | --program-transfo | --program-transf \
1027 | --program-trans | --program-tran \
1028 | --progr-tra | --program-tr | --program-t)
1029 ac_prev=program_transform_name ;;
1030 -program-transform-name=* | --program-transform-name=* \
1031 | --program-transform-nam=* | --program-transform-na=* \
1032 | --program-transform-n=* | --program-transform-=* \
1033 | --program-transform=* | --program-transfor=* \
1034 | --program-transfo=* | --program-transf=* \
1035 | --program-trans=* | --program-tran=* \
1036 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001038
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001039 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1040 ac_prev=pdfdir ;;
1041 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1042 pdfdir=$ac_optarg ;;
1043
1044 -psdir | --psdir | --psdi | --psd | --ps)
1045 ac_prev=psdir ;;
1046 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1047 psdir=$ac_optarg ;;
1048
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1050 | -silent | --silent | --silen | --sile | --sil)
1051 silent=yes ;;
1052
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1054 ac_prev=sbindir ;;
1055 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1056 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
1059 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1060 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1061 | --sharedst | --shareds | --shared | --share | --shar \
1062 | --sha | --sh)
1063 ac_prev=sharedstatedir ;;
1064 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1065 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1066 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1067 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070 -site | --site | --sit)
1071 ac_prev=site ;;
1072 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1076 ac_prev=srcdir ;;
1077 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1081 | --syscon | --sysco | --sysc | --sys | --sy)
1082 ac_prev=sysconfdir ;;
1083 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1084 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001086
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
1092 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1093 verbose=yes ;;
1094
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 -version | --version | --versio | --versi | --vers | -V)
1096 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
1098 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001099 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001100 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001101 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1102 as_fn_error "invalid package name: $ac_useropt"
1103 ac_useropt_orig=$ac_useropt
1104 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1105 case $ac_user_opts in
1106 *"
1107"with_$ac_useropt"
1108"*) ;;
1109 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1110 ac_unrecognized_sep=', ';;
1111 esac
1112 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
1114 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001115 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001116 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001117 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1118 as_fn_error "invalid package name: $ac_useropt"
1119 ac_useropt_orig=$ac_useropt
1120 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1121 case $ac_user_opts in
1122 *"
1123"with_$ac_useropt"
1124"*) ;;
1125 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1126 ac_unrecognized_sep=', ';;
1127 esac
1128 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001130 --x)
1131 # Obsolete; use --with-x.
1132 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133
1134 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1135 | --x-incl | --x-inc | --x-in | --x-i)
1136 ac_prev=x_includes ;;
1137 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1138 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140
1141 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1142 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1143 ac_prev=x_libraries ;;
1144 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1145 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001146 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147
Matthias Kloseb9621712010-04-24 17:59:49 +00001148 -*) as_fn_error "unrecognized option: \`$ac_option'
1149Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150 ;;
1151
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 *=*)
1153 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1154 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001155 case $ac_envvar in #(
1156 '' | [0-9]* | *[!_$as_cr_alnum]* )
1157 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1158 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001159 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 export $ac_envvar ;;
1161
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001162 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001164 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001166 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168 ;;
1169
1170 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001171done
1172
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001175 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176fi
1177
Matthias Kloseb9621712010-04-24 17:59:49 +00001178if test -n "$ac_unrecognized_opts"; then
1179 case $enable_option_checking in
1180 no) ;;
1181 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1182 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1183 esac
1184fi
1185
1186# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001187for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1188 datadir sysconfdir sharedstatedir localstatedir includedir \
1189 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1190 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001191do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001192 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 # Remove trailing slashes.
1194 case $ac_val in
1195 */ )
1196 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1197 eval $ac_var=\$ac_val;;
1198 esac
1199 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001200 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001201 [\\/$]* | ?:[\\/]* ) continue;;
1202 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001205done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001206
Martin v. Löwis11437992002-04-12 09:54:03 +00001207# There might be people who depend on the old broken behavior: `$host'
1208# used to hold the argument of --host etc.
1209# FIXME: To remove some day.
1210build=$build_alias
1211host=$host_alias
1212target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213
Martin v. Löwis11437992002-04-12 09:54:03 +00001214# FIXME: To remove some day.
1215if test "x$host_alias" != x; then
1216 if test "x$build_alias" = x; then
1217 cross_compiling=maybe
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 $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 +00001219 If a cross compiler is detected then cross compile mode will be used." >&2
1220 elif test "x$build_alias" != "x$host_alias"; then
1221 cross_compiling=yes
1222 fi
1223fi
1224
1225ac_tool_prefix=
1226test -n "$host_alias" && ac_tool_prefix=$host_alias-
1227
1228test "$silent" = yes && exec 6>/dev/null
1229
Guido van Rossum627b2d71993-12-24 10:39:16 +00001230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001231ac_pwd=`pwd` && test -n "$ac_pwd" &&
1232ac_ls_di=`ls -di .` &&
1233ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Matthias Kloseb9621712010-04-24 17:59:49 +00001234 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001235test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Matthias Kloseb9621712010-04-24 17:59:49 +00001236 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001237
1238
Guido van Rossum627b2d71993-12-24 10:39:16 +00001239# Find the source files, if location was not specified.
1240if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001242 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001243 ac_confdir=`$as_dirname -- "$as_myself" ||
1244$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1245 X"$as_myself" : 'X\(//\)[^/]' \| \
1246 X"$as_myself" : 'X\(//\)$' \| \
1247 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1248$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001249 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1250 s//\1/
1251 q
1252 }
1253 /^X\(\/\/\)[^/].*/{
1254 s//\1/
1255 q
1256 }
1257 /^X\(\/\/\)$/{
1258 s//\1/
1259 q
1260 }
1261 /^X\(\/\).*/{
1262 s//\1/
1263 q
1264 }
1265 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001266 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001267 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001268 srcdir=..
1269 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001270else
1271 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001273if test ! -r "$srcdir/$ac_unique_file"; then
1274 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Matthias Kloseb9621712010-04-24 17:59:49 +00001275 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1278ac_abs_confdir=`(
Matthias Kloseb9621712010-04-24 17:59:49 +00001279 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001280 pwd)`
1281# When building in place, set srcdir=.
1282if test "$ac_abs_confdir" = "$ac_pwd"; then
1283 srcdir=.
1284fi
1285# Remove unnecessary trailing slashes from srcdir.
1286# Double slashes in file names in object file debugging info
1287# mess up M-x gdb in Emacs.
1288case $srcdir in
1289*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1290esac
1291for ac_var in $ac_precious_vars; do
1292 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1293 eval ac_env_${ac_var}_value=\$${ac_var}
1294 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1295 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1296done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001297
Martin v. Löwis11437992002-04-12 09:54:03 +00001298#
1299# Report the --help message.
1300#
1301if test "$ac_init_help" = "long"; then
1302 # Omit some internal or obsolete options to make the list less imposing.
1303 # This message is too long to be a string in the A/UX 3.1 sh.
1304 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001305\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001306
1307Usage: $0 [OPTION]... [VAR=VALUE]...
1308
1309To assign environment variables (e.g., CC, CFLAGS...), specify them as
1310VAR=VALUE. See below for descriptions of some of the useful variables.
1311
1312Defaults for the options are specified in brackets.
1313
1314Configuration:
1315 -h, --help display this help and exit
1316 --help=short display options specific to this package
1317 --help=recursive display the short help of all the included packages
1318 -V, --version display version information and exit
1319 -q, --quiet, --silent do not print \`checking...' messages
1320 --cache-file=FILE cache test results in FILE [disabled]
1321 -C, --config-cache alias for \`--cache-file=config.cache'
1322 -n, --no-create do not create output files
1323 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1324
Martin v. Löwis11437992002-04-12 09:54:03 +00001325Installation directories:
1326 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001327 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001328 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001329 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001330
1331By default, \`make install' will install all the files in
1332\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1333an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1334for instance \`--prefix=\$HOME'.
1335
1336For better control, use the options below.
1337
1338Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001339 --bindir=DIR user executables [EPREFIX/bin]
1340 --sbindir=DIR system admin executables [EPREFIX/sbin]
1341 --libexecdir=DIR program executables [EPREFIX/libexec]
1342 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1343 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1344 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1345 --libdir=DIR object code libraries [EPREFIX/lib]
1346 --includedir=DIR C header files [PREFIX/include]
1347 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1348 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1349 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1350 --infodir=DIR info documentation [DATAROOTDIR/info]
1351 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1352 --mandir=DIR man documentation [DATAROOTDIR/man]
1353 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1354 --htmldir=DIR html documentation [DOCDIR]
1355 --dvidir=DIR dvi documentation [DOCDIR]
1356 --pdfdir=DIR pdf documentation [DOCDIR]
1357 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001358_ACEOF
1359
1360 cat <<\_ACEOF
1361_ACEOF
1362fi
1363
1364if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001365 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001366 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001367 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001368 cat <<\_ACEOF
1369
1370Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001371 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001372 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1373 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001374 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001375 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001376 --enable-framework[=INSTALLDIR]
1377 Build (MacOSX|Darwin) framework
1378 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001379 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001380 --enable-ipv6 Enable ipv6 (with ipv4) support
1381 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001382 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001383 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001384
1385Optional Packages:
1386 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1387 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001388 --with-universal-archs=ARCH
1389 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001390 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001391 --with-framework-name=FRAMEWORK
1392 specify an alternate name of the framework built
1393 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001394 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001395 --with-cxx-main=<compiler>
1396 compile main() and link python executable with C++
1397 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001398 --with-suffix=.exe set executable suffix
1399 --with-pydebug build with Py_DEBUG defined
1400 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001401 --with-system-expat build pyexpat module using an installed expat
1402 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001403 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001404 --with-dbmliborder=db1:db2:...
1405 order to check db backends for dbm. Valid value is a
1406 colon separated string with the backend names
1407 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001408 --with-signal-module disable/enable signal module
1409 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1410 --with(out)-threads[=DIRECTORY]
1411 disable/enable thread support
1412 --with(out)-thread[=DIRECTORY]
1413 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001414 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001415 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001416 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001417 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001418 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --with-fpectl enable SIGFPE catching
1420 --with-libm=STRING math library
1421 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001422 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001423 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1424 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001425
1426Some influential environment variables:
1427 CC C compiler command
1428 CFLAGS C compiler flags
1429 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1430 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001431 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001432 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001433 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 CPP C preprocessor
1435
1436Use these variables to override the choices made by `configure' or to help
1437it to find libraries and programs with nonstandard names/locations.
1438
Georg Brandle2e15612009-05-20 18:25:10 +00001439Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001440_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001441ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001442fi
1443
1444if test "$ac_init_help" = "recursive"; then
1445 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001446 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001447 test -d "$ac_dir" ||
1448 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1449 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001450 ac_builddir=.
1451
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001452case "$ac_dir" in
1453.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1454*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001455 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001456 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001457 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001458 case $ac_top_builddir_sub in
1459 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1460 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1461 esac ;;
1462esac
1463ac_abs_top_builddir=$ac_pwd
1464ac_abs_builddir=$ac_pwd$ac_dir_suffix
1465# for backward compatibility:
1466ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001467
1468case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001469 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001471 ac_top_srcdir=$ac_top_builddir_sub
1472 ac_abs_top_srcdir=$ac_pwd ;;
1473 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001475 ac_top_srcdir=$srcdir
1476 ac_abs_top_srcdir=$srcdir ;;
1477 *) # Relative name.
1478 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1479 ac_top_srcdir=$ac_top_build_prefix$srcdir
1480 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001481esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001482ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001484 cd "$ac_dir" || { ac_status=$?; continue; }
1485 # Check for guested configure.
1486 if test -f "$ac_srcdir/configure.gnu"; then
1487 echo &&
1488 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1489 elif test -f "$ac_srcdir/configure"; then
1490 echo &&
1491 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001492 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001493 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494 fi || ac_status=$?
1495 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001496 done
1497fi
1498
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001499test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001500if $ac_init_version; then
1501 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001502python configure 3.2
Matthias Kloseb9621712010-04-24 17:59:49 +00001503generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001504
Matthias Kloseb9621712010-04-24 17:59:49 +00001505Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001506This configure script is free software; the Free Software Foundation
1507gives unlimited permission to copy, distribute and modify it.
1508_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001509 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001511
1512## ------------------------ ##
1513## Autoconf initialization. ##
1514## ------------------------ ##
1515
1516# ac_fn_c_try_compile LINENO
1517# --------------------------
1518# Try to compile conftest.$ac_ext, and return whether this succeeded.
1519ac_fn_c_try_compile ()
1520{
1521 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1522 rm -f conftest.$ac_objext
1523 if { { ac_try="$ac_compile"
1524case "(($ac_try" in
1525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1526 *) ac_try_echo=$ac_try;;
1527esac
1528eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1529$as_echo "$ac_try_echo"; } >&5
1530 (eval "$ac_compile") 2>conftest.err
1531 ac_status=$?
1532 if test -s conftest.err; then
1533 grep -v '^ *+' conftest.err >conftest.er1
1534 cat conftest.er1 >&5
1535 mv -f conftest.er1 conftest.err
1536 fi
1537 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1538 test $ac_status = 0; } && {
1539 test -z "$ac_c_werror_flag" ||
1540 test ! -s conftest.err
1541 } && test -s conftest.$ac_objext; then :
1542 ac_retval=0
1543else
1544 $as_echo "$as_me: failed program was:" >&5
1545sed 's/^/| /' conftest.$ac_ext >&5
1546
1547 ac_retval=1
1548fi
1549 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1550 as_fn_set_status $ac_retval
1551
1552} # ac_fn_c_try_compile
1553
1554# ac_fn_c_try_cpp LINENO
1555# ----------------------
1556# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1557ac_fn_c_try_cpp ()
1558{
1559 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1560 if { { ac_try="$ac_cpp conftest.$ac_ext"
1561case "(($ac_try" in
1562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1563 *) ac_try_echo=$ac_try;;
1564esac
1565eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1566$as_echo "$ac_try_echo"; } >&5
1567 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1568 ac_status=$?
1569 if test -s conftest.err; then
1570 grep -v '^ *+' conftest.err >conftest.er1
1571 cat conftest.er1 >&5
1572 mv -f conftest.er1 conftest.err
1573 fi
1574 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1575 test $ac_status = 0; } >/dev/null && {
1576 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1577 test ! -s conftest.err
1578 }; then :
1579 ac_retval=0
1580else
1581 $as_echo "$as_me: failed program was:" >&5
1582sed 's/^/| /' conftest.$ac_ext >&5
1583
1584 ac_retval=1
1585fi
1586 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1587 as_fn_set_status $ac_retval
1588
1589} # ac_fn_c_try_cpp
1590
1591# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1592# -------------------------------------------------------
1593# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1594# the include files in INCLUDES and setting the cache variable VAR
1595# accordingly.
1596ac_fn_c_check_header_mongrel ()
1597{
1598 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1599 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1601$as_echo_n "checking for $2... " >&6; }
1602if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1603 $as_echo_n "(cached) " >&6
1604fi
1605eval ac_res=\$$3
1606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1607$as_echo "$ac_res" >&6; }
1608else
1609 # Is the header compilable?
1610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1611$as_echo_n "checking $2 usability... " >&6; }
1612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1613/* end confdefs.h. */
1614$4
1615#include <$2>
1616_ACEOF
1617if ac_fn_c_try_compile "$LINENO"; then :
1618 ac_header_compiler=yes
1619else
1620 ac_header_compiler=no
1621fi
1622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1624$as_echo "$ac_header_compiler" >&6; }
1625
1626# Is the header present?
1627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1628$as_echo_n "checking $2 presence... " >&6; }
1629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1630/* end confdefs.h. */
1631#include <$2>
1632_ACEOF
1633if ac_fn_c_try_cpp "$LINENO"; then :
1634 ac_header_preproc=yes
1635else
1636 ac_header_preproc=no
1637fi
1638rm -f conftest.err conftest.$ac_ext
1639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1640$as_echo "$ac_header_preproc" >&6; }
1641
1642# So? What about this header?
1643case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1644 yes:no: )
1645 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1646$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1647 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1648$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1649 ;;
1650 no:yes:* )
1651 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1652$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1654$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1655 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1656$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1657 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1658$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1659 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1660$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1661( cat <<\_ASBOX
1662## -------------------------------------- ##
1663## Report this to http://bugs.python.org/ ##
1664## -------------------------------------- ##
1665_ASBOX
1666 ) | sed "s/^/$as_me: WARNING: /" >&2
1667 ;;
1668esac
1669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1670$as_echo_n "checking for $2... " >&6; }
1671if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1672 $as_echo_n "(cached) " >&6
1673else
1674 eval "$3=\$ac_header_compiler"
1675fi
1676eval ac_res=\$$3
1677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1678$as_echo "$ac_res" >&6; }
1679fi
1680 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1681
1682} # ac_fn_c_check_header_mongrel
1683
1684# ac_fn_c_try_run LINENO
1685# ----------------------
1686# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1687# that executables *can* be run.
1688ac_fn_c_try_run ()
1689{
1690 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691 if { { ac_try="$ac_link"
1692case "(($ac_try" in
1693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1694 *) ac_try_echo=$ac_try;;
1695esac
1696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1697$as_echo "$ac_try_echo"; } >&5
1698 (eval "$ac_link") 2>&5
1699 ac_status=$?
1700 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1701 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1702 { { case "(($ac_try" in
1703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1704 *) ac_try_echo=$ac_try;;
1705esac
1706eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1707$as_echo "$ac_try_echo"; } >&5
1708 (eval "$ac_try") 2>&5
1709 ac_status=$?
1710 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1711 test $ac_status = 0; }; }; then :
1712 ac_retval=0
1713else
1714 $as_echo "$as_me: program exited with status $ac_status" >&5
1715 $as_echo "$as_me: failed program was:" >&5
1716sed 's/^/| /' conftest.$ac_ext >&5
1717
1718 ac_retval=$ac_status
1719fi
1720 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1721 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1722 as_fn_set_status $ac_retval
1723
1724} # ac_fn_c_try_run
1725
1726# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1727# -------------------------------------------------------
1728# Tests whether HEADER exists and can be compiled using the include files in
1729# INCLUDES, setting the cache variable VAR accordingly.
1730ac_fn_c_check_header_compile ()
1731{
1732 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1734$as_echo_n "checking for $2... " >&6; }
1735if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1736 $as_echo_n "(cached) " >&6
1737else
1738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1739/* end confdefs.h. */
1740$4
1741#include <$2>
1742_ACEOF
1743if ac_fn_c_try_compile "$LINENO"; then :
1744 eval "$3=yes"
1745else
1746 eval "$3=no"
1747fi
1748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1749fi
1750eval ac_res=\$$3
1751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1752$as_echo "$ac_res" >&6; }
1753 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1754
1755} # ac_fn_c_check_header_compile
1756
1757# ac_fn_c_try_link LINENO
1758# -----------------------
1759# Try to link conftest.$ac_ext, and return whether this succeeded.
1760ac_fn_c_try_link ()
1761{
1762 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1763 rm -f conftest.$ac_objext conftest$ac_exeext
1764 if { { ac_try="$ac_link"
1765case "(($ac_try" in
1766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1767 *) ac_try_echo=$ac_try;;
1768esac
1769eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1770$as_echo "$ac_try_echo"; } >&5
1771 (eval "$ac_link") 2>conftest.err
1772 ac_status=$?
1773 if test -s conftest.err; then
1774 grep -v '^ *+' conftest.err >conftest.er1
1775 cat conftest.er1 >&5
1776 mv -f conftest.er1 conftest.err
1777 fi
1778 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1779 test $ac_status = 0; } && {
1780 test -z "$ac_c_werror_flag" ||
1781 test ! -s conftest.err
1782 } && test -s conftest$ac_exeext && {
1783 test "$cross_compiling" = yes ||
1784 $as_test_x conftest$ac_exeext
1785 }; then :
1786 ac_retval=0
1787else
1788 $as_echo "$as_me: failed program was:" >&5
1789sed 's/^/| /' conftest.$ac_ext >&5
1790
1791 ac_retval=1
1792fi
1793 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1794 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1795 # interfere with the next link command; also delete a directory that is
1796 # left behind by Apple's compiler. We do this before executing the actions.
1797 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1798 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1799 as_fn_set_status $ac_retval
1800
1801} # ac_fn_c_try_link
1802
1803# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1804# -------------------------------------------
1805# Tests whether TYPE exists after having included INCLUDES, setting cache
1806# variable VAR accordingly.
1807ac_fn_c_check_type ()
1808{
1809 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1811$as_echo_n "checking for $2... " >&6; }
1812if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1813 $as_echo_n "(cached) " >&6
1814else
1815 eval "$3=no"
1816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1817/* end confdefs.h. */
1818$4
1819int
1820main ()
1821{
1822if (sizeof ($2))
1823 return 0;
1824 ;
1825 return 0;
1826}
1827_ACEOF
1828if ac_fn_c_try_compile "$LINENO"; then :
1829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1830/* end confdefs.h. */
1831$4
1832int
1833main ()
1834{
1835if (sizeof (($2)))
1836 return 0;
1837 ;
1838 return 0;
1839}
1840_ACEOF
1841if ac_fn_c_try_compile "$LINENO"; then :
1842
1843else
1844 eval "$3=yes"
1845fi
1846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1847fi
1848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1849fi
1850eval ac_res=\$$3
1851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1852$as_echo "$ac_res" >&6; }
1853 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1854
1855} # ac_fn_c_check_type
1856
1857# ac_fn_c_find_uintX_t LINENO BITS VAR
1858# ------------------------------------
1859# Finds an unsigned integer type with width BITS, setting cache variable VAR
1860# accordingly.
1861ac_fn_c_find_uintX_t ()
1862{
1863 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1865$as_echo_n "checking for uint$2_t... " >&6; }
1866if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1867 $as_echo_n "(cached) " >&6
1868else
1869 eval "$3=no"
1870 # Order is important - never check a type that is potentially smaller
1871 # than half of the expected target width.
1872 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1873 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1875/* end confdefs.h. */
1876$ac_includes_default
1877int
1878main ()
1879{
1880static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1881test_array [0] = 0
1882
1883 ;
1884 return 0;
1885}
1886_ACEOF
1887if ac_fn_c_try_compile "$LINENO"; then :
1888 case $ac_type in #(
1889 uint$2_t) :
1890 eval "$3=yes" ;; #(
1891 *) :
1892 eval "$3=\$ac_type" ;;
1893esac
1894fi
1895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1896 eval as_val=\$$3
1897 if test "x$as_val" = x""no; then :
1898
1899else
1900 break
1901fi
1902 done
1903fi
1904eval ac_res=\$$3
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1906$as_echo "$ac_res" >&6; }
1907 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1908
1909} # ac_fn_c_find_uintX_t
1910
1911# ac_fn_c_find_intX_t LINENO BITS VAR
1912# -----------------------------------
1913# Finds a signed integer type with width BITS, setting cache variable VAR
1914# accordingly.
1915ac_fn_c_find_intX_t ()
1916{
1917 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1919$as_echo_n "checking for int$2_t... " >&6; }
1920if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1921 $as_echo_n "(cached) " >&6
1922else
1923 eval "$3=no"
1924 # Order is important - never check a type that is potentially smaller
1925 # than half of the expected target width.
1926 for ac_type in int$2_t 'int' 'long int' \
1927 'long long int' 'short int' 'signed char'; do
1928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1929/* end confdefs.h. */
1930$ac_includes_default
1931 enum { N = $2 / 2 - 1 };
1932int
1933main ()
1934{
1935static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
1936test_array [0] = 0
1937
1938 ;
1939 return 0;
1940}
1941_ACEOF
1942if ac_fn_c_try_compile "$LINENO"; then :
1943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1944/* end confdefs.h. */
1945$ac_includes_default
1946 enum { N = $2 / 2 - 1 };
1947int
1948main ()
1949{
1950static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
1951 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1952test_array [0] = 0
1953
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959
1960else
1961 case $ac_type in #(
1962 int$2_t) :
1963 eval "$3=yes" ;; #(
1964 *) :
1965 eval "$3=\$ac_type" ;;
1966esac
1967fi
1968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1969fi
1970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1971 eval as_val=\$$3
1972 if test "x$as_val" = x""no; then :
1973
1974else
1975 break
1976fi
1977 done
1978fi
1979eval ac_res=\$$3
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1981$as_echo "$ac_res" >&6; }
1982 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1983
1984} # ac_fn_c_find_intX_t
1985
1986# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1987# --------------------------------------------
1988# Tries to find the compile-time value of EXPR in a program that includes
1989# INCLUDES, setting VAR accordingly. Returns whether the value could be
1990# computed
1991ac_fn_c_compute_int ()
1992{
1993 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994 if test "$cross_compiling" = yes; then
1995 # Depending upon the size, compute the lo and hi bounds.
1996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1997/* end confdefs.h. */
1998$4
1999int
2000main ()
2001{
2002static int test_array [1 - 2 * !(($2) >= 0)];
2003test_array [0] = 0
2004
2005 ;
2006 return 0;
2007}
2008_ACEOF
2009if ac_fn_c_try_compile "$LINENO"; then :
2010 ac_lo=0 ac_mid=0
2011 while :; do
2012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013/* end confdefs.h. */
2014$4
2015int
2016main ()
2017{
2018static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2019test_array [0] = 0
2020
2021 ;
2022 return 0;
2023}
2024_ACEOF
2025if ac_fn_c_try_compile "$LINENO"; then :
2026 ac_hi=$ac_mid; break
2027else
2028 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2029 if test $ac_lo -le $ac_mid; then
2030 ac_lo= ac_hi=
2031 break
2032 fi
2033 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2034fi
2035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2036 done
2037else
2038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2039/* end confdefs.h. */
2040$4
2041int
2042main ()
2043{
2044static int test_array [1 - 2 * !(($2) < 0)];
2045test_array [0] = 0
2046
2047 ;
2048 return 0;
2049}
2050_ACEOF
2051if ac_fn_c_try_compile "$LINENO"; then :
2052 ac_hi=-1 ac_mid=-1
2053 while :; do
2054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2055/* end confdefs.h. */
2056$4
2057int
2058main ()
2059{
2060static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2061test_array [0] = 0
2062
2063 ;
2064 return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068 ac_lo=$ac_mid; break
2069else
2070 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2071 if test $ac_mid -le $ac_hi; then
2072 ac_lo= ac_hi=
2073 break
2074 fi
2075 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078 done
2079else
2080 ac_lo= ac_hi=
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085# Binary search between lo and hi bounds.
2086while test "x$ac_lo" != "x$ac_hi"; do
2087 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089/* end confdefs.h. */
2090$4
2091int
2092main ()
2093{
2094static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2095test_array [0] = 0
2096
2097 ;
2098 return 0;
2099}
2100_ACEOF
2101if ac_fn_c_try_compile "$LINENO"; then :
2102 ac_hi=$ac_mid
2103else
2104 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2105fi
2106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2107done
2108case $ac_lo in #((
2109?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2110'') ac_retval=1 ;;
2111esac
2112 else
2113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2114/* end confdefs.h. */
2115$4
2116static long int longval () { return $2; }
2117static unsigned long int ulongval () { return $2; }
2118#include <stdio.h>
2119#include <stdlib.h>
2120int
2121main ()
2122{
2123
2124 FILE *f = fopen ("conftest.val", "w");
2125 if (! f)
2126 return 1;
2127 if (($2) < 0)
2128 {
2129 long int i = longval ();
2130 if (i != ($2))
2131 return 1;
2132 fprintf (f, "%ld", i);
2133 }
2134 else
2135 {
2136 unsigned long int i = ulongval ();
2137 if (i != ($2))
2138 return 1;
2139 fprintf (f, "%lu", i);
2140 }
2141 /* Do not output a trailing newline, as this causes \r\n confusion
2142 on some platforms. */
2143 return ferror (f) || fclose (f) != 0;
2144
2145 ;
2146 return 0;
2147}
2148_ACEOF
2149if ac_fn_c_try_run "$LINENO"; then :
2150 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2151else
2152 ac_retval=1
2153fi
2154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2155 conftest.$ac_objext conftest.beam conftest.$ac_ext
2156rm -f conftest.val
2157
2158 fi
2159 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2160 as_fn_set_status $ac_retval
2161
2162} # ac_fn_c_compute_int
2163
2164# ac_fn_c_check_func LINENO FUNC VAR
2165# ----------------------------------
2166# Tests whether FUNC exists, setting the cache variable VAR accordingly
2167ac_fn_c_check_func ()
2168{
2169 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2171$as_echo_n "checking for $2... " >&6; }
2172if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2173 $as_echo_n "(cached) " >&6
2174else
2175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2176/* end confdefs.h. */
2177/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2178 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2179#define $2 innocuous_$2
2180
2181/* System header to define __stub macros and hopefully few prototypes,
2182 which can conflict with char $2 (); below.
2183 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2184 <limits.h> exists even on freestanding compilers. */
2185
2186#ifdef __STDC__
2187# include <limits.h>
2188#else
2189# include <assert.h>
2190#endif
2191
2192#undef $2
2193
2194/* Override any GCC internal prototype to avoid an error.
2195 Use char because int might match the return type of a GCC
2196 builtin and then its argument prototype would still apply. */
2197#ifdef __cplusplus
2198extern "C"
2199#endif
2200char $2 ();
2201/* The GNU C library defines this for functions which it implements
2202 to always fail with ENOSYS. Some functions are actually named
2203 something starting with __ and the normal name is an alias. */
2204#if defined __stub_$2 || defined __stub___$2
2205choke me
2206#endif
2207
2208int
2209main ()
2210{
2211return $2 ();
2212 ;
2213 return 0;
2214}
2215_ACEOF
2216if ac_fn_c_try_link "$LINENO"; then :
2217 eval "$3=yes"
2218else
2219 eval "$3=no"
2220fi
2221rm -f core conftest.err conftest.$ac_objext \
2222 conftest$ac_exeext conftest.$ac_ext
2223fi
2224eval ac_res=\$$3
2225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2226$as_echo "$ac_res" >&6; }
2227 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2228
2229} # ac_fn_c_check_func
2230
2231# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2232# ----------------------------------------------------
2233# Tries to find if the field MEMBER exists in type AGGR, after including
2234# INCLUDES, setting cache variable VAR accordingly.
2235ac_fn_c_check_member ()
2236{
2237 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2239$as_echo_n "checking for $2.$3... " >&6; }
2240if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2241 $as_echo_n "(cached) " >&6
2242else
2243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2244/* end confdefs.h. */
2245$5
2246int
2247main ()
2248{
2249static $2 ac_aggr;
2250if (ac_aggr.$3)
2251return 0;
2252 ;
2253 return 0;
2254}
2255_ACEOF
2256if ac_fn_c_try_compile "$LINENO"; then :
2257 eval "$4=yes"
2258else
2259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2260/* end confdefs.h. */
2261$5
2262int
2263main ()
2264{
2265static $2 ac_aggr;
2266if (sizeof ac_aggr.$3)
2267return 0;
2268 ;
2269 return 0;
2270}
2271_ACEOF
2272if ac_fn_c_try_compile "$LINENO"; then :
2273 eval "$4=yes"
2274else
2275 eval "$4=no"
2276fi
2277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2278fi
2279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2280fi
2281eval ac_res=\$$4
2282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2283$as_echo "$ac_res" >&6; }
2284 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2285
2286} # ac_fn_c_check_member
2287
2288# ac_fn_c_check_decl LINENO SYMBOL VAR
2289# ------------------------------------
2290# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2291ac_fn_c_check_decl ()
2292{
2293 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2295$as_echo_n "checking whether $2 is declared... " >&6; }
2296if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2297 $as_echo_n "(cached) " >&6
2298else
2299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2300/* end confdefs.h. */
2301$4
2302int
2303main ()
2304{
2305#ifndef $2
2306 (void) $2;
2307#endif
2308
2309 ;
2310 return 0;
2311}
2312_ACEOF
2313if ac_fn_c_try_compile "$LINENO"; then :
2314 eval "$3=yes"
2315else
2316 eval "$3=no"
2317fi
2318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2319fi
2320eval ac_res=\$$3
2321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2322$as_echo "$ac_res" >&6; }
2323 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2324
2325} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002326cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002327This file contains any messages produced by compilers while
2328running configure, to aid debugging if configure makes a mistake.
2329
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002330It was created by python $as_me 3.2, which was
Matthias Kloseb9621712010-04-24 17:59:49 +00002331generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002332
2333 $ $0 $@
2334
2335_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002336exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002337{
2338cat <<_ASUNAME
2339## --------- ##
2340## Platform. ##
2341## --------- ##
2342
2343hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2344uname -m = `(uname -m) 2>/dev/null || echo unknown`
2345uname -r = `(uname -r) 2>/dev/null || echo unknown`
2346uname -s = `(uname -s) 2>/dev/null || echo unknown`
2347uname -v = `(uname -v) 2>/dev/null || echo unknown`
2348
2349/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2350/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2351
2352/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2353/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2354/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002355/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002356/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2357/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2358/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2359
2360_ASUNAME
2361
2362as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2363for as_dir in $PATH
2364do
2365 IFS=$as_save_IFS
2366 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002367 $as_echo "PATH: $as_dir"
2368 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002369IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002370
2371} >&5
2372
2373cat >&5 <<_ACEOF
2374
2375
2376## ----------- ##
2377## Core tests. ##
2378## ----------- ##
2379
2380_ACEOF
2381
2382
2383# Keep a trace of the command line.
2384# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002385# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002386# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002387# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002388ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002389ac_configure_args0=
2390ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002391ac_must_keep_next=false
2392for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002393do
Skip Montanaro6dead952003-09-25 14:50:04 +00002394 for ac_arg
2395 do
2396 case $ac_arg in
2397 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2398 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2399 | -silent | --silent | --silen | --sile | --sil)
2400 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002401 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002402 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002403 esac
2404 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002405 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002406 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002407 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002409 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002410 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002411 case $ac_arg in
2412 *=* | --config-cache | -C | -disable-* | --disable-* \
2413 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2414 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2415 | -with-* | --with-* | -without-* | --without-* | --x)
2416 case "$ac_configure_args0 " in
2417 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2418 esac
2419 ;;
2420 -* ) ac_must_keep_next=true ;;
2421 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002423 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 ;;
2425 esac
2426 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002427done
Matthias Kloseb9621712010-04-24 17:59:49 +00002428{ ac_configure_args0=; unset ac_configure_args0;}
2429{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002430
2431# When interrupted or exit'd, cleanup temporary files, and complete
2432# config.log. We remove comments because anyway the quotes in there
2433# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002434# WARNING: Use '\'' to represent an apostrophe within the trap.
2435# 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 +00002436trap 'exit_status=$?
2437 # Save into config.log some information that might help in debugging.
2438 {
2439 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002440
Martin v. Löwis11437992002-04-12 09:54:03 +00002441 cat <<\_ASBOX
2442## ---------------- ##
2443## Cache variables. ##
2444## ---------------- ##
2445_ASBOX
2446 echo
2447 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448(
2449 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2450 eval ac_val=\$$ac_var
2451 case $ac_val in #(
2452 *${as_nl}*)
2453 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002454 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2455$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456 esac
2457 case $ac_var in #(
2458 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002459 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2460 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461 esac ;;
2462 esac
2463 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002464 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2466 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 "s/'\''/'\''\\\\'\'''\''/g;
2469 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2470 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002471 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002473 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 esac |
2475 sort
2476)
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002478
2479 cat <<\_ASBOX
2480## ----------------- ##
2481## Output variables. ##
2482## ----------------- ##
2483_ASBOX
2484 echo
2485 for ac_var in $ac_subst_vars
2486 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 eval ac_val=\$$ac_var
2488 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002489 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002491 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 done | sort
2493 echo
2494
2495 if test -n "$ac_subst_files"; then
2496 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497## ------------------- ##
2498## File substitutions. ##
2499## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002500_ASBOX
2501 echo
2502 for ac_var in $ac_subst_files
2503 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 eval ac_val=\$$ac_var
2505 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002506 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 done | sort
2510 echo
2511 fi
2512
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 if test -s confdefs.h; then
2514 cat <<\_ASBOX
2515## ----------- ##
2516## confdefs.h. ##
2517## ----------- ##
2518_ASBOX
2519 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 echo
2522 fi
2523 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 $as_echo "$as_me: caught signal $ac_signal"
2525 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 rm -f core *.core core.conftest.* &&
2528 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002531for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002533done
2534ac_signal=0
2535
2536# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002538
Matthias Kloseb9621712010-04-24 17:59:49 +00002539$as_echo "/* confdefs.h */" > confdefs.h
2540
Martin v. Löwis11437992002-04-12 09:54:03 +00002541# Predefined preprocessor variables.
2542
2543cat >>confdefs.h <<_ACEOF
2544#define PACKAGE_NAME "$PACKAGE_NAME"
2545_ACEOF
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2549_ACEOF
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_VERSION "$PACKAGE_VERSION"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_STRING "$PACKAGE_STRING"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2561_ACEOF
2562
Matthias Kloseb9621712010-04-24 17:59:49 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_URL "$PACKAGE_URL"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567
2568# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002569# Prefer an explicitly selected file to automatically selected ones.
2570ac_site_file1=NONE
2571ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572if test -n "$CONFIG_SITE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002573 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002575 ac_site_file1=$prefix/share/config.site
2576 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577else
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 ac_site_file1=$ac_default_prefix/share/config.site
2579 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002581for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582do
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 test "x$ac_site_file" = xNONE && continue
2584 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2585 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2586$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002588 . "$ac_site_file"
2589 fi
2590done
2591
2592if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 # Some versions of bash will fail to source /dev/null (special files
2594 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2595 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2597$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2600 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002601 esac
2602 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002603else
Matthias Kloseb9621712010-04-24 17:59:49 +00002604 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2605$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 >$cache_file
2607fi
2608
2609# Check that the precious variables saved in the cache have kept the same
2610# value.
2611ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002612for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2614 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2616 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 case $ac_old_set,$ac_new_set in
2618 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2620$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 +00002621 ac_cache_corrupted=: ;;
2622 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002623 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2624$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 ac_cache_corrupted=: ;;
2626 ,);;
2627 *)
2628 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002629 # differences in whitespace do not lead to failure.
2630 ac_old_val_w=`echo x $ac_old_val`
2631 ac_new_val_w=`echo x $ac_new_val`
2632 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2633 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2634$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2635 ac_cache_corrupted=:
2636 else
2637 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2638$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2639 eval $ac_var=\$ac_old_val
2640 fi
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2642$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2644$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 fi;;
2646 esac
2647 # Pass precious variables to config.status.
2648 if test "$ac_new_set" = set; then
2649 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002650 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 *) ac_arg=$ac_var=$ac_new_val ;;
2652 esac
2653 case " $ac_configure_args " in
2654 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002655 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 esac
2657 fi
2658done
2659if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002660 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2661$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2663$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2664 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002666## -------------------- ##
2667## Main body of script. ##
2668## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002669
Guido van Rossum7f43da71994-08-01 12:15:30 +00002670ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002671ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002672ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2673ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2674ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002675
Guido van Rossum627b2d71993-12-24 10:39:16 +00002676
Michael W. Hudson54241132001-12-07 15:38:26 +00002677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002678ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002679
2680
Martin v. Löwis11437992002-04-12 09:54:03 +00002681
Benjamin Petersond23f8222009-04-05 19:13:16 +00002682if test "$prefix" != "/"; then
2683 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2684fi
2685
2686
Martin v. Löwis11437992002-04-12 09:54:03 +00002687
2688
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002689# We don't use PACKAGE_ variables, and they cause conflicts
2690# with other autoconf-based packages that include Python.h
2691grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2692rm confdefs.h
2693mv confdefs.h.new confdefs.h
2694
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002695
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002696VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002697
Martin v. Löwis1142de32002-03-29 16:28:31 +00002698
2699SOVERSION=1.0
2700
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002701# The later defininition of _XOPEN_SOURCE disables certain features
2702# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2703
Matthias Kloseb9621712010-04-24 17:59:49 +00002704$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002705
2706
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002707# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2708# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2709# them.
2710
Matthias Kloseb9621712010-04-24 17:59:49 +00002711$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002712
2713
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002714# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2715# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2716# them.
2717
Matthias Kloseb9621712010-04-24 17:59:49 +00002718$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002719
2720
Martin v. Löwisd6320502004-08-12 13:45:08 +00002721# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2722# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2723
Matthias Kloseb9621712010-04-24 17:59:49 +00002724$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002725
2726
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002727# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2728# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2729# them.
2730
Matthias Kloseb9621712010-04-24 17:59:49 +00002731$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002732
2733
2734
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002735define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002736
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002737# Arguments passed to configure.
2738
2739CONFIG_ARGS="$ac_configure_args"
2740
Matthias Kloseb9621712010-04-24 17:59:49 +00002741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2742$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002743# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002744if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002745 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002746 case $enableval in
2747 yes)
2748 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002749 if test ! -d "${enableval}"
2750 then
2751 enableval=/
2752 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002753 ;;
2754 esac
2755 case $enableval in
2756 no)
2757 UNIVERSALSDK=
2758 enable_universalsdk=
2759 ;;
2760 *)
2761 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002762 if test ! -d "${UNIVERSALSDK}"
2763 then
Matthias Kloseb9621712010-04-24 17:59:49 +00002764 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002765 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002766 ;;
2767 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002768
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002769
Thomas Wouters477c8d52006-05-27 19:21:47 +00002770else
2771
2772 UNIVERSALSDK=
2773 enable_universalsdk=
2774
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002775fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002776
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002777if test -n "${UNIVERSALSDK}"
2778then
Matthias Kloseb9621712010-04-24 17:59:49 +00002779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2780$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002781else
Matthias Kloseb9621712010-04-24 17:59:49 +00002782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2783$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002784fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002785
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002786
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002787
2788
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002789UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002790
Matthias Kloseb9621712010-04-24 17:59:49 +00002791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2792$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002793
2794# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002795if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002796 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2798$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002799 UNIVERSAL_ARCHS="$withval"
2800
2801else
2802
Matthias Kloseb9621712010-04-24 17:59:49 +00002803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2804$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002805
2806fi
2807
2808
2809
2810
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002811
2812# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002813if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002814 withval=$with_framework_name;
2815 PYTHONFRAMEWORK=${withval}
2816 PYTHONFRAMEWORKDIR=${withval}.framework
2817 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2818
2819else
2820
2821 PYTHONFRAMEWORK=Python
2822 PYTHONFRAMEWORKDIR=Python.framework
2823 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2824
2825fi
2826
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002827# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002828if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002829 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002830 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002831 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002832 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002833 esac
2834 case $enableval in
2835 no)
2836 PYTHONFRAMEWORK=
2837 PYTHONFRAMEWORKDIR=no-framework
2838 PYTHONFRAMEWORKPREFIX=
2839 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002840 FRAMEWORKINSTALLFIRST=
2841 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002842 FRAMEWORKALTINSTALLFIRST=
2843 FRAMEWORKALTINSTALLLAST=
2844 if test "x${prefix}" = "xNONE"; then
2845 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2846 else
2847 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2848 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002849 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002850 ;;
2851 *)
2852 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002853 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002854 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002855 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002856 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2857 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002858
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002859 if test "x${prefix}" = "xNONE" ; then
2860 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2861 else
2862 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2863 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002864 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002865
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002866 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002867 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002868 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002870 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002871
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002872 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2873
2874 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2875
Jack Jansene578a632001-08-15 01:27:14 +00002876 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002877
Guido van Rossum563e7081996-09-10 18:20:48 +00002878else
Martin v. Löwis11437992002-04-12 09:54:03 +00002879
Jack Jansene578a632001-08-15 01:27:14 +00002880 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002881 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002882 PYTHONFRAMEWORKPREFIX=
2883 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002884 FRAMEWORKINSTALLFIRST=
2885 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002886 FRAMEWORKALTINSTALLFIRST=
2887 FRAMEWORKALTINSTALLLAST=
2888 if test "x${prefix}" = "xNONE" ; then
2889 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2890 else
2891 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2892 fi
Jack Jansene578a632001-08-15 01:27:14 +00002893 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002894
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002895
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002896fi
2897
Thomas Wouters477c8d52006-05-27 19:21:47 +00002898
2899
Michael W. Hudson54241132001-12-07 15:38:26 +00002900
2901
2902
2903
Jack Jansene578a632001-08-15 01:27:14 +00002904
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002905
2906
2907
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002908
Jack Jansene578a632001-08-15 01:27:14 +00002909##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002910## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002911## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002912##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002913# Set name for machine-dependent library files
2914
Matthias Kloseb9621712010-04-24 17:59:49 +00002915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2916$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002917if test -z "$MACHDEP"
2918then
Guido van Rossum563e7081996-09-10 18:20:48 +00002919 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002920 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002921 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002922 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002923 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002924 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002925 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002926 ac_md_system=`echo $ac_sys_system |
2927 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2928 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002929 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002930 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002931
Guido van Rossum07397971997-04-29 21:49:50 +00002932 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002933 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002934 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002935 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002936 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002937 esac
2938fi
Guido van Rossum91922671997-10-09 20:24:13 +00002939
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002940# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2941# disable features if it is defined, without any means to access these
2942# features as extensions. For these systems, we skip the definition of
2943# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2944# some feature, make sure there is no alternative way to access this
2945# feature. Also, when using wildcards, make sure you have verified the
2946# need for not defining _XOPEN_SOURCE on all systems matching the
2947# wildcard, and that the wildcard does not include future systems
2948# (which may remove their limitations).
2949case $ac_sys_system/$ac_sys_release in
2950 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2951 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002952 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002953 # In addition, Stefan Krah confirms that issue #1244610 exists through
2954 # OpenBSD 4.6, but is fixed in 4.7.
2955 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002956 define_xopen_source=no
2957 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2958 # also defined. This can be overridden by defining _BSD_SOURCE
2959 # As this has a different meaning on Linux, only define it on OpenBSD
2960
Matthias Kloseb9621712010-04-24 17:59:49 +00002961$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002962
2963 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002964 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00002965 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2966 # also defined. This can be overridden by defining _BSD_SOURCE
2967 # As this has a different meaning on Linux, only define it on OpenBSD
2968
Matthias Kloseb9621712010-04-24 17:59:49 +00002969$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00002970
2971 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002972 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2973 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2974 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002975 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 +00002976 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002977 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2978 # of union __?sigval. Reported by Stuart Bishop.
2979 SunOS/5.6)
2980 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002981 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2982 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002983 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002984 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002985 define_xopen_source=no;;
2986 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002987 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002988 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002989 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002990 # On FreeBSD 4, the math functions C89 does not cover are never defined
2991 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2992 FreeBSD/4.*)
2993 define_xopen_source=no;;
2994 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2995 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2996 # identifies itself as Darwin/7.*
2997 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2998 # disables platform specific features beyond repair.
2999 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3000 # has no effect, don't bother defining them
3001 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003002 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003003 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003004 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003005 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3006 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3007 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003008 AIX/4)
3009 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003010 AIX/5)
3011 if test `uname -r` -eq 1; then
3012 define_xopen_source=no
3013 fi
3014 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003015 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3016 # defining NI_NUMERICHOST.
3017 QNX/6.3.2)
3018 define_xopen_source=no
3019 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003020
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003021esac
3022
3023if test $define_xopen_source = yes
3024then
Skip Montanarof0d5f792004-08-15 14:08:23 +00003025 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
3026 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00003027 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
3028 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00003029 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00003030 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00003031
Matthias Kloseb9621712010-04-24 17:59:49 +00003032$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
Skip Montanarof0d5f792004-08-15 14:08:23 +00003033
3034 ;;
3035 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003036
Matthias Kloseb9621712010-04-24 17:59:49 +00003037$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003038
Skip Montanarof0d5f792004-08-15 14:08:23 +00003039 ;;
3040 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003041
3042 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3043 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3044 # several APIs are not declared. Since this is also needed in some
3045 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00003046 # except for Solaris 10, where it must not be defined,
3047 # as it implies XPG4.2
3048 case $ac_sys_system/$ac_sys_release in
3049 SunOS/5.10)
3050 ;;
3051 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003052
Matthias Kloseb9621712010-04-24 17:59:49 +00003053$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003054
Martin v. Löwis7dece662005-11-26 11:38:24 +00003055 ;;
3056 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003057
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003058
Matthias Kloseb9621712010-04-24 17:59:49 +00003059$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003060
3061
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003062fi
3063
Guido van Rossum91922671997-10-09 20:24:13 +00003064#
3065# SGI compilers allow the specification of the both the ABI and the
3066# ISA on the command line. Depending on the values of these switches,
3067# different and often incompatable code will be generated.
3068#
3069# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3070# thus supply support for various ABI/ISA combinations. The MACHDEP
3071# variable is also adjusted.
3072#
3073
3074if test ! -z "$SGI_ABI"
3075then
3076 CC="cc $SGI_ABI"
3077 LDFLAGS="$SGI_ABI $LDFLAGS"
3078 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3079fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3081$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003082
Jack Jansen6b08a402004-06-03 12:41:45 +00003083# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3084# it may influence the way we can build extensions, so distutils
3085# needs to check it
3086
Thomas Wouters477c8d52006-05-27 19:21:47 +00003087
Jack Jansen6b08a402004-06-03 12:41:45 +00003088CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003089EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003090
Matthias Kloseb9621712010-04-24 17:59:49 +00003091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3092$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003093ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3095$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003096
Guido van Rossum627b2d71993-12-24 10:39:16 +00003097# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003098
3099# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3100# for debug/optimization stuff. BASECFLAGS is for flags that are required
3101# just to get things to compile and link. Users are free to override OPT
3102# when running configure or make. The build should not break if they do.
3103# BASECFLAGS should generally not be messed with, however.
3104
3105# XXX shouldn't some/most/all of this code be merged with the stuff later
3106# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3108$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003109
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003110# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003111if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003112 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003113 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003114 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003115 without_gcc=yes;;
3116 yes) CC=gcc
3117 without_gcc=no;;
3118 *) CC=$withval
3119 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003120 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003121else
Martin v. Löwis11437992002-04-12 09:54:03 +00003122
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003123 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003124 AIX*) CC=cc_r
3125 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003126 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003127 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003128fi
3129
Matthias Kloseb9621712010-04-24 17:59:49 +00003130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3131$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003132
Guido van Rossum8b131c51995-03-09 14:10:13 +00003133# If the user switches compilers, we can't believe the cache
3134if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3135then
Matthias Kloseb9621712010-04-24 17:59:49 +00003136 as_fn_error "cached CC is different -- throw away $cache_file
3137(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003138fi
3139
Victor Stinner00d6a1d2010-03-25 01:02:29 +00003140save_CFLAGS=$CFLAGS
Martin v. Löwis11437992002-04-12 09:54:03 +00003141ac_ext=c
3142ac_cpp='$CPP $CPPFLAGS'
3143ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3144ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3145ac_compiler_gnu=$ac_cv_c_compiler_gnu
3146if test -n "$ac_tool_prefix"; then
3147 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3148set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3150$as_echo_n "checking for $ac_word... " >&6; }
3151if test "${ac_cv_prog_CC+set}" = set; then :
3152 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003153else
3154 if test -n "$CC"; then
3155 ac_cv_prog_CC="$CC" # Let the user override the test.
3156else
Martin v. Löwis11437992002-04-12 09:54:03 +00003157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3158for as_dir in $PATH
3159do
3160 IFS=$as_save_IFS
3161 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003162 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003163 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 +00003164 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003165 $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 +00003166 break 2
3167 fi
3168done
Matthias Kloseb9621712010-04-24 17:59:49 +00003169 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003170IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003171
Jack Jansendd19cf82001-12-06 22:36:17 +00003172fi
3173fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003174CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003175if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3177$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003178else
Matthias Kloseb9621712010-04-24 17:59:49 +00003179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3180$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003181fi
3182
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003183
Martin v. Löwis11437992002-04-12 09:54:03 +00003184fi
3185if test -z "$ac_cv_prog_CC"; then
3186 ac_ct_CC=$CC
3187 # Extract the first word of "gcc", so it can be a program name with args.
3188set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3190$as_echo_n "checking for $ac_word... " >&6; }
3191if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3192 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003193else
3194 if test -n "$ac_ct_CC"; then
3195 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3196else
3197as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3198for as_dir in $PATH
3199do
3200 IFS=$as_save_IFS
3201 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003202 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003203 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 +00003204 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003205 $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 +00003206 break 2
3207 fi
3208done
Matthias Kloseb9621712010-04-24 17:59:49 +00003209 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003210IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003211
3212fi
3213fi
3214ac_ct_CC=$ac_cv_prog_ac_ct_CC
3215if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3217$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003218else
Matthias Kloseb9621712010-04-24 17:59:49 +00003219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3220$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003221fi
3222
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003223 if test "x$ac_ct_CC" = x; then
3224 CC=""
3225 else
3226 case $cross_compiling:$ac_tool_warned in
3227yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003228{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3229$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003230ac_tool_warned=yes ;;
3231esac
3232 CC=$ac_ct_CC
3233 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003234else
3235 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003236fi
3237
Jack Jansendd19cf82001-12-06 22:36:17 +00003238if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003239 if test -n "$ac_tool_prefix"; then
3240 # 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 +00003241set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3243$as_echo_n "checking for $ac_word... " >&6; }
3244if test "${ac_cv_prog_CC+set}" = set; then :
3245 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003246else
3247 if test -n "$CC"; then
3248 ac_cv_prog_CC="$CC" # Let the user override the test.
3249else
Martin v. Löwis11437992002-04-12 09:54:03 +00003250as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3251for as_dir in $PATH
3252do
3253 IFS=$as_save_IFS
3254 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003255 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003256 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 +00003257 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003258 $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 +00003259 break 2
3260 fi
3261done
Matthias Kloseb9621712010-04-24 17:59:49 +00003262 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003263IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003264
3265fi
3266fi
3267CC=$ac_cv_prog_CC
3268if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3270$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003271else
Matthias Kloseb9621712010-04-24 17:59:49 +00003272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3273$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003274fi
3275
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003276
Martin v. Löwis11437992002-04-12 09:54:03 +00003277 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003278fi
3279if test -z "$CC"; then
3280 # Extract the first word of "cc", so it can be a program name with args.
3281set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3283$as_echo_n "checking for $ac_word... " >&6; }
3284if test "${ac_cv_prog_CC+set}" = set; then :
3285 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003286else
3287 if test -n "$CC"; then
3288 ac_cv_prog_CC="$CC" # Let the user override the test.
3289else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003290 ac_prog_rejected=no
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 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3299 ac_prog_rejected=yes
3300 continue
3301 fi
3302 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003303 $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 +00003304 break 2
3305 fi
3306done
Matthias Kloseb9621712010-04-24 17:59:49 +00003307 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003308IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003309
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003310if test $ac_prog_rejected = yes; then
3311 # We found a bogon in the path, so make sure we never use it.
3312 set dummy $ac_cv_prog_CC
3313 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003314 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003315 # We chose a different compiler from the bogus one.
3316 # However, it has the same basename, so the bogon will be chosen
3317 # first if we set CC to just the basename; use the full file name.
3318 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003319 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003320 fi
3321fi
3322fi
3323fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003324CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003325if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3327$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003328else
Matthias Kloseb9621712010-04-24 17:59:49 +00003329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3330$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003331fi
3332
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003333
Martin v. Löwis11437992002-04-12 09:54:03 +00003334fi
3335if test -z "$CC"; then
3336 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003337 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003338 do
3339 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3340set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3342$as_echo_n "checking for $ac_word... " >&6; }
3343if test "${ac_cv_prog_CC+set}" = set; then :
3344 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003345else
3346 if test -n "$CC"; then
3347 ac_cv_prog_CC="$CC" # Let the user override the test.
3348else
Martin v. Löwis11437992002-04-12 09:54:03 +00003349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3350for as_dir in $PATH
3351do
3352 IFS=$as_save_IFS
3353 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003354 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003355 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 +00003356 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003357 $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 +00003358 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003359 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003360done
Matthias Kloseb9621712010-04-24 17:59:49 +00003361 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003362IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003363
3364fi
3365fi
3366CC=$ac_cv_prog_CC
3367if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3369$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003370else
Matthias Kloseb9621712010-04-24 17:59:49 +00003371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3372$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003373fi
3374
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003375
Martin v. Löwis11437992002-04-12 09:54:03 +00003376 test -n "$CC" && break
3377 done
3378fi
3379if test -z "$CC"; then
3380 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003381 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003382do
3383 # Extract the first word of "$ac_prog", so it can be a program name with args.
3384set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3386$as_echo_n "checking for $ac_word... " >&6; }
3387if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3388 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003389else
3390 if test -n "$ac_ct_CC"; then
3391 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3392else
3393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3394for as_dir in $PATH
3395do
3396 IFS=$as_save_IFS
3397 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003398 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003399 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 +00003400 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003401 $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 +00003402 break 2
3403 fi
3404done
Matthias Kloseb9621712010-04-24 17:59:49 +00003405 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003406IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003407
Martin v. Löwis11437992002-04-12 09:54:03 +00003408fi
3409fi
3410ac_ct_CC=$ac_cv_prog_ac_ct_CC
3411if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3413$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003414else
Matthias Kloseb9621712010-04-24 17:59:49 +00003415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3416$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003417fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003418
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003419
Martin v. Löwis11437992002-04-12 09:54:03 +00003420 test -n "$ac_ct_CC" && break
3421done
Michael W. Hudson54241132001-12-07 15:38:26 +00003422
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003423 if test "x$ac_ct_CC" = x; then
3424 CC=""
3425 else
3426 case $cross_compiling:$ac_tool_warned in
3427yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003428{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3429$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003430ac_tool_warned=yes ;;
3431esac
3432 CC=$ac_ct_CC
3433 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003434fi
3435
3436fi
3437
3438
Matthias Kloseb9621712010-04-24 17:59:49 +00003439test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3440$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3441as_fn_error "no acceptable C compiler found in \$PATH
3442See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003443
3444# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003445$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3446set X $ac_compile
3447ac_compiler=$2
3448for ac_option in --version -v -V -qversion; do
3449 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003450case "(($ac_try" in
3451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3452 *) ac_try_echo=$ac_try;;
3453esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003454eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3455$as_echo "$ac_try_echo"; } >&5
3456 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003457 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003458 if test -s conftest.err; then
3459 sed '10a\
3460... rest of stderr output deleted ...
3461 10q' conftest.err >conftest.er1
3462 cat conftest.er1 >&5
3463 fi
3464 rm -f conftest.er1 conftest.err
3465 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3466 test $ac_status = 0; }
3467done
Martin v. Löwis11437992002-04-12 09:54:03 +00003468
Matthias Kloseb9621712010-04-24 17:59:49 +00003469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003470/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003471
Martin v. Löwis11437992002-04-12 09:54:03 +00003472int
3473main ()
3474{
3475
3476 ;
3477 return 0;
3478}
3479_ACEOF
3480ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003481ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003482# Try to create an executable without -o first, disregard a.out.
3483# It will help us diagnose broken compilers, and finding out an intuition
3484# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3486$as_echo_n "checking whether the C compiler works... " >&6; }
3487ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3488
3489# The possible output files:
3490ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3491
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003492ac_rmfiles=
3493for ac_file in $ac_files
3494do
3495 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003496 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003497 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3498 esac
3499done
3500rm -f $ac_rmfiles
3501
Matthias Kloseb9621712010-04-24 17:59:49 +00003502if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003503case "(($ac_try" in
3504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3505 *) ac_try_echo=$ac_try;;
3506esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003507eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3508$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003509 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003511 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3512 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003513 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3514# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3515# in a Makefile. We should not override ac_cv_exeext if it was cached,
3516# so that the user can short-circuit this test for compilers unknown to
3517# Autoconf.
3518for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003519do
3520 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003521 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003522 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003523 ;;
3524 [ab].out )
3525 # We found the default executable, but exeext='' is most
3526 # certainly right.
3527 break;;
3528 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003529 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003530 then :; else
3531 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3532 fi
3533 # We set ac_cv_exeext here because the later test for it is not
3534 # safe: cross compilers may not add the suffix if given an `-o'
3535 # argument, so we may need to know it at that point already.
3536 # Even if this section looks crufty: it has the advantage of
3537 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003538 break;;
3539 * )
3540 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003541 esac
3542done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003543test "$ac_cv_exeext" = no && ac_cv_exeext=
3544
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003545else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003546 ac_file=''
3547fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003548if test -z "$ac_file"; then :
3549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3550$as_echo "no" >&6; }
3551$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003552sed 's/^/| /' conftest.$ac_ext >&5
3553
Matthias Kloseb9621712010-04-24 17:59:49 +00003554{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3555$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3556{ as_fn_set_status 77
3557as_fn_error "C compiler cannot create executables
3558See \`config.log' for more details." "$LINENO" 5; }; }
3559else
3560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3561$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3564$as_echo_n "checking for C compiler default output file name... " >&6; }
3565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3566$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003567ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003568
Matthias Kloseb9621712010-04-24 17:59:49 +00003569rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003570ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3572$as_echo_n "checking for suffix of executables... " >&6; }
3573if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003574case "(($ac_try" in
3575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3576 *) ac_try_echo=$ac_try;;
3577esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003578eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3579$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003580 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003581 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003582 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3583 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003584 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3585# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3586# work properly (i.e., refer to `conftest.exe'), while it won't with
3587# `rm'.
3588for ac_file in conftest.exe conftest conftest.*; do
3589 test -f "$ac_file" || continue
3590 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003591 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003592 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3593 break;;
3594 * ) break;;
3595 esac
3596done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003597else
Matthias Kloseb9621712010-04-24 17:59:49 +00003598 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3599$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3600as_fn_error "cannot compute suffix of executables: cannot compile and link
3601See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003603rm -f conftest conftest$ac_cv_exeext
3604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3605$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003606
3607rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003608EXEEXT=$ac_cv_exeext
3609ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3611/* end confdefs.h. */
3612#include <stdio.h>
3613int
3614main ()
3615{
3616FILE *f = fopen ("conftest.out", "w");
3617 return ferror (f) || fclose (f) != 0;
3618
3619 ;
3620 return 0;
3621}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003623ac_clean_files="$ac_clean_files conftest.out"
3624# Check that the compiler produces executables we can run. If not, either
3625# the compiler is broken, or we cross compile.
3626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3627$as_echo_n "checking whether we are cross compiling... " >&6; }
3628if test "$cross_compiling" != yes; then
3629 { { ac_try="$ac_link"
3630case "(($ac_try" in
3631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3632 *) ac_try_echo=$ac_try;;
3633esac
3634eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3635$as_echo "$ac_try_echo"; } >&5
3636 (eval "$ac_link") 2>&5
3637 ac_status=$?
3638 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3639 test $ac_status = 0; }
3640 if { ac_try='./conftest$ac_cv_exeext'
3641 { { case "(($ac_try" in
3642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3643 *) ac_try_echo=$ac_try;;
3644esac
3645eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3646$as_echo "$ac_try_echo"; } >&5
3647 (eval "$ac_try") 2>&5
3648 ac_status=$?
3649 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3650 test $ac_status = 0; }; }; then
3651 cross_compiling=no
3652 else
3653 if test "$cross_compiling" = maybe; then
3654 cross_compiling=yes
3655 else
3656 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3657$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3658as_fn_error "cannot run C compiled programs.
3659If you meant to cross compile, use \`--host'.
3660See \`config.log' for more details." "$LINENO" 5; }
3661 fi
3662 fi
3663fi
3664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3665$as_echo "$cross_compiling" >&6; }
3666
3667rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3668ac_clean_files=$ac_clean_files_save
3669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3670$as_echo_n "checking for suffix of object files... " >&6; }
3671if test "${ac_cv_objext+set}" = set; then :
3672 $as_echo_n "(cached) " >&6
3673else
3674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003675/* end confdefs.h. */
3676
3677int
3678main ()
3679{
3680
3681 ;
3682 return 0;
3683}
3684_ACEOF
3685rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003686if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003687case "(($ac_try" in
3688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3689 *) ac_try_echo=$ac_try;;
3690esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003691eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3692$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003693 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003694 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3696 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003697 for ac_file in conftest.o conftest.obj conftest.*; do
3698 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003699 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003701 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3702 break;;
3703 esac
3704done
3705else
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003707sed 's/^/| /' conftest.$ac_ext >&5
3708
Matthias Kloseb9621712010-04-24 17:59:49 +00003709{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3710$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3711as_fn_error "cannot compute suffix of object files: cannot compile
3712See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003713fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003714rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3717$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003718OBJEXT=$ac_cv_objext
3719ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3721$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3722if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3723 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003724else
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003727
Martin v. Löwis11437992002-04-12 09:54:03 +00003728int
3729main ()
3730{
3731#ifndef __GNUC__
3732 choke me
3733#endif
3734
3735 ;
3736 return 0;
3737}
3738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003739if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003740 ac_compiler_gnu=yes
3741else
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003745ac_cv_c_compiler_gnu=$ac_compiler_gnu
3746
3747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3749$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3750if test $ac_compiler_gnu = yes; then
3751 GCC=yes
3752else
3753 GCC=
3754fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003755ac_test_CFLAGS=${CFLAGS+set}
3756ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3758$as_echo_n "checking whether $CC accepts -g... " >&6; }
3759if test "${ac_cv_prog_cc_g+set}" = set; then :
3760 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003761else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762 ac_save_c_werror_flag=$ac_c_werror_flag
3763 ac_c_werror_flag=yes
3764 ac_cv_prog_cc_g=no
3765 CFLAGS="-g"
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
3773 ;
3774 return 0;
3775}
3776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003777if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003778 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003779else
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 CFLAGS=""
3781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782/* end confdefs.h. */
3783
3784int
3785main ()
3786{
3787
3788 ;
3789 return 0;
3790}
3791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003792if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793
Matthias Kloseb9621712010-04-24 17:59:49 +00003794else
3795 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003798/* end confdefs.h. */
3799
3800int
3801main ()
3802{
3803
3804 ;
3805 return 0;
3806}
3807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003808if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003809 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3816 ac_c_werror_flag=$ac_save_c_werror_flag
3817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3819$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003820if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003821 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003822elif test $ac_cv_prog_cc_g = yes; then
3823 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003824 CFLAGS="-g -O2"
3825 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003826 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003827 fi
3828else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003829 if test "$GCC" = yes; then
3830 CFLAGS="-O2"
3831 else
3832 CFLAGS=
3833 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3836$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3837if test "${ac_cv_prog_cc_c89+set}" = set; then :
3838 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003839else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003841ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003843/* end confdefs.h. */
3844#include <stdarg.h>
3845#include <stdio.h>
3846#include <sys/types.h>
3847#include <sys/stat.h>
3848/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3849struct buf { int x; };
3850FILE * (*rcsopen) (struct buf *, struct stat *, int);
3851static char *e (p, i)
3852 char **p;
3853 int i;
3854{
3855 return p[i];
3856}
3857static char *f (char * (*g) (char **, int), char **p, ...)
3858{
3859 char *s;
3860 va_list v;
3861 va_start (v,p);
3862 s = g (p, va_arg (v,int));
3863 va_end (v);
3864 return s;
3865}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003866
3867/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3868 function prototypes and stuff, but not '\xHH' hex character constants.
3869 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003870 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003871 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3872 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003873 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003874int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003876/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3877 inside strings and character constants. */
3878#define FOO(x) 'x'
3879int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3880
Skip Montanaro6dead952003-09-25 14:50:04 +00003881int test (int i, double x);
3882struct s1 {int (*f) (int a);};
3883struct s2 {int (*f) (double a);};
3884int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3885int argc;
3886char **argv;
3887int
3888main ()
3889{
3890return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3891 ;
3892 return 0;
3893}
3894_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3896 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003897do
3898 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003899 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003900 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003902rm -f core conftest.err conftest.$ac_objext
3903 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003904done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003905rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003906CC=$ac_save_CC
3907
3908fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003909# AC_CACHE_VAL
3910case "x$ac_cv_prog_cc_c89" in
3911 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3913$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003914 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3916$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003917 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3920$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003921esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003922if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003923
Matthias Kloseb9621712010-04-24 17:59:49 +00003924fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003925
Martin v. Löwis11437992002-04-12 09:54:03 +00003926ac_ext=c
3927ac_cpp='$CPP $CPPFLAGS'
3928ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3929ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3930ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003931
Victor Stinner00d6a1d2010-03-25 01:02:29 +00003932CFLAGS=$save_CFLAGS
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003933
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003934
3935
Matthias Kloseb9621712010-04-24 17:59:49 +00003936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3937$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003940if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003942
3943 case $withval in
3944 no) with_cxx_main=no
3945 MAINCC='$(CC)';;
3946 yes) with_cxx_main=yes
3947 MAINCC='$(CXX)';;
3948 *) with_cxx_main=yes
3949 MAINCC=$withval
3950 if test -z "$CXX"
3951 then
3952 CXX=$withval
3953 fi;;
3954 esac
3955else
3956
3957 with_cxx_main=no
3958 MAINCC='$(CC)'
3959
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960fi
3961
Matthias Kloseb9621712010-04-24 17:59:49 +00003962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
3963$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003964
3965preset_cxx="$CXX"
3966if test -z "$CXX"
3967then
3968 case "$CC" in
3969 gcc) # Extract the first word of "g++", so it can be a program name with args.
3970set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3972$as_echo_n "checking for $ac_word... " >&6; }
3973if test "${ac_cv_path_CXX+set}" = set; then :
3974 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003975else
3976 case $CXX in
3977 [\\/]* | ?:[\\/]*)
3978 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3979 ;;
3980 *)
3981 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3982for as_dir in notfound
3983do
3984 IFS=$as_save_IFS
3985 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003986 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003987 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 +00003988 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00003989 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003990 break 2
3991 fi
3992done
Matthias Kloseb9621712010-04-24 17:59:49 +00003993 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003995
3996 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3997 ;;
3998esac
3999fi
4000CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004001if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4003$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004004else
Matthias Kloseb9621712010-04-24 17:59:49 +00004005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4006$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004009 ;;
4010 cc) # Extract the first word of "c++", so it can be a program name with args.
4011set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4013$as_echo_n "checking for $ac_word... " >&6; }
4014if test "${ac_cv_path_CXX+set}" = set; then :
4015 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004016else
4017 case $CXX in
4018 [\\/]* | ?:[\\/]*)
4019 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4020 ;;
4021 *)
4022 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4023for as_dir in notfound
4024do
4025 IFS=$as_save_IFS
4026 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004027 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004028 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 +00004029 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004030 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004031 break 2
4032 fi
4033done
Matthias Kloseb9621712010-04-24 17:59:49 +00004034 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004035IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004036
4037 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4038 ;;
4039esac
4040fi
4041CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004042if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4044$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004045else
Matthias Kloseb9621712010-04-24 17:59:49 +00004046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4047$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004049
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004050 ;;
4051 esac
4052 if test "$CXX" = "notfound"
4053 then
4054 CXX=""
4055 fi
4056fi
4057if test -z "$CXX"
4058then
4059 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4060do
4061 # Extract the first word of "$ac_prog", so it can be a program name with args.
4062set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4064$as_echo_n "checking for $ac_word... " >&6; }
4065if test "${ac_cv_prog_CXX+set}" = set; then :
4066 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004067else
4068 if test -n "$CXX"; then
4069 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4070else
4071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4072for as_dir in $PATH
4073do
4074 IFS=$as_save_IFS
4075 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004076 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004077 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 +00004078 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004079 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004080 break 2
4081 fi
4082done
Matthias Kloseb9621712010-04-24 17:59:49 +00004083 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004084IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004085
4086fi
4087fi
4088CXX=$ac_cv_prog_CXX
4089if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4091$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004092else
Matthias Kloseb9621712010-04-24 17:59:49 +00004093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4094$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004095fi
4096
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004097
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004098 test -n "$CXX" && break
4099done
4100test -n "$CXX" || CXX="notfound"
4101
4102 if test "$CXX" = "notfound"
4103 then
4104 CXX=""
4105 fi
4106fi
4107if test "$preset_cxx" != "$CXX"
4108then
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004110
4111 By default, distutils will build C++ extension modules with \"$CXX\".
4112 If this is not intended, then set CXX on the configure command line.
4113 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004114$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004115
4116 By default, distutils will build C++ extension modules with \"$CXX\".
4117 If this is not intended, then set CXX on the configure command line.
4118 " >&2;}
4119fi
4120
4121
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004122# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004123
4124ac_ext=c
4125ac_cpp='$CPP $CPPFLAGS'
4126ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4127ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4128ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4130$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004131# On Suns, sometimes $CPP names a directory.
4132if test -n "$CPP" && test -d "$CPP"; then
4133 CPP=
4134fi
4135if test -z "$CPP"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 if test "${ac_cv_prog_CPP+set}" = set; then :
4137 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004138else
Martin v. Löwis11437992002-04-12 09:54:03 +00004139 # Double quotes because CPP needs to be expanded
4140 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4141 do
4142 ac_preproc_ok=false
4143for ac_c_preproc_warn_flag in '' yes
4144do
4145 # Use a header file that comes with gcc, so configuring glibc
4146 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004147 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4148 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004149 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004150 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004152/* end confdefs.h. */
4153#ifdef __STDC__
4154# include <limits.h>
4155#else
4156# include <assert.h>
4157#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004158 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004160if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004161
Matthias Kloseb9621712010-04-24 17:59:49 +00004162else
Martin v. Löwis11437992002-04-12 09:54:03 +00004163 # Broken: fails on valid input.
4164continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004165fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004166rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004167
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004168 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004169 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004172#include <ac_nonexistent.h>
4173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004174if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004175 # Broken: success on invalid input.
4176continue
4177else
Martin v. Löwis11437992002-04-12 09:54:03 +00004178 # Passes both tests.
4179ac_preproc_ok=:
4180break
4181fi
4182rm -f conftest.err conftest.$ac_ext
4183
4184done
4185# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4186rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004187if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004188 break
4189fi
4190
4191 done
4192 ac_cv_prog_CPP=$CPP
4193
4194fi
4195 CPP=$ac_cv_prog_CPP
4196else
4197 ac_cv_prog_CPP=$CPP
4198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4200$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004201ac_preproc_ok=false
4202for ac_c_preproc_warn_flag in '' yes
4203do
4204 # Use a header file that comes with gcc, so configuring glibc
4205 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004206 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4207 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004208 # On the NeXT, cc -E runs the code through the compiler's parser,
4209 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004211/* end confdefs.h. */
4212#ifdef __STDC__
4213# include <limits.h>
4214#else
4215# include <assert.h>
4216#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004217 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004219if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004220
Matthias Kloseb9621712010-04-24 17:59:49 +00004221else
Martin v. Löwis11437992002-04-12 09:54:03 +00004222 # Broken: fails on valid input.
4223continue
4224fi
4225rm -f conftest.err conftest.$ac_ext
4226
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004228 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004231#include <ac_nonexistent.h>
4232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004233if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004234 # Broken: success on invalid input.
4235continue
4236else
Martin v. Löwis11437992002-04-12 09:54:03 +00004237 # Passes both tests.
4238ac_preproc_ok=:
4239break
4240fi
4241rm -f conftest.err conftest.$ac_ext
4242
4243done
4244# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4245rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004246if $ac_preproc_ok; then :
4247
Martin v. Löwis11437992002-04-12 09:54:03 +00004248else
Matthias Kloseb9621712010-04-24 17:59:49 +00004249 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4250$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4251as_fn_error "C preprocessor \"$CPP\" fails sanity check
4252See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004253fi
4254
4255ac_ext=c
4256ac_cpp='$CPP $CPPFLAGS'
4257ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4258ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4259ac_compiler_gnu=$ac_cv_c_compiler_gnu
4260
4261
Matthias Kloseb9621712010-04-24 17:59:49 +00004262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4263$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4264if test "${ac_cv_path_GREP+set}" = set; then :
4265 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004266else
Matthias Kloseb9621712010-04-24 17:59:49 +00004267 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004268 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004269 # Loop through the user's path and test for each of PROGNAME-LIST
4270 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4272do
4273 IFS=$as_save_IFS
4274 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004275 for ac_prog in grep ggrep; do
4276 for ac_exec_ext in '' $ac_executable_extensions; do
4277 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4278 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4279# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004280 # Check for GNU $ac_path_GREP
4281case `"$ac_path_GREP" --version 2>&1` in
4282*GNU*)
4283 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4284*)
4285 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004286 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004287 while :
4288 do
4289 cat "conftest.in" "conftest.in" >"conftest.tmp"
4290 mv "conftest.tmp" "conftest.in"
4291 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004292 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004293 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4294 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004295 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004296 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4297 # Best one so far, save it but keep looking for a better one
4298 ac_cv_path_GREP="$ac_path_GREP"
4299 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004300 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 # 10*(2^10) chars as input seems more than enough
4302 test $ac_count -gt 10 && break
4303 done
4304 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4305esac
4306
Matthias Kloseb9621712010-04-24 17:59:49 +00004307 $ac_path_GREP_found && break 3
4308 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004310 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004311IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004312 if test -z "$ac_cv_path_GREP"; then
4313 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4314 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004315else
4316 ac_cv_path_GREP=$GREP
4317fi
4318
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4321$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322 GREP="$ac_cv_path_GREP"
4323
4324
Matthias Kloseb9621712010-04-24 17:59:49 +00004325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4326$as_echo_n "checking for egrep... " >&6; }
4327if test "${ac_cv_path_EGREP+set}" = set; then :
4328 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329else
4330 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4331 then ac_cv_path_EGREP="$GREP -E"
4332 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004333 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004335 # Loop through the user's path and test for each of PROGNAME-LIST
4336 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4338do
4339 IFS=$as_save_IFS
4340 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 for ac_prog in egrep; do
4342 for ac_exec_ext in '' $ac_executable_extensions; do
4343 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4344 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4345# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346 # Check for GNU $ac_path_EGREP
4347case `"$ac_path_EGREP" --version 2>&1` in
4348*GNU*)
4349 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4350*)
4351 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004352 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004353 while :
4354 do
4355 cat "conftest.in" "conftest.in" >"conftest.tmp"
4356 mv "conftest.tmp" "conftest.in"
4357 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004358 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4360 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4363 # Best one so far, save it but keep looking for a better one
4364 ac_cv_path_EGREP="$ac_path_EGREP"
4365 ac_path_EGREP_max=$ac_count
4366 fi
4367 # 10*(2^10) chars as input seems more than enough
4368 test $ac_count -gt 10 && break
4369 done
4370 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4371esac
4372
Matthias Kloseb9621712010-04-24 17:59:49 +00004373 $ac_path_EGREP_found && break 3
4374 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004375 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004376 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004377IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004378 if test -z "$ac_cv_path_EGREP"; then
4379 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4380 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004381else
4382 ac_cv_path_EGREP=$EGREP
4383fi
4384
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004385 fi
4386fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4388$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004389 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004390
4391
Matthias Kloseb9621712010-04-24 17:59:49 +00004392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4393$as_echo_n "checking for ANSI C header files... " >&6; }
4394if test "${ac_cv_header_stdc+set}" = set; then :
4395 $as_echo_n "(cached) " >&6
4396else
4397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004398/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004399#include <stdlib.h>
4400#include <stdarg.h>
4401#include <string.h>
4402#include <float.h>
4403
4404int
4405main ()
4406{
4407
4408 ;
4409 return 0;
4410}
4411_ACEOF
4412if ac_fn_c_try_compile "$LINENO"; then :
4413 ac_cv_header_stdc=yes
4414else
4415 ac_cv_header_stdc=no
4416fi
4417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4418
4419if test $ac_cv_header_stdc = yes; then
4420 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4422/* end confdefs.h. */
4423#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004424
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004425_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004426if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004427 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004428
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004429else
Matthias Kloseb9621712010-04-24 17:59:49 +00004430 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004431fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004432rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004433
Matthias Kloseb9621712010-04-24 17:59:49 +00004434fi
4435
4436if test $ac_cv_header_stdc = yes; then
4437 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4439/* end confdefs.h. */
4440#include <stdlib.h>
4441
4442_ACEOF
4443if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4444 $EGREP "free" >/dev/null 2>&1; then :
4445
4446else
4447 ac_cv_header_stdc=no
4448fi
4449rm -f conftest*
4450
4451fi
4452
4453if test $ac_cv_header_stdc = yes; then
4454 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4455 if test "$cross_compiling" = yes; then :
4456 :
4457else
4458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4459/* end confdefs.h. */
4460#include <ctype.h>
4461#include <stdlib.h>
4462#if ((' ' & 0x0FF) == 0x020)
4463# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4464# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4465#else
4466# define ISLOWER(c) \
4467 (('a' <= (c) && (c) <= 'i') \
4468 || ('j' <= (c) && (c) <= 'r') \
4469 || ('s' <= (c) && (c) <= 'z'))
4470# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4471#endif
4472
4473#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4474int
4475main ()
4476{
4477 int i;
4478 for (i = 0; i < 256; i++)
4479 if (XOR (islower (i), ISLOWER (i))
4480 || toupper (i) != TOUPPER (i))
4481 return 2;
4482 return 0;
4483}
4484_ACEOF
4485if ac_fn_c_try_run "$LINENO"; then :
4486
4487else
4488 ac_cv_header_stdc=no
4489fi
4490rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4491 conftest.$ac_objext conftest.beam conftest.$ac_ext
4492fi
4493
4494fi
4495fi
4496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4497$as_echo "$ac_cv_header_stdc" >&6; }
4498if test $ac_cv_header_stdc = yes; then
4499
4500$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4501
4502fi
4503
4504# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4505for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4506 inttypes.h stdint.h unistd.h
4507do :
4508 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4509ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4510"
4511eval as_val=\$$as_ac_Header
4512 if test "x$as_val" = x""yes; then :
4513 cat >>confdefs.h <<_ACEOF
4514#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4515_ACEOF
4516
4517fi
4518
4519done
4520
4521
4522
4523 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4524if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4525 MINIX=yes
4526else
4527 MINIX=
4528fi
4529
4530
4531 if test "$MINIX" = yes; then
4532
4533$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4534
4535
4536$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4537
4538
4539$as_echo "#define _MINIX 1" >>confdefs.h
4540
4541 fi
4542
4543
4544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4545$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4546if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4547 $as_echo_n "(cached) " >&6
4548else
4549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4550/* end confdefs.h. */
4551
4552# define __EXTENSIONS__ 1
4553 $ac_includes_default
4554int
4555main ()
4556{
4557
4558 ;
4559 return 0;
4560}
4561_ACEOF
4562if ac_fn_c_try_compile "$LINENO"; then :
4563 ac_cv_safe_to_define___extensions__=yes
4564else
4565 ac_cv_safe_to_define___extensions__=no
4566fi
4567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4568fi
4569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4570$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4571 test $ac_cv_safe_to_define___extensions__ = yes &&
4572 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4573
4574 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4575
4576 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4577
4578 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4579
4580 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4581
4582
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004583
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004584# Check for unsupported systems
4585case $ac_sys_system/$ac_sys_release in
4586atheos*|Linux*/1*)
4587 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4588 echo See README for details.
4589 exit 1;;
4590esac
4591
4592
Matthias Kloseb9621712010-04-24 17:59:49 +00004593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4594$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004595
4596# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004597if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004598 withval=$with_suffix;
4599 case $withval in
4600 no) EXEEXT=;;
4601 yes) EXEEXT=.exe;;
4602 *) EXEEXT=$withval;;
4603 esac
4604fi
4605
Matthias Kloseb9621712010-04-24 17:59:49 +00004606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4607$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004608
4609# Test whether we're running on a non-case-sensitive system, in which
4610# case we give a warning if no ext is given
4611
Matthias Kloseb9621712010-04-24 17:59:49 +00004612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4613$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004614if test ! -d CaseSensitiveTestDir; then
4615mkdir CaseSensitiveTestDir
4616fi
4617
4618if test -d casesensitivetestdir
4619then
Matthias Kloseb9621712010-04-24 17:59:49 +00004620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4621$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004622 BUILDEXEEXT=.exe
4623else
Matthias Kloseb9621712010-04-24 17:59:49 +00004624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4625$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004626 BUILDEXEEXT=$EXEEXT
4627fi
4628rmdir CaseSensitiveTestDir
4629
4630case $MACHDEP in
4631bsdos*)
4632 case $CC in
4633 gcc) CC="$CC -D_HAVE_BSDI";;
4634 esac;;
4635esac
4636
4637case $ac_sys_system in
4638hp*|HP*)
4639 case $CC in
4640 cc|*/cc) CC="$CC -Ae";;
4641 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004642esac
4643
4644
4645
Matthias Kloseb9621712010-04-24 17:59:49 +00004646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4647$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004648if test -z "$LIBRARY"
4649then
4650 LIBRARY='libpython$(VERSION).a'
4651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4653$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004654
4655# LDLIBRARY is the name of the library to link against (as opposed to the
4656# name of the library into which to insert object files). BLDLIBRARY is also
4657# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4658# is blank as the main program is not linked directly against LDLIBRARY.
4659# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4660# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4661# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4662# DLLLIBRARY is the shared (i.e., DLL) library.
4663#
4664# RUNSHARED is used to run shared python without installed libraries
4665#
4666# INSTSONAME is the name of the shared library that will be use to install
4667# on the system - some systems like version suffix, others don't
4668
4669
4670
4671
4672
4673
4674LDLIBRARY="$LIBRARY"
4675BLDLIBRARY='$(LDLIBRARY)'
4676INSTSONAME='$(LDLIBRARY)'
4677DLLLIBRARY=''
4678LDLIBRARYDIR=''
4679RUNSHARED=''
4680
4681# LINKCC is the command that links the python executable -- default is $(CC).
4682# If CXX is set, and if it is needed to link a main function that was
4683# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4684# python might then depend on the C++ runtime
4685# This is altered for AIX in order to build the export list before
4686# linking.
4687
Matthias Kloseb9621712010-04-24 17:59:49 +00004688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4689$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004690if test -z "$LINKCC"
4691then
4692 LINKCC='$(PURIFY) $(MAINCC)'
4693 case $ac_sys_system in
4694 AIX*)
4695 exp_extra="\"\""
4696 if test $ac_sys_release -ge 5 -o \
4697 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4698 exp_extra="."
4699 fi
4700 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004701 QNX*)
4702 # qcc must be used because the other compilers do not
4703 # support -N.
4704 LINKCC=qcc;;
4705 esac
4706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4708$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004709
4710# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4711# make sure we default having it set to "no": this is used by
4712# distutils.unixccompiler to know if it should add --enable-new-dtags
4713# to linker command lines, and failing to detect GNU ld simply results
4714# in the same bahaviour as before.
4715
Matthias Kloseb9621712010-04-24 17:59:49 +00004716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4717$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004718ac_prog=ld
4719if test "$GCC" = yes; then
4720 ac_prog=`$CC -print-prog-name=ld`
4721fi
4722case `"$ac_prog" -V 2>&1 < /dev/null` in
4723 *GNU*)
4724 GNULD=yes;;
4725 *)
4726 GNULD=no;;
4727esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4729$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004730
Matthias Kloseb9621712010-04-24 17:59:49 +00004731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4732$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004733# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004734if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004735 enableval=$enable_shared;
4736fi
4737
4738
4739if test -z "$enable_shared"
4740then
4741 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004742 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004743 enable_shared="yes";;
4744 *)
4745 enable_shared="no";;
4746 esac
4747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4749$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004750
Matthias Kloseb9621712010-04-24 17:59:49 +00004751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4752$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004753# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004754if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004755 enableval=$enable_profiling; ac_save_cc="$CC"
4756 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004757 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004758 ac_enable_profiling="no"
4759else
Matthias Kloseb9621712010-04-24 17:59:49 +00004760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004761/* end confdefs.h. */
4762int main() { return 0; }
4763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004764if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004765 ac_enable_profiling="yes"
4766else
Matthias Kloseb9621712010-04-24 17:59:49 +00004767 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4770 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004771fi
4772
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004773 CC="$ac_save_cc"
4774fi
4775
Matthias Kloseb9621712010-04-24 17:59:49 +00004776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4777$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004778
4779case "$ac_enable_profiling" in
4780 "yes")
4781 BASECFLAGS="-pg $BASECFLAGS"
4782 LDFLAGS="-pg $LDFLAGS"
4783 ;;
4784esac
4785
Matthias Kloseb9621712010-04-24 17:59:49 +00004786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4787$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004788
4789# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4790# library that we build, but we do not want to link against it (we
4791# will find it with a -framework option). For this reason there is an
4792# extra variable BLDLIBRARY against which Python and the extension
4793# modules are linked, BLDLIBRARY. This is normally the same as
4794# LDLIBRARY, but empty for MacOSX framework builds.
4795if test "$enable_framework"
4796then
4797 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4798 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4799 BLDLIBRARY=''
4800else
4801 BLDLIBRARY='$(LDLIBRARY)'
4802fi
4803
4804# Other platforms follow
4805if test $enable_shared = "yes"; then
4806
Matthias Kloseb9621712010-04-24 17:59:49 +00004807$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004808
4809 case $ac_sys_system in
4810 CYGWIN*)
4811 LDLIBRARY='libpython$(VERSION).dll.a'
4812 DLLLIBRARY='libpython$(VERSION).dll'
4813 ;;
4814 SunOS*)
4815 LDLIBRARY='libpython$(VERSION).so'
4816 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4817 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4818 INSTSONAME="$LDLIBRARY".$SOVERSION
4819 ;;
4820 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4821 LDLIBRARY='libpython$(VERSION).so'
4822 BLDLIBRARY='-L. -lpython$(VERSION)'
4823 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4824 case $ac_sys_system in
4825 FreeBSD*)
4826 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4827 ;;
4828 esac
4829 INSTSONAME="$LDLIBRARY".$SOVERSION
4830 ;;
4831 hp*|HP*)
4832 case `uname -m` in
4833 ia64)
4834 LDLIBRARY='libpython$(VERSION).so'
4835 ;;
4836 *)
4837 LDLIBRARY='libpython$(VERSION).sl'
4838 ;;
4839 esac
4840 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4841 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4842 ;;
4843 OSF*)
4844 LDLIBRARY='libpython$(VERSION).so'
4845 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4846 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4847 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004848 Darwin*)
4849 LDLIBRARY='libpython$(VERSION).dylib'
4850 BLDLIBRARY='-L. -lpython$(VERSION)'
4851 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4852 ;;
4853
4854 esac
4855else # shared is disabled
4856 case $ac_sys_system in
4857 CYGWIN*)
4858 BLDLIBRARY='$(LIBRARY)'
4859 LDLIBRARY='libpython$(VERSION).dll.a'
4860 ;;
4861 esac
4862fi
4863
Matthias Kloseb9621712010-04-24 17:59:49 +00004864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4865$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004866
4867if test -n "$ac_tool_prefix"; then
4868 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4869set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4871$as_echo_n "checking for $ac_word... " >&6; }
4872if test "${ac_cv_prog_RANLIB+set}" = set; then :
4873 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004874else
4875 if test -n "$RANLIB"; then
4876 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4877else
4878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4879for as_dir in $PATH
4880do
4881 IFS=$as_save_IFS
4882 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004883 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004884 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4885 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004887 break 2
4888 fi
4889done
Matthias Kloseb9621712010-04-24 17:59:49 +00004890 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004891IFS=$as_save_IFS
4892
4893fi
4894fi
4895RANLIB=$ac_cv_prog_RANLIB
4896if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4898$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004899else
Matthias Kloseb9621712010-04-24 17:59:49 +00004900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4901$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004902fi
4903
4904
4905fi
4906if test -z "$ac_cv_prog_RANLIB"; then
4907 ac_ct_RANLIB=$RANLIB
4908 # Extract the first word of "ranlib", so it can be a program name with args.
4909set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4911$as_echo_n "checking for $ac_word... " >&6; }
4912if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4913 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004914else
4915 if test -n "$ac_ct_RANLIB"; then
4916 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4917else
4918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4919for as_dir in $PATH
4920do
4921 IFS=$as_save_IFS
4922 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004923 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004924 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4925 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004926 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927 break 2
4928 fi
4929done
Matthias Kloseb9621712010-04-24 17:59:49 +00004930 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004931IFS=$as_save_IFS
4932
4933fi
4934fi
4935ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4936if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4938$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004939else
Matthias Kloseb9621712010-04-24 17:59:49 +00004940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4941$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004942fi
4943
4944 if test "x$ac_ct_RANLIB" = x; then
4945 RANLIB=":"
4946 else
4947 case $cross_compiling:$ac_tool_warned in
4948yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00004949{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4950$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004951ac_tool_warned=yes ;;
4952esac
4953 RANLIB=$ac_ct_RANLIB
4954 fi
4955else
4956 RANLIB="$ac_cv_prog_RANLIB"
4957fi
4958
4959
4960for ac_prog in ar aal
4961do
4962 # Extract the first word of "$ac_prog", so it can be a program name with args.
4963set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4965$as_echo_n "checking for $ac_word... " >&6; }
4966if test "${ac_cv_prog_AR+set}" = set; then :
4967 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004968else
4969 if test -n "$AR"; then
4970 ac_cv_prog_AR="$AR" # Let the user override the test.
4971else
4972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4973for as_dir in $PATH
4974do
4975 IFS=$as_save_IFS
4976 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004977 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4979 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004980 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981 break 2
4982 fi
4983done
Matthias Kloseb9621712010-04-24 17:59:49 +00004984 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004985IFS=$as_save_IFS
4986
4987fi
4988fi
4989AR=$ac_cv_prog_AR
4990if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4992$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004993else
Matthias Kloseb9621712010-04-24 17:59:49 +00004994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4995$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004996fi
4997
4998
4999 test -n "$AR" && break
5000done
5001test -n "$AR" || AR="ar"
5002
5003
5004# tweak ARFLAGS only if the user didn't set it on the command line
5005
5006if test -z "$ARFLAGS"
5007then
5008 ARFLAGS="rc"
5009fi
5010
5011
5012# Extract the first word of "svnversion", so it can be a program name with args.
5013set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5015$as_echo_n "checking for $ac_word... " >&6; }
5016if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5017 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005018else
5019 if test -n "$SVNVERSION"; then
5020 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5021else
5022as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5023for as_dir in $PATH
5024do
5025 IFS=$as_save_IFS
5026 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005027 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005028 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5029 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005030 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005031 break 2
5032 fi
5033done
Matthias Kloseb9621712010-04-24 17:59:49 +00005034 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005035IFS=$as_save_IFS
5036
5037 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5038fi
5039fi
5040SVNVERSION=$ac_cv_prog_SVNVERSION
5041if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5043$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005044else
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5046$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005047fi
5048
5049
5050if test $SVNVERSION = found
5051then
5052 SVNVERSION="svnversion \$(srcdir)"
5053else
5054 SVNVERSION="echo Unversioned directory"
5055fi
5056
5057case $MACHDEP in
5058bsdos*|hp*|HP*)
5059 # install -d does not work on BSDI or HP-UX
5060 if test -z "$INSTALL"
5061 then
5062 INSTALL="${srcdir}/install-sh -c"
5063 fi
5064esac
5065ac_aux_dir=
5066for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Matthias Kloseb9621712010-04-24 17:59:49 +00005067 for ac_t in install-sh install.sh shtool; do
5068 if test -f "$ac_dir/$ac_t"; then
5069 ac_aux_dir=$ac_dir
5070 ac_install_sh="$ac_aux_dir/$ac_t -c"
5071 break 2
5072 fi
5073 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074done
5075if test -z "$ac_aux_dir"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005076 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005077fi
5078
5079# These three variables are undocumented and unsupported,
5080# and are intended to be withdrawn in a future Autoconf release.
5081# They can cause serious problems if a builder's source tree is in a directory
5082# whose full name contains unusual characters.
5083ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5084ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5085ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5086
5087
5088# Find a good install program. We prefer a C program (faster),
5089# so one script is as good as another. But avoid the broken or
5090# incompatible versions:
5091# SysV /etc/install, /usr/sbin/install
5092# SunOS /usr/etc/install
5093# IRIX /sbin/install
5094# AIX /bin/install
5095# AmigaOS /C/install, which installs bootblocks on floppy discs
5096# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5097# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5098# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5099# OS/2's system install, which has a completely different semantic
5100# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005101# Reject install programs that cannot install multiple files.
5102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5103$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005104if test -z "$INSTALL"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005105if test "${ac_cv_path_install+set}" = set; then :
5106 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005107else
5108 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5109for as_dir in $PATH
5110do
5111 IFS=$as_save_IFS
5112 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 # Account for people who put trailing slashes in PATH elements.
5114case $as_dir/ in #((
5115 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005116 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005117 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005118 /usr/ucb/* ) ;;
5119 *)
5120 # OSF1 and SCO ODT 3.0 have their own names for install.
5121 # Don't use installbsd from OSF since it installs stuff as root
5122 # by default.
5123 for ac_prog in ginstall scoinst install; do
5124 for ac_exec_ext in '' $ac_executable_extensions; do
5125 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5126 if test $ac_prog = install &&
5127 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5128 # AIX install. It has an incompatible calling convention.
5129 :
5130 elif test $ac_prog = install &&
5131 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5132 # program-specific install script used by HP pwplus--don't use.
5133 :
5134 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005135 rm -rf conftest.one conftest.two conftest.dir
5136 echo one > conftest.one
5137 echo two > conftest.two
5138 mkdir conftest.dir
5139 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5140 test -s conftest.one && test -s conftest.two &&
5141 test -s conftest.dir/conftest.one &&
5142 test -s conftest.dir/conftest.two
5143 then
5144 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5145 break 3
5146 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005147 fi
5148 fi
5149 done
5150 done
5151 ;;
5152esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005153
5154 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005155IFS=$as_save_IFS
5156
Matthias Kloseb9621712010-04-24 17:59:49 +00005157rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005158
5159fi
5160 if test "${ac_cv_path_install+set}" = set; then
5161 INSTALL=$ac_cv_path_install
5162 else
5163 # As a last resort, use the slow shell script. Don't cache a
5164 # value for INSTALL within a source directory, because that will
5165 # break other packages using the cache if that directory is
5166 # removed, or if the value is a relative name.
5167 INSTALL=$ac_install_sh
5168 fi
5169fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5171$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005172
5173# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5174# It thinks the first close brace ends the variable substitution.
5175test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5176
5177test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5178
5179test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5180
5181
5182# Not every filesystem supports hard links
5183
5184if test -z "$LN" ; then
5185 case $ac_sys_system in
5186 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005187 *) LN=ln;;
5188 esac
5189fi
5190
5191# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5193$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005194
5195# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005196if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005197 withval=$with_pydebug;
5198if test "$withval" != no
5199then
5200
Matthias Kloseb9621712010-04-24 17:59:49 +00005201$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005202
Matthias Kloseb9621712010-04-24 17:59:49 +00005203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5204$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005205 Py_DEBUG='true'
Matthias Kloseb9621712010-04-24 17:59:49 +00005206else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5207$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005208fi
5209else
Matthias Kloseb9621712010-04-24 17:59:49 +00005210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5211$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005212fi
5213
5214
5215# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5216# merged with this chunk of code?
5217
5218# Optimizer/debugger flags
5219# ------------------------
5220# (The following bit of code is complicated enough - please keep things
5221# indented properly. Just pretend you're editing Python code. ;-)
5222
5223# There are two parallel sets of case statements below, one that checks to
5224# see if OPT was set and one that does BASECFLAGS setting based upon
5225# compiler and platform. BASECFLAGS tweaks need to be made even if the
5226# user set OPT.
5227
5228# tweak OPT based on compiler and platform, only if the user didn't set
5229# it on the command line
5230
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005231if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005232then
5233 case $GCC in
5234 yes)
5235 if test "$CC" != 'g++' ; then
5236 STRICT_PROTO="-Wstrict-prototypes"
5237 fi
5238 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5239 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5240 WRAP="-fwrapv"
5241 fi
5242 case $ac_cv_prog_cc_g in
5243 yes)
5244 if test "$Py_DEBUG" = 'true' ; then
5245 # Optimization messes up debuggers, so turn it off for
5246 # debug builds.
5247 OPT="-g -Wall $STRICT_PROTO"
5248 else
5249 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5250 fi
5251 ;;
5252 *)
5253 OPT="-O3 -Wall $STRICT_PROTO"
5254 ;;
5255 esac
5256 case $ac_sys_system in
5257 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5258 ;;
5259 esac
5260 ;;
5261
5262 *)
5263 OPT="-O"
5264 ;;
5265 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005266fi
5267
5268
5269
5270# The -arch flags for universal builds on OSX
5271UNIVERSAL_ARCH_FLAGS=
5272
5273
5274# tweak BASECFLAGS based on compiler and platform
5275case $GCC in
5276yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005277 # Python doesn't violate C99 aliasing rules, but older versions of
5278 # GCC produce warnings for legal Python code. Enable
5279 # -fno-strict-aliasing on versions of GCC that support but produce
5280 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5282$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005283 ac_save_cc="$CC"
5284 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005285 save_CFLAGS="$CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +00005286 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
5287 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005288else
Matthias Kloseb9621712010-04-24 17:59:49 +00005289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005290/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005291
Matthias Kloseb159a552010-04-25 21:00:44 +00005292
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005293int
5294main ()
5295{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005296int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005297 ;
5298 return 0;
5299}
Matthias Kloseb159a552010-04-25 21:00:44 +00005300
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005302if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005303
5304 CC="$ac_save_cc -fstrict-aliasing"
5305 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005307/* end confdefs.h. */
5308
Matthias Kloseb159a552010-04-25 21:00:44 +00005309
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005310int
5311main ()
5312{
5313void f(int **x) {} int main() { double *x; f((int **) &x); return 0; }
5314 ;
5315 return 0;
5316}
Matthias Kloseb159a552010-04-25 21:00:44 +00005317
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005319if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005320
5321 ac_cv_no_strict_aliasing=no
5322
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005323else
Matthias Kloseb159a552010-04-25 21:00:44 +00005324
5325 ac_cv_no_strict_aliasing=yes
5326
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005327fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005329
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005330else
Matthias Kloseb159a552010-04-25 21:00:44 +00005331
5332 ac_cv_no_strict_aliasing=no
5333
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005336fi
5337
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005338 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005339 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5341$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005342 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005343 then
5344 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5345 fi
5346
5347 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5348 # support. Without this, treatment of subnormals doesn't follow
5349 # the standard.
5350 case $ac_sys_machine in
5351 alpha*)
5352 BASECFLAGS="$BASECFLAGS -mieee"
5353 ;;
5354 esac
5355
5356 case $ac_sys_system in
5357 SCO_SV*)
5358 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5359 ;;
5360 # is there any other compiler on Darwin besides gcc?
5361 Darwin*)
5362 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5363 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005364 if test "${CC}" = gcc
5365 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5367$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005368 case "${UNIVERSALSDK}" in
5369 */MacOSX10.4u.sdk)
5370 # Build using 10.4 SDK, force usage of gcc when the
5371 # compiler is gcc, otherwise the user will get very
5372 # confusing error messages when building on OSX 10.6
5373 CC=gcc-4.0
5374 CPP=cpp-4.0
5375 ;;
5376 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5378$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005379 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005380
5381
5382 if test "${enable_universalsdk}"; then
5383 UNIVERSAL_ARCH_FLAGS=""
5384 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5385 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5386 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005387 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005388 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5389 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005390 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005391 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005392
5393 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5394 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005395 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005396 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005397
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005398 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5399 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005400 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005401 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005402
5403 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5404 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005405 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005406 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005407
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005409 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 +00005410
5411 fi
5412
5413
Ronald Oussoren666028b2010-04-18 19:07:43 +00005414 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5415 if test "${UNIVERSALSDK}" != "/"
5416 then
5417 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5418 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005419 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005420 fi
5421 fi
5422
5423 # Calculate the right deployment target for this build.
5424 #
5425 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5426 if test ${cur_target} '>' 10.2; then
5427 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005428 if test ${enable_universalsdk}; then
5429 if test "${UNIVERSAL_ARCHS}" = "all"; then
5430 # Ensure that the default platform for a
5431 # 4-way universal build is OSX 10.5,
5432 # that's the first OS release where
5433 # 4-way builds make sense.
5434 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005435
5436 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5437 cur_target='10.5'
5438
5439 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5440 cur_target='10.5'
5441
5442 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5443 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005444 fi
5445 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005446 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005447 # On Intel macs default to a deployment
5448 # target of 10.4, that's the first OSX
5449 # release with Intel support.
5450 cur_target="10.4"
5451 fi
5452 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453 fi
5454 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5455
5456 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5457 # environment with a value that is the same as what we'll use
5458 # in the Makefile to ensure that we'll get the same compiler
5459 # environment during configure and build time.
5460 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5461 export MACOSX_DEPLOYMENT_TARGET
5462 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5463
5464 ;;
5465 OSF*)
5466 BASECFLAGS="$BASECFLAGS -mieee"
5467 ;;
5468 esac
5469 ;;
5470
5471*)
5472 case $ac_sys_system in
5473 OpenUNIX*|UnixWare*)
5474 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5475 ;;
5476 OSF*)
5477 BASECFLAGS="$BASECFLAGS -ieee -std"
5478 ;;
5479 SCO_SV*)
5480 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5481 ;;
5482 esac
5483 ;;
5484esac
5485
5486if test "$Py_DEBUG" = 'true'; then
5487 :
5488else
5489 OPT="-DNDEBUG $OPT"
5490fi
5491
5492if test "$ac_arch_flags"
5493then
5494 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5495fi
5496
5497# disable check for icc since it seems to pass, but generates a warning
5498if test "$CC" = icc
5499then
5500 ac_cv_opt_olimit_ok=no
5501fi
5502
Matthias Kloseb9621712010-04-24 17:59:49 +00005503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5504$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5505if test "${ac_cv_opt_olimit_ok+set}" = set; then :
5506 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005507else
5508 ac_save_cc="$CC"
5509CC="$CC -OPT:Olimit=0"
Matthias Kloseb9621712010-04-24 17:59:49 +00005510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005511/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005512
5513int
5514main ()
5515{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005516int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005517 ;
5518 return 0;
5519}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005521if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005522 ac_cv_opt_olimit_ok=yes
5523else
Matthias Kloseb9621712010-04-24 17:59:49 +00005524 ac_cv_opt_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005525
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005526fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005528CC="$ac_save_cc"
5529fi
5530
Matthias Kloseb9621712010-04-24 17:59:49 +00005531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5532$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005533if test $ac_cv_opt_olimit_ok = yes; then
5534 case $ac_sys_system in
5535 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5536 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5537 # environment?
5538 Darwin*)
5539 ;;
5540 *)
5541 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5542 ;;
5543 esac
5544else
Matthias Kloseb9621712010-04-24 17:59:49 +00005545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5546$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5547 if test "${ac_cv_olimit_ok+set}" = set; then :
5548 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549else
5550 ac_save_cc="$CC"
5551 CC="$CC -Olimit 1500"
Matthias Kloseb9621712010-04-24 17:59:49 +00005552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005553/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005554
5555int
5556main ()
5557{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005558int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005559 ;
5560 return 0;
5561}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005563if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005564 ac_cv_olimit_ok=yes
5565else
Matthias Kloseb9621712010-04-24 17:59:49 +00005566 ac_cv_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005567
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005568fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005570 CC="$ac_save_cc"
5571fi
5572
Matthias Kloseb9621712010-04-24 17:59:49 +00005573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5574$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005575 if test $ac_cv_olimit_ok = yes; then
5576 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5577 fi
5578fi
5579
5580# Check whether GCC supports PyArg_ParseTuple format
5581if test "$GCC" = "yes"
5582then
Matthias Kloseb9621712010-04-24 17:59:49 +00005583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5584$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005585 save_CFLAGS=$CFLAGS
5586 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005588/* end confdefs.h. */
5589
5590 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591int
5592main ()
5593{
5594
5595 ;
5596 return 0;
5597}
Matthias Kloseb159a552010-04-25 21:00:44 +00005598
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005600if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601
Matthias Kloseb159a552010-04-25 21:00:44 +00005602
Matthias Kloseb9621712010-04-24 17:59:49 +00005603$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005604
Matthias Kloseb159a552010-04-25 21:00:44 +00005605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005606$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005607
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608else
Matthias Kloseb159a552010-04-25 21:00:44 +00005609
5610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005611$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005612
5613fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5615 CFLAGS=$save_CFLAGS
5616fi
5617
5618# On some compilers, pthreads are available without further options
5619# (e.g. MacOS X). On some of these systems, the compiler will not
5620# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5621# So we have to see first whether pthreads are available without
5622# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5624$as_echo_n "checking whether pthreads are available without options... " >&6; }
5625if test "${ac_cv_pthread_is_default+set}" = set; then :
5626 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627else
Matthias Kloseb9621712010-04-24 17:59:49 +00005628 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005629 ac_cv_pthread_is_default=no
5630else
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#include <pthread.h>
5635
5636void* routine(void* p){return NULL;}
5637
5638int main(){
5639 pthread_t p;
5640 if(pthread_create(&p,NULL,routine,NULL)!=0)
5641 return 1;
5642 (void)pthread_detach(p);
5643 return 0;
5644}
5645
5646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005647if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648
5649 ac_cv_pthread_is_default=yes
5650 ac_cv_kthread=no
5651 ac_cv_pthread=no
5652
5653else
Matthias Kloseb9621712010-04-24 17:59:49 +00005654 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005656rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5657 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658fi
5659
5660
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661fi
5662
Matthias Kloseb9621712010-04-24 17:59:49 +00005663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5664$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665
5666
5667if test $ac_cv_pthread_is_default = yes
5668then
5669 ac_cv_kpthread=no
5670else
5671# -Kpthread, if available, provides the right #defines
5672# and linker options to make pthread_create available
5673# Some compilers won't report that they do not support -Kpthread,
5674# so we need to run a program to see whether it really made the
5675# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5677$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5678if test "${ac_cv_kpthread+set}" = set; then :
5679 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680else
5681 ac_save_cc="$CC"
5682CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005683if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684 ac_cv_kpthread=no
5685else
Matthias Kloseb9621712010-04-24 17:59:49 +00005686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687/* end confdefs.h. */
5688
5689#include <pthread.h>
5690
5691void* routine(void* p){return NULL;}
5692
5693int main(){
5694 pthread_t p;
5695 if(pthread_create(&p,NULL,routine,NULL)!=0)
5696 return 1;
5697 (void)pthread_detach(p);
5698 return 0;
5699}
5700
5701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005702if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703 ac_cv_kpthread=yes
5704else
Matthias Kloseb9621712010-04-24 17:59:49 +00005705 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005707rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5708 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709fi
5710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711CC="$ac_save_cc"
5712fi
5713
Matthias Kloseb9621712010-04-24 17:59:49 +00005714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5715$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716fi
5717
5718if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5719then
5720# -Kthread, if available, provides the right #defines
5721# and linker options to make pthread_create available
5722# Some compilers won't report that they do not support -Kthread,
5723# so we need to run a program to see whether it really made the
5724# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5726$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5727if test "${ac_cv_kthread+set}" = set; then :
5728 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729else
5730 ac_save_cc="$CC"
5731CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005732if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733 ac_cv_kthread=no
5734else
Matthias Kloseb9621712010-04-24 17:59:49 +00005735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736/* end confdefs.h. */
5737
5738#include <pthread.h>
5739
5740void* routine(void* p){return NULL;}
5741
5742int main(){
5743 pthread_t p;
5744 if(pthread_create(&p,NULL,routine,NULL)!=0)
5745 return 1;
5746 (void)pthread_detach(p);
5747 return 0;
5748}
5749
5750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005751if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752 ac_cv_kthread=yes
5753else
Matthias Kloseb9621712010-04-24 17:59:49 +00005754 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005756rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5757 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758fi
5759
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760CC="$ac_save_cc"
5761fi
5762
Matthias Kloseb9621712010-04-24 17:59:49 +00005763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5764$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765fi
5766
5767if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5768then
5769# -pthread, if available, provides the right #defines
5770# and linker options to make pthread_create available
5771# Some compilers won't report that they do not support -pthread,
5772# so we need to run a program to see whether it really made the
5773# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5775$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5776if test "${ac_cv_thread+set}" = set; then :
5777 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778else
5779 ac_save_cc="$CC"
5780CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005781if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782 ac_cv_pthread=no
5783else
Matthias Kloseb9621712010-04-24 17:59:49 +00005784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785/* end confdefs.h. */
5786
5787#include <pthread.h>
5788
5789void* routine(void* p){return NULL;}
5790
5791int main(){
5792 pthread_t p;
5793 if(pthread_create(&p,NULL,routine,NULL)!=0)
5794 return 1;
5795 (void)pthread_detach(p);
5796 return 0;
5797}
5798
5799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005800if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801 ac_cv_pthread=yes
5802else
Matthias Kloseb9621712010-04-24 17:59:49 +00005803 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005805rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5806 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807fi
5808
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809CC="$ac_save_cc"
5810fi
5811
Matthias Kloseb9621712010-04-24 17:59:49 +00005812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5813$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814fi
5815
5816# If we have set a CC compiler flag for thread support then
5817# check if it works for CXX, too.
5818ac_cv_cxx_thread=no
5819if test ! -z "$CXX"
5820then
Matthias Kloseb9621712010-04-24 17:59:49 +00005821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5822$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823ac_save_cxx="$CXX"
5824
5825if test "$ac_cv_kpthread" = "yes"
5826then
5827 CXX="$CXX -Kpthread"
5828 ac_cv_cxx_thread=yes
5829elif test "$ac_cv_kthread" = "yes"
5830then
5831 CXX="$CXX -Kthread"
5832 ac_cv_cxx_thread=yes
5833elif test "$ac_cv_pthread" = "yes"
5834then
5835 CXX="$CXX -pthread"
5836 ac_cv_cxx_thread=yes
5837fi
5838
5839if test $ac_cv_cxx_thread = yes
5840then
5841 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5842 $CXX -c conftest.$ac_ext 2>&5
5843 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5844 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5845 then
5846 ac_cv_cxx_thread=yes
5847 else
5848 ac_cv_cxx_thread=no
5849 fi
5850 rm -fr conftest*
5851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5853$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854fi
5855CXX="$ac_save_cxx"
5856
5857
5858# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5860$as_echo_n "checking for ANSI C header files... " >&6; }
5861if test "${ac_cv_header_stdc+set}" = set; then :
5862 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863else
Matthias Kloseb9621712010-04-24 17:59:49 +00005864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865/* end confdefs.h. */
5866#include <stdlib.h>
5867#include <stdarg.h>
5868#include <string.h>
5869#include <float.h>
5870
5871int
5872main ()
5873{
5874
5875 ;
5876 return 0;
5877}
5878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005879if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880 ac_cv_header_stdc=yes
5881else
Matthias Kloseb9621712010-04-24 17:59:49 +00005882 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5885
5886if test $ac_cv_header_stdc = yes; then
5887 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889/* end confdefs.h. */
5890#include <string.h>
5891
5892_ACEOF
5893if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005894 $EGREP "memchr" >/dev/null 2>&1; then :
5895
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896else
5897 ac_cv_header_stdc=no
5898fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005899rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900
5901fi
5902
5903if test $ac_cv_header_stdc = yes; then
5904 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906/* end confdefs.h. */
5907#include <stdlib.h>
5908
5909_ACEOF
5910if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005911 $EGREP "free" >/dev/null 2>&1; then :
5912
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913else
5914 ac_cv_header_stdc=no
5915fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005916rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917
5918fi
5919
5920if test $ac_cv_header_stdc = yes; then
5921 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005922 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 :
5924else
Matthias Kloseb9621712010-04-24 17:59:49 +00005925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926/* end confdefs.h. */
5927#include <ctype.h>
5928#include <stdlib.h>
5929#if ((' ' & 0x0FF) == 0x020)
5930# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5931# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5932#else
5933# define ISLOWER(c) \
5934 (('a' <= (c) && (c) <= 'i') \
5935 || ('j' <= (c) && (c) <= 'r') \
5936 || ('s' <= (c) && (c) <= 'z'))
5937# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5938#endif
5939
5940#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5941int
5942main ()
5943{
5944 int i;
5945 for (i = 0; i < 256; i++)
5946 if (XOR (islower (i), ISLOWER (i))
5947 || toupper (i) != TOUPPER (i))
5948 return 2;
5949 return 0;
5950}
5951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005952if ac_fn_c_try_run "$LINENO"; then :
5953
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954else
Matthias Kloseb9621712010-04-24 17:59:49 +00005955 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005957rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5958 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959fi
5960
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961fi
5962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5964$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965if test $ac_cv_header_stdc = yes; then
5966
Matthias Kloseb9621712010-04-24 17:59:49 +00005967$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968
5969fi
5970
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005971for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5972fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005973ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005974shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005975unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005976sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5977sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005978sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005979sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005980sys/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 +00005981sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00005982bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005983do :
5984 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5985ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5986eval as_val=\$$as_ac_Header
5987 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00005988 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005989#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005990_ACEOF
5991
5992fi
5993
Guido van Rossum627b2d71993-12-24 10:39:16 +00005994done
5995
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005996ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005997for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00005998 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6000$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
6001if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
6002 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006003else
Matthias Kloseb9621712010-04-24 17:59:49 +00006004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006005/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006006#include <sys/types.h>
6007#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006008
Martin v. Löwis11437992002-04-12 09:54:03 +00006009int
6010main ()
6011{
6012if ((DIR *) 0)
6013return 0;
6014 ;
6015 return 0;
6016}
6017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006018if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006019 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006020else
Matthias Kloseb9621712010-04-24 17:59:49 +00006021 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006025eval ac_res=\$$as_ac_Header
6026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6027$as_echo "$ac_res" >&6; }
6028eval as_val=\$$as_ac_Header
6029 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006030 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006031#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006032_ACEOF
6033
6034ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006035fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006037done
6038# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6039if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6041$as_echo_n "checking for library containing opendir... " >&6; }
6042if test "${ac_cv_search_opendir+set}" = set; then :
6043 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006044else
Martin v. Löwis11437992002-04-12 09:54:03 +00006045 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006047/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006049/* Override any GCC internal prototype to avoid an error.
6050 Use char because int might match the return type of a GCC
6051 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006052#ifdef __cplusplus
6053extern "C"
6054#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006055char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006056int
6057main ()
6058{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006059return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006060 ;
6061 return 0;
6062}
6063_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006064for ac_lib in '' dir; do
6065 if test -z "$ac_lib"; then
6066 ac_res="none required"
6067 else
6068 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006069 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006070 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006071 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006072 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006073fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006074rm -f core conftest.err conftest.$ac_objext \
6075 conftest$ac_exeext
6076 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006077 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006079done
Matthias Kloseb9621712010-04-24 17:59:49 +00006080if test "${ac_cv_search_opendir+set}" = set; then :
6081
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006082else
6083 ac_cv_search_opendir=no
6084fi
6085rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006086LIBS=$ac_func_search_save_LIBS
6087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6089$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006090ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006091if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006092 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006093
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006094fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006095
Michael W. Hudson54241132001-12-07 15:38:26 +00006096else
Matthias Kloseb9621712010-04-24 17:59:49 +00006097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6098$as_echo_n "checking for library containing opendir... " >&6; }
6099if test "${ac_cv_search_opendir+set}" = set; then :
6100 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006101else
6102 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006105
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006106/* Override any GCC internal prototype to avoid an error.
6107 Use char because int might match the return type of a GCC
6108 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006109#ifdef __cplusplus
6110extern "C"
6111#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006112char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006113int
6114main ()
6115{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006116return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006117 ;
6118 return 0;
6119}
6120_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006121for ac_lib in '' x; do
6122 if test -z "$ac_lib"; then
6123 ac_res="none required"
6124 else
6125 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006126 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006127 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006128 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006129 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006130fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006131rm -f core conftest.err conftest.$ac_objext \
6132 conftest$ac_exeext
6133 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006134 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006136done
Matthias Kloseb9621712010-04-24 17:59:49 +00006137if test "${ac_cv_search_opendir+set}" = set; then :
6138
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006139else
6140 ac_cv_search_opendir=no
6141fi
6142rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006143LIBS=$ac_func_search_save_LIBS
6144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6146$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006147ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006148if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006149 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006150
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006151fi
6152
6153fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006154
Matthias Kloseb9621712010-04-24 17:59:49 +00006155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6156$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6157if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6158 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006159else
Matthias Kloseb9621712010-04-24 17:59:49 +00006160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006161/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006162#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163int
6164main ()
6165{
6166return makedev(0, 0);
6167 ;
6168 return 0;
6169}
6170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006171if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172 ac_cv_header_sys_types_h_makedev=yes
6173else
Matthias Kloseb9621712010-04-24 17:59:49 +00006174 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006176rm -f core conftest.err conftest.$ac_objext \
6177 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006178
6179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6181$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006182
6183if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006184ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6185if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006186
Matthias Kloseb9621712010-04-24 17:59:49 +00006187$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006188
6189fi
6190
6191
6192
6193 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006194 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6195if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006196
Matthias Kloseb9621712010-04-24 17:59:49 +00006197$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006198
6199fi
6200
6201
6202 fi
6203fi
6204
Michael W. Hudson54241132001-12-07 15:38:26 +00006205
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006206# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006207for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006208do :
6209 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006210#ifdef HAVE_CURSES_H
6211#include <curses.h>
6212#endif
6213
Matthias Kloseb9621712010-04-24 17:59:49 +00006214"
6215if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006216 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006217#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006218_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006219
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006220fi
6221
6222done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006223
6224
Martin v. Löwis11017b12006-01-14 18:12:57 +00006225# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006226for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006227do :
6228 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 +00006229#ifdef HAVE_ASM_TYPES_H
6230#include <asm/types.h>
6231#endif
6232#ifdef HAVE_SYS_SOCKET_H
6233#include <sys/socket.h>
6234#endif
6235
Matthias Kloseb9621712010-04-24 17:59:49 +00006236"
6237if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006238 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006239#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006240_ACEOF
6241
6242fi
6243
6244done
6245
6246
Guido van Rossum627b2d71993-12-24 10:39:16 +00006247# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006248was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6250$as_echo_n "checking for clock_t in time.h... " >&6; }
6251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006252/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006253#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006254
6255_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006256if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006257 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006258 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006259else
Martin v. Löwis11437992002-04-12 09:54:03 +00006260
6261
Matthias Kloseb9621712010-04-24 17:59:49 +00006262$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006263
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006264
Guido van Rossum627b2d71993-12-24 10:39:16 +00006265fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006266rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006267
Matthias Kloseb9621712010-04-24 17:59:49 +00006268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6269$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006270
Neal Norwitz11690112002-07-30 01:08:28 +00006271# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6273$as_echo_n "checking for makedev... " >&6; }
6274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006275/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006276
6277 #include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006278int
6279main ()
6280{
6281 makedev(0, 0)
6282 ;
6283 return 0;
6284}
Matthias Kloseb159a552010-04-25 21:00:44 +00006285
Neal Norwitz11690112002-07-30 01:08:28 +00006286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006287if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006288 ac_cv_has_makedev=yes
6289else
Matthias Kloseb9621712010-04-24 17:59:49 +00006290 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006291fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006292rm -f core conftest.err conftest.$ac_objext \
6293 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006294if test "$ac_cv_has_makedev" = "no"; then
6295 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006297/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006298
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006299#define _OSF_SOURCE 1
6300#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006301
Neal Norwitz11690112002-07-30 01:08:28 +00006302int
6303main ()
6304{
6305 makedev(0, 0)
6306 ;
6307 return 0;
6308}
6309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006310if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006311 ac_cv_has_makedev=yes
6312else
Matthias Kloseb9621712010-04-24 17:59:49 +00006313 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006314fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006315rm -f core conftest.err conftest.$ac_objext \
6316 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006317 if test "$ac_cv_has_makedev" = "yes"; then
6318
Matthias Kloseb9621712010-04-24 17:59:49 +00006319$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006320
6321 fi
6322fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6324$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006325if test "$ac_cv_has_makedev" = "yes"; then
6326
Matthias Kloseb9621712010-04-24 17:59:49 +00006327$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006328
6329fi
6330
Martin v. Löwis399a6892002-10-04 10:22:02 +00006331# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6332# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6333# defined, but the compiler does not support pragma redefine_extname,
6334# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6335# structures (such as rlimit64) without declaring them. As a
6336# work-around, disable LFS on such configurations
6337
6338use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6340$as_echo_n "checking Solaris LFS bug... " >&6; }
6341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006342/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006343
6344#define _LARGEFILE_SOURCE 1
6345#define _FILE_OFFSET_BITS 64
6346#include <sys/resource.h>
6347
Martin v. Löwis399a6892002-10-04 10:22:02 +00006348int
6349main ()
6350{
6351struct rlimit foo;
6352 ;
6353 return 0;
6354}
6355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006356if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006357 sol_lfs_bug=no
6358else
Matthias Kloseb9621712010-04-24 17:59:49 +00006359 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6363$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006364if test "$sol_lfs_bug" = "yes"; then
6365 use_lfs=no
6366fi
6367
6368if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006369# Two defines needed to enable largefile support on various platforms
6370# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006371
Matthias Kloseb9621712010-04-24 17:59:49 +00006372$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006373
6374
Matthias Kloseb9621712010-04-24 17:59:49 +00006375$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006376
Martin v. Löwis399a6892002-10-04 10:22:02 +00006377fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006378
Guido van Rossum84e7b241996-08-19 21:59:00 +00006379# Add some code to confdefs.h so that the test for off_t works on SCO
6380cat >> confdefs.h <<\EOF
6381#if defined(SCO_DS)
6382#undef _OFF_T
6383#endif
6384EOF
6385
Guido van Rossumef2255b2000-03-10 22:30:29 +00006386# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006387ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6388if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006389
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006390else
Martin v. Löwis11437992002-04-12 09:54:03 +00006391
6392cat >>confdefs.h <<_ACEOF
6393#define mode_t int
6394_ACEOF
6395
6396fi
6397
Matthias Kloseb9621712010-04-24 17:59:49 +00006398ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6399if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006400
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006401else
Martin v. Löwis11437992002-04-12 09:54:03 +00006402
6403cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006404#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006405_ACEOF
6406
6407fi
6408
Matthias Kloseb9621712010-04-24 17:59:49 +00006409ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6410if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006411
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006412else
Martin v. Löwis11437992002-04-12 09:54:03 +00006413
6414cat >>confdefs.h <<_ACEOF
6415#define pid_t int
6416_ACEOF
6417
6418fi
6419
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006420
Martin v. Löwis11437992002-04-12 09:54:03 +00006421cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006422#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006423_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006424
Matthias Kloseb9621712010-04-24 17:59:49 +00006425ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6426if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006427
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006428else
Martin v. Löwis11437992002-04-12 09:54:03 +00006429
6430cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006431#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006432_ACEOF
6433
6434fi
6435
Matthias Kloseb9621712010-04-24 17:59:49 +00006436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6437$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6438if test "${ac_cv_type_uid_t+set}" = set; then :
6439 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006440else
Matthias Kloseb9621712010-04-24 17:59:49 +00006441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006442/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006443#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006444
6445_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006446if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006447 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006448 ac_cv_type_uid_t=yes
6449else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006450 ac_cv_type_uid_t=no
6451fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006452rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006453
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006454fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6456$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006457if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006458
Matthias Kloseb9621712010-04-24 17:59:49 +00006459$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006460
6461
Matthias Kloseb9621712010-04-24 17:59:49 +00006462$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006463
6464fi
6465
Matthias Kloseb9621712010-04-24 17:59:49 +00006466ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6467case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006468 no|yes) ;; #(
6469 *)
6470
Matthias Kloseb9621712010-04-24 17:59:49 +00006471$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006472
6473
6474cat >>confdefs.h <<_ACEOF
6475#define uint32_t $ac_cv_c_uint32_t
6476_ACEOF
6477;;
6478 esac
6479
Matthias Kloseb9621712010-04-24 17:59:49 +00006480ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6481case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006482 no|yes) ;; #(
6483 *)
6484
Matthias Kloseb9621712010-04-24 17:59:49 +00006485$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006486
6487
6488cat >>confdefs.h <<_ACEOF
6489#define uint64_t $ac_cv_c_uint64_t
6490_ACEOF
6491;;
6492 esac
6493
Matthias Kloseb9621712010-04-24 17:59:49 +00006494ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6495case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006496 no|yes) ;; #(
6497 *)
6498
6499cat >>confdefs.h <<_ACEOF
6500#define int32_t $ac_cv_c_int32_t
6501_ACEOF
6502;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006503esac
6504
Matthias Kloseb9621712010-04-24 17:59:49 +00006505ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6506case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006507 no|yes) ;; #(
6508 *)
6509
6510cat >>confdefs.h <<_ACEOF
6511#define int64_t $ac_cv_c_int64_t
6512_ACEOF
6513;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006514esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006515
Matthias Kloseb9621712010-04-24 17:59:49 +00006516ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6517if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006518
Matthias Kloseb9621712010-04-24 17:59:49 +00006519$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006520
6521fi
6522
Jack Jansendd19cf82001-12-06 22:36:17 +00006523
Michael W. Hudson54241132001-12-07 15:38:26 +00006524# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006525# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006526# The cast to long int works around a bug in the HP C Compiler
6527# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6528# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6529# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6531$as_echo_n "checking size of int... " >&6; }
6532if test "${ac_cv_sizeof_int+set}" = set; then :
6533 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006534else
Matthias Kloseb9621712010-04-24 17:59:49 +00006535 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 +00006536
Martin v. Löwis11437992002-04-12 09:54:03 +00006537else
Matthias Kloseb9621712010-04-24 17:59:49 +00006538 if test "$ac_cv_type_int" = yes; then
6539 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6540$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6541{ as_fn_set_status 77
6542as_fn_error "cannot compute sizeof (int)
6543See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006544 else
6545 ac_cv_sizeof_int=0
6546 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006547fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006548
Martin v. Löwis11437992002-04-12 09:54:03 +00006549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6551$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006552
6553
6554
Martin v. Löwis11437992002-04-12 09:54:03 +00006555cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006556#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006557_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006558
6559
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006560# The cast to long int works around a bug in the HP C Compiler
6561# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6562# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6563# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6565$as_echo_n "checking size of long... " >&6; }
6566if test "${ac_cv_sizeof_long+set}" = set; then :
6567 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006568else
Matthias Kloseb9621712010-04-24 17:59:49 +00006569 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006570
Martin v. Löwis11437992002-04-12 09:54:03 +00006571else
Matthias Kloseb9621712010-04-24 17:59:49 +00006572 if test "$ac_cv_type_long" = yes; then
6573 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6574$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6575{ as_fn_set_status 77
6576as_fn_error "cannot compute sizeof (long)
6577See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006578 else
6579 ac_cv_sizeof_long=0
6580 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006582
Martin v. Löwis11437992002-04-12 09:54:03 +00006583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6585$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006586
6587
6588
Martin v. Löwis11437992002-04-12 09:54:03 +00006589cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006590#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006591_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006592
6593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006594# The cast to long int works around a bug in the HP C Compiler
6595# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6596# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6597# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6599$as_echo_n "checking size of void *... " >&6; }
6600if test "${ac_cv_sizeof_void_p+set}" = set; then :
6601 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006602else
Matthias Kloseb9621712010-04-24 17:59:49 +00006603 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006604
Martin v. Löwis11437992002-04-12 09:54:03 +00006605else
Matthias Kloseb9621712010-04-24 17:59:49 +00006606 if test "$ac_cv_type_void_p" = yes; then
6607 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6608$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6609{ as_fn_set_status 77
6610as_fn_error "cannot compute sizeof (void *)
6611See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006612 else
6613 ac_cv_sizeof_void_p=0
6614 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006615fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006616
Martin v. Löwis11437992002-04-12 09:54:03 +00006617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6619$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006620
6621
6622
Martin v. Löwis11437992002-04-12 09:54:03 +00006623cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006624#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006625_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006626
6627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006628# The cast to long int works around a bug in the HP C Compiler
6629# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6630# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6631# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6633$as_echo_n "checking size of short... " >&6; }
6634if test "${ac_cv_sizeof_short+set}" = set; then :
6635 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006636else
Matthias Kloseb9621712010-04-24 17:59:49 +00006637 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006638
Martin v. Löwis11437992002-04-12 09:54:03 +00006639else
Matthias Kloseb9621712010-04-24 17:59:49 +00006640 if test "$ac_cv_type_short" = yes; then
6641 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6642$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6643{ as_fn_set_status 77
6644as_fn_error "cannot compute sizeof (short)
6645See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006646 else
6647 ac_cv_sizeof_short=0
6648 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006650
Martin v. Löwis11437992002-04-12 09:54:03 +00006651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6653$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006654
6655
6656
Martin v. Löwis11437992002-04-12 09:54:03 +00006657cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006658#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006659_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006660
6661
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006662# The cast to long int works around a bug in the HP C Compiler
6663# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6664# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6665# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6667$as_echo_n "checking size of float... " >&6; }
6668if test "${ac_cv_sizeof_float+set}" = set; then :
6669 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006670else
Matthias Kloseb9621712010-04-24 17:59:49 +00006671 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006672
Martin v. Löwis11437992002-04-12 09:54:03 +00006673else
Matthias Kloseb9621712010-04-24 17:59:49 +00006674 if test "$ac_cv_type_float" = yes; then
6675 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6677{ as_fn_set_status 77
6678as_fn_error "cannot compute sizeof (float)
6679See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006680 else
6681 ac_cv_sizeof_float=0
6682 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006684
Martin v. Löwis11437992002-04-12 09:54:03 +00006685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6687$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006688
6689
6690
Martin v. Löwis11437992002-04-12 09:54:03 +00006691cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006692#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006693_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006694
6695
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006696# The cast to long int works around a bug in the HP C Compiler
6697# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6698# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6699# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6701$as_echo_n "checking size of double... " >&6; }
6702if test "${ac_cv_sizeof_double+set}" = set; then :
6703 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006704else
Matthias Kloseb9621712010-04-24 17:59:49 +00006705 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006706
Martin v. Löwis11437992002-04-12 09:54:03 +00006707else
Matthias Kloseb9621712010-04-24 17:59:49 +00006708 if test "$ac_cv_type_double" = yes; then
6709 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6710$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6711{ as_fn_set_status 77
6712as_fn_error "cannot compute sizeof (double)
6713See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006714 else
6715 ac_cv_sizeof_double=0
6716 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006718
Martin v. Löwis11437992002-04-12 09:54:03 +00006719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6721$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006722
6723
6724
Martin v. Löwis11437992002-04-12 09:54:03 +00006725cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006726#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006727_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006728
6729
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006730# The cast to long int works around a bug in the HP C Compiler
6731# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6732# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6733# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6735$as_echo_n "checking size of fpos_t... " >&6; }
6736if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6737 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006738else
Matthias Kloseb9621712010-04-24 17:59:49 +00006739 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006740
Martin v. Löwis11437992002-04-12 09:54:03 +00006741else
Matthias Kloseb9621712010-04-24 17:59:49 +00006742 if test "$ac_cv_type_fpos_t" = yes; then
6743 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6744$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6745{ as_fn_set_status 77
6746as_fn_error "cannot compute sizeof (fpos_t)
6747See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006748 else
6749 ac_cv_sizeof_fpos_t=0
6750 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006752
Martin v. Löwis11437992002-04-12 09:54:03 +00006753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6755$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006756
6757
6758
Martin v. Löwis11437992002-04-12 09:54:03 +00006759cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006760#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006761_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006762
Michael W. Hudson54241132001-12-07 15:38:26 +00006763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006764# The cast to long int works around a bug in the HP C Compiler
6765# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6766# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6767# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6769$as_echo_n "checking size of size_t... " >&6; }
6770if test "${ac_cv_sizeof_size_t+set}" = set; then :
6771 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006772else
Matthias Kloseb9621712010-04-24 17:59:49 +00006773 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 +00006774
Martin v. Löwis18e16552006-02-15 17:27:45 +00006775else
Matthias Kloseb9621712010-04-24 17:59:49 +00006776 if test "$ac_cv_type_size_t" = yes; then
6777 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6778$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6779{ as_fn_set_status 77
6780as_fn_error "cannot compute sizeof (size_t)
6781See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006782 else
6783 ac_cv_sizeof_size_t=0
6784 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006786
Martin v. Löwis18e16552006-02-15 17:27:45 +00006787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6789$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006790
6791
6792
Martin v. Löwis18e16552006-02-15 17:27:45 +00006793cat >>confdefs.h <<_ACEOF
6794#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6795_ACEOF
6796
6797
Christian Heimes400adb02008-02-01 08:12:03 +00006798# The cast to long int works around a bug in the HP C Compiler
6799# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6800# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6801# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6803$as_echo_n "checking size of pid_t... " >&6; }
6804if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6805 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006806else
Matthias Kloseb9621712010-04-24 17:59:49 +00006807 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 +00006808
Christian Heimes400adb02008-02-01 08:12:03 +00006809else
Matthias Kloseb9621712010-04-24 17:59:49 +00006810 if test "$ac_cv_type_pid_t" = yes; then
6811 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6812$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6813{ as_fn_set_status 77
6814as_fn_error "cannot compute sizeof (pid_t)
6815See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006816 else
6817 ac_cv_sizeof_pid_t=0
6818 fi
6819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006820
Christian Heimes400adb02008-02-01 08:12:03 +00006821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6823$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006824
6825
6826
6827cat >>confdefs.h <<_ACEOF
6828#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6829_ACEOF
6830
6831
Michael W. Hudson54241132001-12-07 15:38:26 +00006832
Matthias Kloseb9621712010-04-24 17:59:49 +00006833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6834$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006835have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006837/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006838
Martin v. Löwis11437992002-04-12 09:54:03 +00006839int
6840main ()
6841{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006842long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006843 ;
6844 return 0;
6845}
6846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006847if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006848
6849
Matthias Kloseb9621712010-04-24 17:59:49 +00006850$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006851
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006852 have_long_long=yes
6853
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6857$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006858if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006859# The cast to long int works around a bug in the HP C Compiler
6860# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6861# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6862# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6864$as_echo_n "checking size of long long... " >&6; }
6865if test "${ac_cv_sizeof_long_long+set}" = set; then :
6866 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006867else
Matthias Kloseb9621712010-04-24 17:59:49 +00006868 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 +00006869
Martin v. Löwis11437992002-04-12 09:54:03 +00006870else
Matthias Kloseb9621712010-04-24 17:59:49 +00006871 if test "$ac_cv_type_long_long" = yes; then
6872 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6873$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6874{ as_fn_set_status 77
6875as_fn_error "cannot compute sizeof (long long)
6876See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006877 else
6878 ac_cv_sizeof_long_long=0
6879 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006881
Martin v. Löwis11437992002-04-12 09:54:03 +00006882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6884$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006885
6886
6887
Martin v. Löwis11437992002-04-12 09:54:03 +00006888cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006889#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006890_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006891
Michael W. Hudson54241132001-12-07 15:38:26 +00006892
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006893fi
6894
Matthias Kloseb9621712010-04-24 17:59:49 +00006895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6896$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006897have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006899/* end confdefs.h. */
6900
6901int
6902main ()
6903{
6904long double x; x = (long double)0;
6905 ;
6906 return 0;
6907}
6908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006909if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006910
6911
Matthias Kloseb9621712010-04-24 17:59:49 +00006912$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006913
6914 have_long_double=yes
6915
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006916fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6919$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006920if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006921# The cast to long int works around a bug in the HP C Compiler
6922# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6923# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6924# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6926$as_echo_n "checking size of long double... " >&6; }
6927if test "${ac_cv_sizeof_long_double+set}" = set; then :
6928 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006929else
Matthias Kloseb9621712010-04-24 17:59:49 +00006930 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 +00006931
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006932else
Matthias Kloseb9621712010-04-24 17:59:49 +00006933 if test "$ac_cv_type_long_double" = yes; then
6934 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6935$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6936{ as_fn_set_status 77
6937as_fn_error "cannot compute sizeof (long double)
6938See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006939 else
6940 ac_cv_sizeof_long_double=0
6941 fi
6942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006943
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6946$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006947
6948
6949
6950cat >>confdefs.h <<_ACEOF
6951#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6952_ACEOF
6953
6954
6955fi
6956
6957
Matthias Kloseb9621712010-04-24 17:59:49 +00006958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6959$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006960have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00006962/* end confdefs.h. */
6963
6964int
6965main ()
6966{
6967_Bool x; x = (_Bool)0;
6968 ;
6969 return 0;
6970}
6971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006972if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00006973
6974
Matthias Kloseb9621712010-04-24 17:59:49 +00006975$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00006976
6977 have_c99_bool=yes
6978
Thomas Woutersb2137042007-02-01 18:02:27 +00006979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
6982$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006983if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006984# The cast to long int works around a bug in the HP C Compiler
6985# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6986# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6987# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
6989$as_echo_n "checking size of _Bool... " >&6; }
6990if test "${ac_cv_sizeof__Bool+set}" = set; then :
6991 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00006992else
Matthias Kloseb9621712010-04-24 17:59:49 +00006993 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 +00006994
Thomas Woutersb2137042007-02-01 18:02:27 +00006995else
Matthias Kloseb9621712010-04-24 17:59:49 +00006996 if test "$ac_cv_type__Bool" = yes; then
6997 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6998$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6999{ as_fn_set_status 77
7000as_fn_error "cannot compute sizeof (_Bool)
7001See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007002 else
7003 ac_cv_sizeof__Bool=0
7004 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007006
Thomas Woutersb2137042007-02-01 18:02:27 +00007007fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7009$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007010
7011
7012
Thomas Woutersb2137042007-02-01 18:02:27 +00007013cat >>confdefs.h <<_ACEOF
7014#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7015_ACEOF
7016
7017
7018fi
7019
Matthias Kloseb9621712010-04-24 17:59:49 +00007020ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007021 #include <stdint.h>
7022 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007023"
7024if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007025
7026cat >>confdefs.h <<_ACEOF
7027#define HAVE_UINTPTR_T 1
7028_ACEOF
7029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007030# The cast to long int works around a bug in the HP C Compiler
7031# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7032# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7033# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7035$as_echo_n "checking size of uintptr_t... " >&6; }
7036if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7037 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007038else
Matthias Kloseb9621712010-04-24 17:59:49 +00007039 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 +00007040
Martin v. Löwis11437992002-04-12 09:54:03 +00007041else
Matthias Kloseb9621712010-04-24 17:59:49 +00007042 if test "$ac_cv_type_uintptr_t" = yes; then
7043 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7044$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7045{ as_fn_set_status 77
7046as_fn_error "cannot compute sizeof (uintptr_t)
7047See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007048 else
7049 ac_cv_sizeof_uintptr_t=0
7050 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007051fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007052
Martin v. Löwis11437992002-04-12 09:54:03 +00007053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7055$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007056
7057
7058
Martin v. Löwis11437992002-04-12 09:54:03 +00007059cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007060#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007061_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007062
Michael W. Hudson54241132001-12-07 15:38:26 +00007063
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007064fi
7065
Thomas Wouters89f507f2006-12-13 04:49:30 +00007066
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007067# The cast to long int works around a bug in the HP C Compiler
7068# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7069# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7070# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7072$as_echo_n "checking size of off_t... " >&6; }
7073if test "${ac_cv_sizeof_off_t+set}" = set; then :
7074 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007075else
Matthias Kloseb9621712010-04-24 17:59:49 +00007076 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007077#ifdef HAVE_SYS_TYPES_H
7078#include <sys/types.h>
7079#endif
7080
Matthias Kloseb9621712010-04-24 17:59:49 +00007081"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007082
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007083else
Matthias Kloseb9621712010-04-24 17:59:49 +00007084 if test "$ac_cv_type_off_t" = yes; then
7085 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7086$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7087{ as_fn_set_status 77
7088as_fn_error "cannot compute sizeof (off_t)
7089See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007090 else
7091 ac_cv_sizeof_off_t=0
7092 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007093fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007094
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007095fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7097$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007098
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007099
7100
Martin v. Löwis11437992002-04-12 09:54:03 +00007101cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007102#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007103_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007104
Michael W. Hudson54241132001-12-07 15:38:26 +00007105
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007106
Matthias Kloseb9621712010-04-24 17:59:49 +00007107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7108$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007109if test "$have_long_long" = yes
7110then
7111if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007112 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007113
Matthias Kloseb9621712010-04-24 17:59:49 +00007114$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007115
Matthias Kloseb9621712010-04-24 17:59:49 +00007116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7117$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007118else
Matthias Kloseb9621712010-04-24 17:59:49 +00007119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7120$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007121fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007122else
Matthias Kloseb9621712010-04-24 17:59:49 +00007123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7124$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007125fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007126
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007127# The cast to long int works around a bug in the HP C Compiler
7128# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7129# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7130# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7132$as_echo_n "checking size of time_t... " >&6; }
7133if test "${ac_cv_sizeof_time_t+set}" = set; then :
7134 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007135else
Matthias Kloseb9621712010-04-24 17:59:49 +00007136 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007137#ifdef HAVE_SYS_TYPES_H
7138#include <sys/types.h>
7139#endif
7140#ifdef HAVE_TIME_H
7141#include <time.h>
7142#endif
7143
Matthias Kloseb9621712010-04-24 17:59:49 +00007144"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007145
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007146else
Matthias Kloseb9621712010-04-24 17:59:49 +00007147 if test "$ac_cv_type_time_t" = yes; then
7148 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7149$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7150{ as_fn_set_status 77
7151as_fn_error "cannot compute sizeof (time_t)
7152See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007153 else
7154 ac_cv_sizeof_time_t=0
7155 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007156fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007157
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007158fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7160$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007161
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007162
7163
Martin v. Löwis11437992002-04-12 09:54:03 +00007164cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007165#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007166_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007167
Michael W. Hudson54241132001-12-07 15:38:26 +00007168
7169
Trent Mick635f6fb2000-08-23 21:33:05 +00007170# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007171ac_save_cc="$CC"
7172if test "$ac_cv_kpthread" = "yes"
7173then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007174elif test "$ac_cv_kthread" = "yes"
7175then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007176elif test "$ac_cv_pthread" = "yes"
7177then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007178fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007179
Matthias Kloseb9621712010-04-24 17:59:49 +00007180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7181$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007182have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007184/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007185
7186 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007187int
7188main ()
7189{
Guido van Rossum12580492000-09-24 16:47:19 +00007190pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007191 ;
7192 return 0;
7193}
Matthias Kloseb159a552010-04-25 21:00:44 +00007194
Martin v. Löwis11437992002-04-12 09:54:03 +00007195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007196if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007197 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7201$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007202if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007203 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007204# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7205# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7206# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7208$as_echo_n "checking size of pthread_t... " >&6; }
7209if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7210 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007211else
Matthias Kloseb9621712010-04-24 17:59:49 +00007212 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007213#ifdef HAVE_PTHREAD_H
7214#include <pthread.h>
7215#endif
7216
Matthias Kloseb9621712010-04-24 17:59:49 +00007217"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007218
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007219else
Matthias Kloseb9621712010-04-24 17:59:49 +00007220 if test "$ac_cv_type_pthread_t" = yes; then
7221 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7222$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7223{ as_fn_set_status 77
7224as_fn_error "cannot compute sizeof (pthread_t)
7225See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007226 else
7227 ac_cv_sizeof_pthread_t=0
7228 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007229fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007230
Trent Mick635f6fb2000-08-23 21:33:05 +00007231fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7233$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007234
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007235
7236
Martin v. Löwis11437992002-04-12 09:54:03 +00007237cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007238#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007239_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007240
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007241
Trent Mick635f6fb2000-08-23 21:33:05 +00007242fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007243CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007244
Michael W. Hudson54241132001-12-07 15:38:26 +00007245
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007246case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007247 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007248 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7249 ;;
7250 Darwin/*)
7251 OTHER_LIBTOOL_OPT=""
7252 ;;
7253esac
7254
7255
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007256ARCH_RUN_32BIT=""
7257
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007258case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007259 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007260 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7261 if test "${enable_universalsdk}"; then
7262 :
7263 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007264 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007265 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007266 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007267 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007268 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007269 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007270 if test ${gcc_version} '<' 4.0
7271 then
7272 LIBTOOL_CRUFT="-lcc_dynamic"
7273 else
7274 LIBTOOL_CRUFT=""
7275 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007276 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007277 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007278else
Matthias Kloseb9621712010-04-24 17:59:49 +00007279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007280/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007281
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007282 #include <unistd.h>
7283 int main(int argc, char*argv[])
7284 {
7285 if (sizeof(long) == 4) {
7286 return 0;
7287 } else {
7288 return 1;
7289 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007290 }
7291
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007293if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007294 ac_osx_32bit=yes
7295else
Matthias Kloseb9621712010-04-24 17:59:49 +00007296 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007297fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007298rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7299 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007300fi
7301
7302
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007303 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007304 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007305 i386)
7306 MACOSX_DEFAULT_ARCH="i386"
7307 ;;
7308 ppc)
7309 MACOSX_DEFAULT_ARCH="ppc"
7310 ;;
7311 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007312 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007313 ;;
7314 esac
7315 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007316 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007317 i386)
7318 MACOSX_DEFAULT_ARCH="x86_64"
7319 ;;
7320 ppc)
7321 MACOSX_DEFAULT_ARCH="ppc64"
7322 ;;
7323 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007324 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007325 ;;
7326 esac
7327
7328 #ARCH_RUN_32BIT="true"
7329 fi
7330
7331 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007332 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007333 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007334esac
7335
Matthias Kloseb9621712010-04-24 17:59:49 +00007336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7337$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007338if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007339then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007340 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007341 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007342 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007343
Matthias Kloseb9621712010-04-24 17:59:49 +00007344$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007345
Matthias Kloseb9621712010-04-24 17:59:49 +00007346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7347$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007348 if test $enable_shared = "yes"
7349 then
Matthias Kloseb9621712010-04-24 17:59:49 +00007350 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 +00007351 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007352else
Matthias Kloseb9621712010-04-24 17:59:49 +00007353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7354$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007355fi
7356
Matthias Kloseb9621712010-04-24 17:59:49 +00007357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7358$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007359case $ac_sys_system/$ac_sys_release in
7360 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007361
Matthias Kloseb9621712010-04-24 17:59:49 +00007362$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007363
Matthias Kloseb9621712010-04-24 17:59:49 +00007364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7365$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007366 ;;
7367 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7369$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007370 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007371esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007372
Guido van Rossum0a516c91994-09-12 10:58:40 +00007373# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007374
Michael W. Hudson54241132001-12-07 15:38:26 +00007375
7376
7377
7378
Benjamin Peterson99f03762010-04-11 22:15:28 +00007379
Guido van Rossum0a516c91994-09-12 10:58:40 +00007380# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007381# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Kloseb9621712010-04-24 17:59:49 +00007382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7383$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007384if test -z "$SO"
7385then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007386 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +00007387 hp*|HP*)
7388 case `uname -m` in
7389 ia64) SO=.so;;
7390 *) SO=.sl;;
7391 esac
7392 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007393 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007394 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007395 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007396else
7397 # this might also be a termcap variable, see #610332
7398 echo
7399 echo '====================================================================='
7400 echo '+ +'
7401 echo '+ WARNING: You have set SO in your environment. +'
7402 echo '+ Do you really mean to change the extension for shared libraries? +'
7403 echo '+ Continuing in 10 seconds to let you to ponder. +'
7404 echo '+ +'
7405 echo '====================================================================='
7406 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007407fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7409$as_echo "$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00007410
Georg Brandlb1441c72009-01-03 22:33:39 +00007411
Thomas Wouters477c8d52006-05-27 19:21:47 +00007412cat >>confdefs.h <<_ACEOF
7413#define SHLIB_EXT "$SO"
7414_ACEOF
7415
Guido van Rossum0a516c91994-09-12 10:58:40 +00007416# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007417# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007418# (Shared libraries in this instance are shared modules to be loaded into
7419# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7421$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007422if test -z "$LDSHARED"
7423then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007424 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007425 AIX*)
7426 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007427 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007428 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007429 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007430 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007431 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007432 if test "$GCC" = "yes" ; then
7433 LDSHARED='$(CC) -shared'
7434 LDCXXSHARED='$(CXX) -shared'
7435 else
7436 LDSHARED='$(CC) -G'
7437 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007438 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007439 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007440 if test "$GCC" = "yes" ; then
7441 LDSHARED='$(CC) -shared'
7442 LDCXXSHARED='$(CXX) -shared'
7443 else
7444 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007445 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007446 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007447 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00007448 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007449 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007450 if test "$enable_framework" ; then
7451 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007452 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7453 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007454 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007455 else
7456 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007457 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007458 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007459 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007460 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +00007461 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007462 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007463 if test "$enable_framework" ; then
7464 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007465 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7466 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007467 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007468 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007469 # No framework, use the Python app as bundle-loader
7470 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007471 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007472 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007473 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007474 Darwin/*)
7475 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7476 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007477
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007478 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007479 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007480 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007481 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007482 fi
Jack Jansen6b08a402004-06-03 12:41:45 +00007483 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007484 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007485 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007486 else
7487 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007488 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007489 if test "$enable_framework" ; then
7490 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007491 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7492 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007493 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007494 else
7495 # No framework, use the Python app as bundle-loader
7496 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7497 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007498 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007499 fi
7500 fi
7501 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007502 Linux*|GNU*|QNX*)
7503 LDSHARED='$(CC) -shared'
7504 LDCXXSHARED='$(CXX) -shared';;
7505 BSD/OS*/4*)
7506 LDSHARED="gcc -shared"
7507 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007508 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007509 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007510 then
Benjamin Petersonab0a7522010-03-14 15:18:25 +00007511 LDSHARED='$(CC) -shared ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007512 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007513 else
7514 LDSHARED="ld -Bshareable ${LDFLAGS}"
7515 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007516 OpenBSD*)
7517 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7518 then
7519 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007520 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007521 else
7522 case `uname -r` in
7523 [01].* | 2.[0-7] | 2.[0-7].*)
7524 LDSHARED="ld -Bshareable ${LDFLAGS}"
7525 ;;
7526 *)
7527 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007528 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007529 ;;
7530 esac
7531 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007532 NetBSD*|DragonFly*)
7533 LDSHARED="cc -shared ${LDFLAGS}"
7534 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007535 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007536 if test "$GCC" = "yes" ; then
7537 LDSHARED='$(CC) -shared'
7538 LDCXXSHARED='$(CXX) -shared'
7539 else
7540 LDSHARED='$(CC) -G'
7541 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007542 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007543 SCO_SV*)
7544 LDSHARED='$(CC) -Wl,-G,-Bexport'
7545 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7546 CYGWIN*)
7547 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7548 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007549 *) LDSHARED="ld";;
7550 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007551fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7553$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007554LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007555BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007556# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007557# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7559$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007560if test -z "$CCSHARED"
7561then
Guido van Rossum07397971997-04-29 21:49:50 +00007562 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007563 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007564 then CCSHARED="-fPIC";
7565 elif test `uname -p` = sparc;
7566 then CCSHARED="-xcode=pic32";
7567 else CCSHARED="-Kpic";
7568 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007569 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007570 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007571 else CCSHARED="+z";
7572 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007573 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007574 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007575 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007576 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007577 if test "$GCC" = "yes"
7578 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007579 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007580 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007581 SCO_SV*)
7582 if test "$GCC" = "yes"
7583 then CCSHARED="-fPIC"
7584 else CCSHARED="-Kpic -belf"
7585 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007586 IRIX*/6*) case $CC in
7587 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007588 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007589 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007590 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7593$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007594# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007595# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7597$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007598if test -z "$LINKFORSHARED"
7599then
Guido van Rossum07397971997-04-29 21:49:50 +00007600 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007601 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007602 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007603 LINKFORSHARED="-Wl,-E -Wl,+s";;
7604# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007605 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007606 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007607 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007608 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007609 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007610 if test "$enable_framework"
7611 then
Jack Jansenda49e192005-01-07 13:08:22 +00007612 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007613 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007614 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007615 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007616 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007617 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007618 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007619 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7620 then
7621 LINKFORSHARED="-Wl,--export-dynamic"
7622 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007623 SunOS/5*) case $CC in
7624 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007625 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007626 then
7627 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007628 fi;;
7629 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007630 CYGWIN*)
7631 if test $enable_shared = "no"
7632 then
7633 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7634 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007635 QNX*)
7636 # -Wl,-E causes the symbols to be added to the dynamic
7637 # symbol table so that they can be found when a module
7638 # is loaded. -N 2048K causes the stack size to be set
7639 # to 2048 kilobytes so that the stack doesn't overflow
7640 # when running test_compile.py.
7641 LINKFORSHARED='-Wl,-E -N 2048K';;
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: $LINKFORSHARED" >&5
7645$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007646
Michael W. Hudson54241132001-12-07 15:38:26 +00007647
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007648
Matthias Kloseb9621712010-04-24 17:59:49 +00007649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7650$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007651if test ! "$LIBRARY" = "$LDLIBRARY"
7652then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007653 case $ac_sys_system in
7654 CYGWIN*)
7655 # Cygwin needs CCSHARED when building extension DLLs
7656 # but not when building the interpreter DLL.
7657 CFLAGSFORSHARED='';;
7658 *)
7659 CFLAGSFORSHARED='$(CCSHARED)'
7660 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7663$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007664
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007665# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7666# library (with --enable-shared).
7667# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007668# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7669# if it is not required, since it creates a dependency of the shared library
7670# to LIBS. This, in turn, means that applications linking the shared libpython
7671# don't need to link LIBS explicitly. The default should be only changed
7672# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007673
Matthias Kloseb9621712010-04-24 17:59:49 +00007674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7675$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007676case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007677 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007678 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007679esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7681$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007682
7683
Guido van Rossum627b2d71993-12-24 10:39:16 +00007684# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7686$as_echo_n "checking for dlopen in -ldl... " >&6; }
7687if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7688 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007689else
Martin v. Löwis11437992002-04-12 09:54:03 +00007690 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007691LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007693/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007694
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007695/* Override any GCC internal prototype to avoid an error.
7696 Use char because int might match the return type of a GCC
7697 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007698#ifdef __cplusplus
7699extern "C"
7700#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007701char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007702int
7703main ()
7704{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007705return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007706 ;
7707 return 0;
7708}
7709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007710if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007711 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007712else
Matthias Kloseb9621712010-04-24 17:59:49 +00007713 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007715rm -f core conftest.err conftest.$ac_objext \
7716 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007717LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7720$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7721if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007722 cat >>confdefs.h <<_ACEOF
7723#define HAVE_LIBDL 1
7724_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007725
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007726 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007727
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007728fi
7729 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7731$as_echo_n "checking for shl_load in -ldld... " >&6; }
7732if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7733 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007734else
Martin v. Löwis11437992002-04-12 09:54:03 +00007735 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007736LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007739
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007740/* Override any GCC internal prototype to avoid an error.
7741 Use char because int might match the return type of a GCC
7742 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007743#ifdef __cplusplus
7744extern "C"
7745#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007746char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007747int
7748main ()
7749{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007750return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007751 ;
7752 return 0;
7753}
7754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007755if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007756 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007757else
Matthias Kloseb9621712010-04-24 17:59:49 +00007758 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007760rm -f core conftest.err conftest.$ac_objext \
7761 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007762LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7765$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7766if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007767 cat >>confdefs.h <<_ACEOF
7768#define HAVE_LIBDLD 1
7769_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007770
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007771 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007772
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007773fi
7774 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007775
Georg Brandlb1441c72009-01-03 22:33:39 +00007776# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007777if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7779$as_echo_n "checking for library containing sem_init... " >&6; }
7780if test "${ac_cv_search_sem_init+set}" = set; then :
7781 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007782else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007783 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007785/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007787/* Override any GCC internal prototype to avoid an error.
7788 Use char because int might match the return type of a GCC
7789 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007790#ifdef __cplusplus
7791extern "C"
7792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007793char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007794int
7795main ()
7796{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007798 ;
7799 return 0;
7800}
7801_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802for ac_lib in '' pthread rt posix4; do
7803 if test -z "$ac_lib"; then
7804 ac_res="none required"
7805 else
7806 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007807 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007808 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007809 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007810 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007811fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007812rm -f core conftest.err conftest.$ac_objext \
7813 conftest$ac_exeext
7814 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007815 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007817done
Matthias Kloseb9621712010-04-24 17:59:49 +00007818if test "${ac_cv_search_sem_init+set}" = set; then :
7819
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007820else
7821 ac_cv_search_sem_init=no
7822fi
7823rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007824LIBS=$ac_func_search_save_LIBS
7825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7827$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007828ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007829if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007831
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007832fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007833 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007834 # posix4 on Solaris 2.6
7835 # pthread (first!) on Linux
7836fi
7837
Martin v. Löwis19d17342003-06-14 21:03:05 +00007838# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7840$as_echo_n "checking for textdomain in -lintl... " >&6; }
7841if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
7842 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007843else
7844 ac_check_lib_save_LIBS=$LIBS
7845LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007847/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007848
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007849/* Override any GCC internal prototype to avoid an error.
7850 Use char because int might match the return type of a GCC
7851 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007852#ifdef __cplusplus
7853extern "C"
7854#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007855char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007856int
7857main ()
7858{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007859return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007860 ;
7861 return 0;
7862}
7863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007864if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007865 ac_cv_lib_intl_textdomain=yes
7866else
Matthias Kloseb9621712010-04-24 17:59:49 +00007867 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007869rm -f core conftest.err conftest.$ac_objext \
7870 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007871LIBS=$ac_check_lib_save_LIBS
7872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7874$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
7875if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007876
Matthias Kloseb9621712010-04-24 17:59:49 +00007877$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007878
Brett Cannonc6d936e2009-06-07 20:09:53 +00007879 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007880fi
7881
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007882
7883# checks for system dependent C++ extensions support
7884case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007885 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7886$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007888/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007889
7890 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007891int
7892main ()
7893{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007894loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007895 ;
7896 return 0;
7897}
Matthias Kloseb159a552010-04-25 21:00:44 +00007898
Martin v. Löwis11437992002-04-12 09:54:03 +00007899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007900if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007901
Matthias Kloseb159a552010-04-25 21:00:44 +00007902
Matthias Kloseb9621712010-04-24 17:59:49 +00007903$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007904
Matthias Kloseb159a552010-04-25 21:00:44 +00007905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007906$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007907
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007908else
Matthias Kloseb159a552010-04-25 21:00:44 +00007909
7910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007911$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007912
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007914rm -f core conftest.err conftest.$ac_objext \
7915 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007916 *) ;;
7917esac
7918
Guido van Rossum70c7f481998-03-26 18:44:10 +00007919# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7921$as_echo_n "checking for t_open in -lnsl... " >&6; }
7922if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
7923 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007924else
Martin v. Löwis11437992002-04-12 09:54:03 +00007925 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007926LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007929
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007930/* Override any GCC internal prototype to avoid an error.
7931 Use char because int might match the return type of a GCC
7932 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007933#ifdef __cplusplus
7934extern "C"
7935#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007936char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007937int
7938main ()
7939{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007940return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007941 ;
7942 return 0;
7943}
7944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007945if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007946 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007947else
Matthias Kloseb9621712010-04-24 17:59:49 +00007948 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007949fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007950rm -f core conftest.err conftest.$ac_objext \
7951 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007952LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
7955$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
7956if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007957 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007958fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00007959 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00007960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7961$as_echo_n "checking for socket in -lsocket... " >&6; }
7962if test "${ac_cv_lib_socket_socket+set}" = set; then :
7963 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007964else
Martin v. Löwis11437992002-04-12 09:54:03 +00007965 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007966LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007968/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007969
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007970/* Override any GCC internal prototype to avoid an error.
7971 Use char because int might match the return type of a GCC
7972 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007973#ifdef __cplusplus
7974extern "C"
7975#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007976char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007977int
7978main ()
7979{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007980return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007981 ;
7982 return 0;
7983}
7984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007985if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007986 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007987else
Matthias Kloseb9621712010-04-24 17:59:49 +00007988 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007990rm -f core conftest.err conftest.$ac_objext \
7991 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007992LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
7995$as_echo "$ac_cv_lib_socket_socket" >&6; }
7996if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00007997 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00007998fi
7999 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008000
Matthias Kloseb9621712010-04-24 17:59:49 +00008001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8002$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008003
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008004# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008005if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008006 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8008$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008009LIBS="$withval $LIBS"
8010
8011else
Matthias Kloseb9621712010-04-24 17:59:49 +00008012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8013$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008014fi
8015
Guido van Rossum7f43da71994-08-01 12:15:30 +00008016
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008017if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008018 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8019set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8021$as_echo_n "checking for $ac_word... " >&6; }
8022if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8023 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008024else
8025 case $PKG_CONFIG in
8026 [\\/]* | ?:[\\/]*)
8027 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8028 ;;
8029 *)
8030 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8031for as_dir in $PATH
8032do
8033 IFS=$as_save_IFS
8034 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008035 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008036 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8037 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008039 break 2
8040 fi
8041done
Matthias Kloseb9621712010-04-24 17:59:49 +00008042 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008043IFS=$as_save_IFS
8044
8045 ;;
8046esac
8047fi
8048PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8049if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8051$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008052else
Matthias Kloseb9621712010-04-24 17:59:49 +00008053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8054$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008055fi
8056
8057
8058fi
8059if test -z "$ac_cv_path_PKG_CONFIG"; then
8060 ac_pt_PKG_CONFIG=$PKG_CONFIG
8061 # Extract the first word of "pkg-config", so it can be a program name with args.
8062set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8064$as_echo_n "checking for $ac_word... " >&6; }
8065if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8066 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008067else
8068 case $ac_pt_PKG_CONFIG in
8069 [\\/]* | ?:[\\/]*)
8070 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8071 ;;
8072 *)
8073 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8074for as_dir in $PATH
8075do
8076 IFS=$as_save_IFS
8077 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008078 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008079 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8080 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008081 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008082 break 2
8083 fi
8084done
Matthias Kloseb9621712010-04-24 17:59:49 +00008085 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008086IFS=$as_save_IFS
8087
8088 ;;
8089esac
8090fi
8091ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8092if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8094$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008095else
Matthias Kloseb9621712010-04-24 17:59:49 +00008096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8097$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008098fi
8099
8100 if test "x$ac_pt_PKG_CONFIG" = x; then
8101 PKG_CONFIG=""
8102 else
8103 case $cross_compiling:$ac_tool_warned in
8104yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008105{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8106$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008107ac_tool_warned=yes ;;
8108esac
8109 PKG_CONFIG=$ac_pt_PKG_CONFIG
8110 fi
8111else
8112 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8113fi
8114
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008115
8116# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8118$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008119
8120# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008121if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008122 withval=$with_system_expat;
8123fi
8124
8125
Matthias Kloseb9621712010-04-24 17:59:49 +00008126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8127$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008128
8129# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8131$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008132
8133# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008134if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008135 withval=$with_system_ffi;
8136fi
8137
8138
8139if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008140 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8141else
8142 LIBFFI_INCLUDEDIR=""
8143fi
8144
8145
Matthias Kloseb9621712010-04-24 17:59:49 +00008146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8147$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008148
Matthias Klose55708cc2009-04-30 08:06:49 +00008149# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8151$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008152
8153# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008154if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008155 withval=$with_dbmliborder;
8156if test x$with_dbmliborder = xyes
8157then
Matthias Kloseb9621712010-04-24 17:59:49 +00008158as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008159else
8160 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8161 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8162 then
Matthias Kloseb9621712010-04-24 17:59:49 +00008163 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008164 fi
8165 done
8166fi
8167fi
8168
Matthias Kloseb9621712010-04-24 17:59:49 +00008169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8170$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008171
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008172# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008173
8174
Matthias Kloseb9621712010-04-24 17:59:49 +00008175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8176$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008177
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008178# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008179if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008180 withval=$with_signal_module;
8181fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008182
8183
8184if test -z "$with_signal_module"
8185then with_signal_module="yes"
8186fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8188$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008189
8190if test "${with_signal_module}" = "yes"; then
8191 USE_SIGNAL_MODULE=""
8192 SIGNAL_OBJS=""
8193else
8194 USE_SIGNAL_MODULE="#"
8195 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8196fi
8197
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008198# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008199
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008200USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008201
Matthias Kloseb9621712010-04-24 17:59:49 +00008202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8203$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008204
Guido van Rossumec2f0731997-01-22 20:54:01 +00008205
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008206# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008207if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008208 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8210$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008211LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008212if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008213 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008214fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008215else
Matthias Kloseb9621712010-04-24 17:59:49 +00008216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8217$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008218fi
8219
Martin v. Löwis11437992002-04-12 09:54:03 +00008220
8221# Templates for things AC_DEFINEd more than once.
8222# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008223
8224
Martin v. Löwis11437992002-04-12 09:54:03 +00008225
8226
Matthias Kloseb9621712010-04-24 17:59:49 +00008227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8228$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008229
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008230# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008231if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008232 withval=$with_threads;
8233fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008234
8235
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008236# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008237
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008238# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008239if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008240 withval=$with_thread; with_threads=$with_thread
8241fi
8242
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008243
8244if test -z "$with_threads"
8245then with_threads="yes"
8246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8248$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008249
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008250
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008251if test "$with_threads" = "no"
8252then
8253 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008254elif test "$ac_cv_pthread_is_default" = yes
8255then
Matthias Kloseb9621712010-04-24 17:59:49 +00008256 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008257
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008258 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008259 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008260
8261 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008262 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008263elif test "$ac_cv_kpthread" = "yes"
8264then
8265 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008266 if test "$ac_cv_cxx_thread" = "yes"; then
8267 CXX="$CXX -Kpthread"
8268 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008269 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008270
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008271 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008272 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008273elif test "$ac_cv_kthread" = "yes"
8274then
8275 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008276 if test "$ac_cv_cxx_thread" = "yes"; then
8277 CXX="$CXX -Kthread"
8278 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008279 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008280
8281 posix_threads=yes
8282 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008283elif test "$ac_cv_pthread" = "yes"
8284then
8285 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008286 if test "$ac_cv_cxx_thread" = "yes"; then
8287 CXX="$CXX -pthread"
8288 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008289 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008290
8291 posix_threads=yes
8292 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008293else
8294 if test ! -z "$with_threads" -a -d "$with_threads"
8295 then LDFLAGS="$LDFLAGS -L$with_threads"
8296 fi
8297 if test ! -z "$withval" -a -d "$withval"
8298 then LDFLAGS="$LDFLAGS -L$withval"
8299 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008300
8301 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008302 # define _POSIX_THREADS in unistd.h. Some apparently don't
8303 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8305$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008307/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008308
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008309#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008310#ifdef _POSIX_THREADS
8311yes
8312#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008313
8314_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008315if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008316 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008317 unistd_defines_pthreads=yes
8318else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008319 unistd_defines_pthreads=no
8320fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008321rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008322
Matthias Kloseb9621712010-04-24 17:59:49 +00008323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8324$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008325
Matthias Kloseb9621712010-04-24 17:59:49 +00008326 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008327
Matthias Kloseb9621712010-04-24 17:59:49 +00008328 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8329if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8330 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008331
Matthias Kloseb9621712010-04-24 17:59:49 +00008332 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008333
Martin v. Löwis11437992002-04-12 09:54:03 +00008334
Matthias Kloseb9621712010-04-24 17:59:49 +00008335$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008336
8337 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008338 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008339else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008340
Matthias Kloseb9621712010-04-24 17:59:49 +00008341 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8342if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8343 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008344
Matthias Kloseb9621712010-04-24 17:59:49 +00008345 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008346
Martin v. Löwis11437992002-04-12 09:54:03 +00008347
Matthias Kloseb9621712010-04-24 17:59:49 +00008348$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008349
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008350 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008351else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008352
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008353 # Just looking for pthread_create in libpthread is not enough:
8354 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8355 # So we really have to include pthread.h, and then link.
8356 _libs=$LIBS
8357 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8359$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008361/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008362#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008363
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008364void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008365int
8366main ()
8367{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008368
8369pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008370 ;
8371 return 0;
8372}
8373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008374if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008375
Matthias Kloseb9621712010-04-24 17:59:49 +00008376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8377$as_echo "yes" >&6; }
8378 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008379
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008380 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008381 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008382else
Martin v. Löwis11437992002-04-12 09:54:03 +00008383
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008384 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008385 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8386if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8387 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008388
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008389 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008390 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008391else
Guido van Rossumad678af1998-10-02 14:42:15 +00008392
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8394$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8395if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8396 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008397else
Martin v. Löwis11437992002-04-12 09:54:03 +00008398 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008399LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008401/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008402
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008403/* Override any GCC internal prototype to avoid an error.
8404 Use char because int might match the return type of a GCC
8405 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008406#ifdef __cplusplus
8407extern "C"
8408#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008409char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008410int
8411main ()
8412{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008413return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008414 ;
8415 return 0;
8416}
8417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008418if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008419 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008420else
Matthias Kloseb9621712010-04-24 17:59:49 +00008421 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008423rm -f core conftest.err conftest.$ac_objext \
8424 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008425LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008426fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8428$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8429if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8430 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008431
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008432 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008433 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008434 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008435else
Greg Steinadf63d62000-07-05 10:38:09 +00008436
Matthias Kloseb9621712010-04-24 17:59:49 +00008437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8438$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8439if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8440 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008441else
Martin v. Löwis11437992002-04-12 09:54:03 +00008442 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008443LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008445/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008447/* Override any GCC internal prototype to avoid an error.
8448 Use char because int might match the return type of a GCC
8449 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008450#ifdef __cplusplus
8451extern "C"
8452#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008453char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008454int
8455main ()
8456{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008457return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008458 ;
8459 return 0;
8460}
8461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008462if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008463 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008464else
Matthias Kloseb9621712010-04-24 17:59:49 +00008465 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008466fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008467rm -f core conftest.err conftest.$ac_objext \
8468 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008469LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8472$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8473if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8474 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008475
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008476 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008477 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008478 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008479else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008480
Matthias Kloseb9621712010-04-24 17:59:49 +00008481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8482$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8483if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8484 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008485else
Martin v. Löwis11437992002-04-12 09:54:03 +00008486 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008487LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008489/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008490
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008491/* Override any GCC internal prototype to avoid an error.
8492 Use char because int might match the return type of a GCC
8493 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008494#ifdef __cplusplus
8495extern "C"
8496#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008497char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008498int
8499main ()
8500{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008501return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008502 ;
8503 return 0;
8504}
8505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008506if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008507 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008508else
Matthias Kloseb9621712010-04-24 17:59:49 +00008509 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008511rm -f core conftest.err conftest.$ac_objext \
8512 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008513LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008514fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8516$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8517if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8518 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008519
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008520 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008521 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008522 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008523else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008524
Matthias Kloseb9621712010-04-24 17:59:49 +00008525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8526$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8527if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8528 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008529else
Martin v. Löwis11437992002-04-12 09:54:03 +00008530 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008531LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008533/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008534
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008535/* Override any GCC internal prototype to avoid an error.
8536 Use char because int might match the return type of a GCC
8537 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008538#ifdef __cplusplus
8539extern "C"
8540#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008541char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008542int
8543main ()
8544{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008545return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008546 ;
8547 return 0;
8548}
8549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008550if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008551 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008552else
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008555rm -f core conftest.err conftest.$ac_objext \
8556 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008557LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008558fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8560$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8561if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8562 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008563
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008564 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008565 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008566 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008567else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008568
Martin v. Löwis130fb172001-07-19 11:00:41 +00008569 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008570fi
8571
Guido van Rossum627b2d71993-12-24 10:39:16 +00008572
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008573fi
8574
Guido van Rossum0be3e491997-05-22 20:33:33 +00008575fi
8576
Guido van Rossum49545951997-12-02 19:28:29 +00008577fi
8578
Guido van Rossumb93a8621998-05-07 13:27:32 +00008579fi
8580
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008582rm -f core conftest.err conftest.$ac_objext \
8583 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008584fi
8585
Martin v. Löwis11437992002-04-12 09:54:03 +00008586
8587fi
8588
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008589
Michael W. Hudson54241132001-12-07 15:38:26 +00008590
Matthias Kloseb9621712010-04-24 17:59:49 +00008591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8592$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8593if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8594 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008595else
Martin v. Löwis11437992002-04-12 09:54:03 +00008596 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008597LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008600
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008601/* Override any GCC internal prototype to avoid an error.
8602 Use char because int might match the return type of a GCC
8603 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008604#ifdef __cplusplus
8605extern "C"
8606#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008607char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008608int
8609main ()
8610{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008611return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008612 ;
8613 return 0;
8614}
8615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008616if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008617 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008618else
Matthias Kloseb9621712010-04-24 17:59:49 +00008619 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008621rm -f core conftest.err conftest.$ac_objext \
8622 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008623LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8626$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8627if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8628 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008629
Martin v. Löwis130fb172001-07-19 11:00:41 +00008630 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008631 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008632 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008633fi
8634
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008635
Neal Norwitza978ab02002-11-02 16:58:05 +00008636 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8638$as_echo_n "checking for thr_create in -lthread... " >&6; }
8639if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8640 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008641else
Martin v. Löwis11437992002-04-12 09:54:03 +00008642 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008643LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008646
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008647/* Override any GCC internal prototype to avoid an error.
8648 Use char because int might match the return type of a GCC
8649 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008650#ifdef __cplusplus
8651extern "C"
8652#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008653char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008654int
8655main ()
8656{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008657return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008658 ;
8659 return 0;
8660}
8661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008662if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008663 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008664else
Matthias Kloseb9621712010-04-24 17:59:49 +00008665 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008667rm -f core conftest.err conftest.$ac_objext \
8668 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008669LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8672$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8673if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8674 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008675
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008676 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008677 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008678 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008679fi
8680
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008681 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008682
Martin v. Löwis130fb172001-07-19 11:00:41 +00008683 if test "$USE_THREAD_MODULE" != "#"
8684 then
8685 # If the above checks didn't disable threads, (at least) OSF1
8686 # needs this '-threads' argument during linking.
8687 case $ac_sys_system in
8688 OSF1) LDLAST=-threads;;
8689 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008690 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008691fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008692
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008693if test "$posix_threads" = "yes"; then
8694 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008695
Matthias Kloseb9621712010-04-24 17:59:49 +00008696$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008697
8698 fi
8699
8700 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8701 case $ac_sys_system/$ac_sys_release in
8702 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008703$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008704
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008705 ;;
8706 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008707$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008708
8709 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008710 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008711$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008712
8713 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008714 esac
8715
Matthias Kloseb9621712010-04-24 17:59:49 +00008716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8717$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8718 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8719 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008720else
Matthias Kloseb9621712010-04-24 17:59:49 +00008721 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008722 ac_cv_pthread_system_supported=no
8723else
Matthias Kloseb9621712010-04-24 17:59:49 +00008724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008725/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008726#include <pthread.h>
8727 void *foo(void *parm) {
8728 return NULL;
8729 }
8730 main() {
8731 pthread_attr_t attr;
8732 pthread_t id;
8733 if (pthread_attr_init(&attr)) exit(-1);
8734 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8735 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8736 exit(0);
8737 }
8738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008739if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008740 ac_cv_pthread_system_supported=yes
8741else
Matthias Kloseb9621712010-04-24 17:59:49 +00008742 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008744rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8745 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008746fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008747
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008748
Guido van Rossum627b2d71993-12-24 10:39:16 +00008749fi
8750
Matthias Kloseb9621712010-04-24 17:59:49 +00008751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8752$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008753 if test "$ac_cv_pthread_system_supported" = "yes"; then
8754
Matthias Kloseb9621712010-04-24 17:59:49 +00008755$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008756
8757 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008758 for ac_func in pthread_sigmask
8759do :
8760 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8761if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008762 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008763#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008764_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008765 case $ac_sys_system in
8766 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008767
Matthias Kloseb9621712010-04-24 17:59:49 +00008768$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008769
8770 ;;
8771 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008772fi
8773done
8774
8775fi
8776
8777
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008778# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008779
Matthias Kloseb9621712010-04-24 17:59:49 +00008780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8781$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008782# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008783if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008784 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008785 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8787$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008788 ipv6=no
8789 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008790 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8791$as_echo "yes" >&6; }
8792 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008793
8794 ipv6=yes
8795 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008796 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008797else
Martin v. Löwis11437992002-04-12 09:54:03 +00008798
Matthias Kloseb9621712010-04-24 17:59:49 +00008799 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008800
Matthias Kloseb9621712010-04-24 17:59:49 +00008801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8802$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008803 ipv6=no
8804
8805else
Matthias Kloseb9621712010-04-24 17:59:49 +00008806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008807/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008808 /* AF_INET6 available check */
8809#include <sys/types.h>
8810#include <sys/socket.h>
8811main()
8812{
8813 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8814 exit(1);
8815 else
8816 exit(0);
8817}
8818
Martin v. Löwis11437992002-04-12 09:54:03 +00008819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008820if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008821
Matthias Kloseb9621712010-04-24 17:59:49 +00008822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8823$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008824 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008825
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008826else
Matthias Kloseb159a552010-04-25 21:00:44 +00008827
Matthias Kloseb9621712010-04-24 17:59:49 +00008828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8829$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008830 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008831
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008833rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8834 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008835fi
8836
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008837
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008838if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8840$as_echo_n "checking if RFC2553 API is available... " >&6; }
8841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008842/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008843
8844 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008845#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008846int
8847main ()
8848{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008849struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008850 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008851 ;
8852 return 0;
8853}
Matthias Kloseb159a552010-04-25 21:00:44 +00008854
Martin v. Löwis11437992002-04-12 09:54:03 +00008855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008856if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008857
8858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008859$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008860 ipv6=yes
8861
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008862else
Matthias Kloseb159a552010-04-25 21:00:44 +00008863
8864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008865$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008866 ipv6=no
8867
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008870fi
8871
8872if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008873 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008874
8875fi
8876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008877fi
8878
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008879
8880ipv6type=unknown
8881ipv6lib=none
8882ipv6trylibc=no
8883
8884if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8886$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008887 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8888 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008889 case $i in
8890 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008892/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008893
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008894#include <netinet/in.h>
8895#ifdef IPV6_INRIA_VERSION
8896yes
8897#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008898_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008899if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008900 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008901 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008902fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008903rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008904
8905 ;;
8906 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008908/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008909
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008910#include <netinet/in.h>
8911#ifdef __KAME__
8912yes
8913#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008914_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008915if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008916 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008917 ipv6type=$i;
8918 ipv6lib=inet6
8919 ipv6libdir=/usr/local/v6/lib
8920 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008921fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008922rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008923
8924 ;;
8925 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008927/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008928
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008929#include <features.h>
8930#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8931yes
8932#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008933_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008934if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008935 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008936 ipv6type=$i;
8937 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008938fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008939rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008940
8941 ;;
8942 linux-inet6)
8943 if test -d /usr/inet6; then
8944 ipv6type=$i
8945 ipv6lib=inet6
8946 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008947 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008948 fi
8949 ;;
8950 solaris)
8951 if test -f /etc/netconfig; then
8952 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
8953 ipv6type=$i
8954 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008955 fi
8956 fi
8957 ;;
8958 toshiba)
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 <sys/param.h>
8963#ifdef _TOSHIBA_INET6
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;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008971 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008972fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008973rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008974
8975 ;;
8976 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00008977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008978/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008979
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008980#include </usr/local/v6/include/sys/v6config.h>
8981#ifdef __V6D__
8982yes
8983#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008984_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008985if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008986 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008987 ipv6type=$i;
8988 ipv6lib=v6;
8989 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00008990 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008991fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008992rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008993
8994 ;;
8995 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00008996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008997/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008998
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008999#include <sys/param.h>
9000#ifdef _ZETA_MINAMI_INET6
9001yes
9002#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009003_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009004if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009005 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009006 ipv6type=$i;
9007 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009008 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009009fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009010rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009011
9012 ;;
9013 esac
9014 if test "$ipv6type" != "unknown"; then
9015 break
9016 fi
9017 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9019$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009020fi
9021
9022if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9023 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9024 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9025 echo "using lib$ipv6lib"
9026 else
9027 if test $ipv6trylibc = "yes"; then
9028 echo "using libc"
9029 else
9030 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9031 echo "You need to fetch lib$ipv6lib.a from appropriate"
9032 echo 'ipv6 kit and compile beforehand.'
9033 exit 1
9034 fi
9035 fi
9036fi
9037
Matthias Kloseb9621712010-04-24 17:59:49 +00009038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9039$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009041/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009042
9043 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009044int
9045main ()
9046{
9047FSIORefNum fRef = 0
9048 ;
9049 return 0;
9050}
Matthias Kloseb159a552010-04-25 21:00:44 +00009051
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009053if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009054
Matthias Kloseb159a552010-04-25 21:00:44 +00009055
Matthias Kloseb9621712010-04-24 17:59:49 +00009056$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009057
Matthias Kloseb9621712010-04-24 17:59:49 +00009058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9059$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009060
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009061else
Matthias Kloseb159a552010-04-25 21:00:44 +00009062
Matthias Kloseb9621712010-04-24 17:59:49 +00009063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9064$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009065
9066fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9068
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009069# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9071$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009072
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009073# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009074if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009075 withval=$with_doc_strings;
9076fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009077
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009078
9079if test -z "$with_doc_strings"
9080then with_doc_strings="yes"
9081fi
9082if test "$with_doc_strings" != "no"
9083then
9084
Matthias Kloseb9621712010-04-24 17:59:49 +00009085$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009086
9087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9089$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009090
Neil Schemenauera35c6882001-02-27 04:45:05 +00009091# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9093$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009094
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009095# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009096if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009097 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009098if test "$withval" != no
9099then
9100
Matthias Kloseb9621712010-04-24 17:59:49 +00009101$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009102
Matthias Kloseb9621712010-04-24 17:59:49 +00009103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9104$as_echo "yes" >&6; }
9105else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9106$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009107fi
9108else
Matthias Kloseb9621712010-04-24 17:59:49 +00009109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9110$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009111fi
9112
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009113
9114# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9116$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009117
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009118# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009119if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009120 withval=$with_pymalloc;
9121fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009122
Neil Schemenauera35c6882001-02-27 04:45:05 +00009123
Neil Schemenauer16c22972002-03-22 15:34:49 +00009124if test -z "$with_pymalloc"
9125then with_pymalloc="yes"
9126fi
9127if test "$with_pymalloc" != "no"
9128then
Martin v. Löwis11437992002-04-12 09:54:03 +00009129
Matthias Kloseb9621712010-04-24 17:59:49 +00009130$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009131
9132fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9134$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009135
Benjamin Peterson05159c42009-12-03 03:01:27 +00009136# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9138$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009139
9140# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009141if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009142 withval=$with_valgrind;
9143else
9144 with_valgrind=no
9145fi
9146
Matthias Kloseb9621712010-04-24 17:59:49 +00009147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9148$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009149if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009150 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9151if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009152
Matthias Kloseb9621712010-04-24 17:59:49 +00009153$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009154
9155else
Matthias Kloseb9621712010-04-24 17:59:49 +00009156 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009157
9158fi
9159
9160
9161fi
9162
Barry Warsawef82cd72000-06-30 16:21:01 +00009163# Check for --with-wctype-functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9165$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009166
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009167# Check whether --with-wctype-functions was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009168if test "${with_wctype_functions+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009169 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009170if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009171then
9172
Matthias Kloseb9621712010-04-24 17:59:49 +00009173$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009174
Matthias Kloseb9621712010-04-24 17:59:49 +00009175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9176$as_echo "yes" >&6; }
9177else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9178$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009179fi
9180else
Matthias Kloseb9621712010-04-24 17:59:49 +00009181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9182$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009183fi
9184
Barry Warsawef82cd72000-06-30 16:21:01 +00009185
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009186# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009187
Guido van Rossum98935bf2001-09-05 19:13:16 +00009188DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009189
Guido van Rossume97ee181999-12-20 21:27:22 +00009190# the dlopen() function means we might want to use dynload_shlib.o. some
9191# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009192for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009193do :
9194 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9195if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009196 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009197#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009198_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009199
Guido van Rossume97ee181999-12-20 21:27:22 +00009200fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009201done
Guido van Rossume97ee181999-12-20 21:27:22 +00009202
Michael W. Hudson54241132001-12-07 15:38:26 +00009203
Guido van Rossume97ee181999-12-20 21:27:22 +00009204# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9205# loading of modules.
9206
Matthias Kloseb9621712010-04-24 17:59:49 +00009207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9208$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009209if test -z "$DYNLOADFILE"
9210then
9211 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009212 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9213 if test "$ac_cv_func_dlopen" = yes
9214 then DYNLOADFILE="dynload_shlib.o"
9215 else DYNLOADFILE="dynload_aix.o"
9216 fi
9217 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009218 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009219 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9220 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009221 *)
9222 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9223 # out any dynamic loading
9224 if test "$ac_cv_func_dlopen" = yes
9225 then DYNLOADFILE="dynload_shlib.o"
9226 else DYNLOADFILE="dynload_stub.o"
9227 fi
9228 ;;
9229 esac
9230fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9232$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009233if test "$DYNLOADFILE" != "dynload_stub.o"
9234then
Martin v. Löwis11437992002-04-12 09:54:03 +00009235
Matthias Kloseb9621712010-04-24 17:59:49 +00009236$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009237
9238fi
9239
Neil Schemenauer4e425612001-06-19 15:44:15 +00009240# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9241
Michael W. Hudson54241132001-12-07 15:38:26 +00009242
Matthias Kloseb9621712010-04-24 17:59:49 +00009243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9244$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009245if test -z "$MACHDEP_OBJS"
9246then
Jack Jansene578a632001-08-15 01:27:14 +00009247 MACHDEP_OBJS=$extra_machdep_objs
9248else
9249 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009250fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9252$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009253
Guido van Rossum627b2d71993-12-24 10:39:16 +00009254# checks for library functions
Martin v. Löwis823725e2008-03-24 13:39:54 +00009255for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9256 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009257 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009258 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009259 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009260 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009261 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009262 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9263 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009264 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
9265 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009266 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009267 truncate uname unsetenv utimes waitpid wait3 wait4 \
9268 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009269do :
9270 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9271ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9272eval as_val=\$$as_ac_var
9273 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009274 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009275#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009276_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009277
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009278fi
9279done
9280
Michael W. Hudson54241132001-12-07 15:38:26 +00009281
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009282# For some functions, having a definition is not sufficient, since
9283# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9285$as_echo_n "checking for chroot... " >&6; }
9286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009287/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009288#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009289int
9290main ()
9291{
9292void *x=chroot
9293 ;
9294 return 0;
9295}
9296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009297if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009298
Matthias Kloseb9621712010-04-24 17:59:49 +00009299$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009300
Matthias Kloseb159a552010-04-25 21:00:44 +00009301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009302$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009303else
Matthias Kloseb9621712010-04-24 17:59:49 +00009304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9305$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009306
9307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9310$as_echo_n "checking for link... " >&6; }
9311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009312/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009313#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009314int
9315main ()
9316{
9317void *x=link
9318 ;
9319 return 0;
9320}
9321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009322if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009323
Matthias Kloseb9621712010-04-24 17:59:49 +00009324$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009325
Matthias Kloseb159a552010-04-25 21:00:44 +00009326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009327$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009328else
Matthias Kloseb9621712010-04-24 17:59:49 +00009329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9330$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009331
9332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9335$as_echo_n "checking for symlink... " >&6; }
9336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009337/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009338#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009339int
9340main ()
9341{
9342void *x=symlink
9343 ;
9344 return 0;
9345}
9346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009347if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009348
Matthias Kloseb9621712010-04-24 17:59:49 +00009349$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009350
Matthias Kloseb159a552010-04-25 21:00:44 +00009351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009352$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009353else
Matthias Kloseb9621712010-04-24 17:59:49 +00009354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9355$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009356
9357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9360$as_echo_n "checking for fchdir... " >&6; }
9361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009362/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009363#include <unistd.h>
9364int
9365main ()
9366{
9367void *x=fchdir
9368 ;
9369 return 0;
9370}
9371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009372if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009373
Matthias Kloseb9621712010-04-24 17:59:49 +00009374$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009375
Matthias Kloseb159a552010-04-25 21:00:44 +00009376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009377$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009378else
Matthias Kloseb9621712010-04-24 17:59:49 +00009379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9380$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009381
9382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9385$as_echo_n "checking for fsync... " >&6; }
9386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009387/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009388#include <unistd.h>
9389int
9390main ()
9391{
9392void *x=fsync
9393 ;
9394 return 0;
9395}
9396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009397if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009398
Matthias Kloseb9621712010-04-24 17:59:49 +00009399$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009400
Matthias Kloseb159a552010-04-25 21:00:44 +00009401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009402$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009403else
Matthias Kloseb9621712010-04-24 17:59:49 +00009404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9405$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009406
9407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9410$as_echo_n "checking for fdatasync... " >&6; }
9411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009412/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009413#include <unistd.h>
9414int
9415main ()
9416{
9417void *x=fdatasync
9418 ;
9419 return 0;
9420}
9421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009422if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009423
Matthias Kloseb9621712010-04-24 17:59:49 +00009424$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009425
Matthias Kloseb159a552010-04-25 21:00:44 +00009426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009427$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009428else
Matthias Kloseb9621712010-04-24 17:59:49 +00009429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9430$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009431
9432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9435$as_echo_n "checking for epoll... " >&6; }
9436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009437/* end confdefs.h. */
9438#include <sys/epoll.h>
9439int
9440main ()
9441{
9442void *x=epoll_create
9443 ;
9444 return 0;
9445}
9446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009447if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009448
Matthias Kloseb9621712010-04-24 17:59:49 +00009449$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009450
Matthias Kloseb159a552010-04-25 21:00:44 +00009451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009452$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009453else
Matthias Kloseb9621712010-04-24 17:59:49 +00009454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9455$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009456
9457fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9460$as_echo_n "checking for kqueue... " >&6; }
9461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009462/* end confdefs.h. */
9463
9464#include <sys/types.h>
9465#include <sys/event.h>
9466
9467int
9468main ()
9469{
9470int x=kqueue()
9471 ;
9472 return 0;
9473}
9474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009475if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009476
Matthias Kloseb9621712010-04-24 17:59:49 +00009477$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009478
Matthias Kloseb159a552010-04-25 21:00:44 +00009479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009480$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009481else
Matthias Kloseb9621712010-04-24 17:59:49 +00009482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9483$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009484
9485fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009487# On some systems (eg. FreeBSD 5), we would find a definition of the
9488# functions ctermid_r, setgroups in the library, but no prototype
9489# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9490# address to avoid compiler warnings and potential miscompilations
9491# because of the missing prototypes.
9492
Matthias Kloseb9621712010-04-24 17:59:49 +00009493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9494$as_echo_n "checking for ctermid_r... " >&6; }
9495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009496/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009497
9498#include "confdefs.h"
9499#include <stdio.h>
9500
Martin v. Löwisd5843682002-11-21 20:41:28 +00009501int
9502main ()
9503{
9504void* p = ctermid_r
9505 ;
9506 return 0;
9507}
9508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009509if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009510
Matthias Kloseb9621712010-04-24 17:59:49 +00009511$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009512
Matthias Kloseb159a552010-04-25 21:00:44 +00009513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009514$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009515else
Matthias Kloseb9621712010-04-24 17:59:49 +00009516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9517$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009518
9519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9521
Matthias Kloseb9621712010-04-24 17:59:49 +00009522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
9523$as_echo_n "checking for flock... " >&6; }
9524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009525/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009526
9527#include "confdefs.h"
9528#include <sys/file.h>
9529
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009530int
9531main ()
9532{
9533void* p = flock
9534 ;
9535 return 0;
9536}
9537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009538if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009539
Matthias Kloseb9621712010-04-24 17:59:49 +00009540$as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009541
Matthias Kloseb159a552010-04-25 21:00:44 +00009542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009543$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009544else
Matthias Kloseb9621712010-04-24 17:59:49 +00009545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9546$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009547
9548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9550
Matthias Kloseb9621712010-04-24 17:59:49 +00009551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9552$as_echo_n "checking for getpagesize... " >&6; }
9553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009554/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009555
9556#include "confdefs.h"
9557#include <unistd.h>
9558
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009559int
9560main ()
9561{
9562void* p = getpagesize
9563 ;
9564 return 0;
9565}
9566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009567if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009568
Matthias Kloseb9621712010-04-24 17:59:49 +00009569$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009570
Matthias Kloseb159a552010-04-25 21:00:44 +00009571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009572$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009573else
Matthias Kloseb9621712010-04-24 17:59:49 +00009574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9575$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009576
9577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009579
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009580for ac_prog in true
9581do
9582 # Extract the first word of "$ac_prog", so it can be a program name with args.
9583set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9585$as_echo_n "checking for $ac_word... " >&6; }
9586if test "${ac_cv_prog_TRUE+set}" = set; then :
9587 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009588else
9589 if test -n "$TRUE"; then
9590 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9591else
9592as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9593for as_dir in $PATH
9594do
9595 IFS=$as_save_IFS
9596 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009597 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009598 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 +00009599 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009600 $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 +00009601 break 2
9602 fi
9603done
Matthias Kloseb9621712010-04-24 17:59:49 +00009604 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009605IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009606
9607fi
9608fi
9609TRUE=$ac_cv_prog_TRUE
9610if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9612$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009613else
Matthias Kloseb9621712010-04-24 17:59:49 +00009614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9615$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009616fi
9617
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009618
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009619 test -n "$TRUE" && break
9620done
9621test -n "$TRUE" || TRUE="/bin/true"
9622
9623
Matthias Kloseb9621712010-04-24 17:59:49 +00009624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9625$as_echo_n "checking for inet_aton in -lc... " >&6; }
9626if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
9627 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009628else
9629 ac_check_lib_save_LIBS=$LIBS
9630LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009632/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009633
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634/* Override any GCC internal prototype to avoid an error.
9635 Use char because int might match the return type of a GCC
9636 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009637#ifdef __cplusplus
9638extern "C"
9639#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009640char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009641int
9642main ()
9643{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009644return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009645 ;
9646 return 0;
9647}
9648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009649if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009650 ac_cv_lib_c_inet_aton=yes
9651else
Matthias Kloseb9621712010-04-24 17:59:49 +00009652 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009654rm -f core conftest.err conftest.$ac_objext \
9655 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009656LIBS=$ac_check_lib_save_LIBS
9657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9659$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
9660if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009661 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009662else
Matthias Kloseb9621712010-04-24 17:59:49 +00009663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9664$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
9665if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
9666 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009667else
9668 ac_check_lib_save_LIBS=$LIBS
9669LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009671/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009672
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009673/* Override any GCC internal prototype to avoid an error.
9674 Use char because int might match the return type of a GCC
9675 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009676#ifdef __cplusplus
9677extern "C"
9678#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009679char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009680int
9681main ()
9682{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009683return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009684 ;
9685 return 0;
9686}
9687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009688if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009689 ac_cv_lib_resolv_inet_aton=yes
9690else
Matthias Kloseb9621712010-04-24 17:59:49 +00009691 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009693rm -f core conftest.err conftest.$ac_objext \
9694 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009695LIBS=$ac_check_lib_save_LIBS
9696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9698$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
9699if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009700 cat >>confdefs.h <<_ACEOF
9701#define HAVE_LIBRESOLV 1
9702_ACEOF
9703
9704 LIBS="-lresolv $LIBS"
9705
9706fi
9707
9708
9709fi
9710
9711
Christian Heimesd0764e22007-12-04 15:00:33 +00009712# On Tru64, chflags seems to be present, but calling it will
9713# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9715$as_echo_n "checking for chflags... " >&6; }
9716if test "${ac_cv_have_chflags+set}" = set; then :
9717 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009718else
Matthias Kloseb9621712010-04-24 17:59:49 +00009719 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009720 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009721else
Matthias Kloseb9621712010-04-24 17:59:49 +00009722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009723/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009724[
Christian Heimesd0764e22007-12-04 15:00:33 +00009725#include <sys/stat.h>
9726#include <unistd.h>
9727int main(int argc, char*argv[])
9728{
9729 if(chflags(argv[0], 0) != 0)
9730 return 1;
9731 return 0;
9732}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009733]
Christian Heimesd0764e22007-12-04 15:00:33 +00009734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009735if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009736 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009737else
Matthias Kloseb9621712010-04-24 17:59:49 +00009738 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9741 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009742fi
9743
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009744
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9747$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009748if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009749 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
9750if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009751 ac_cv_have_chflags="yes"
9752else
9753 ac_cv_have_chflags="no"
9754fi
9755
9756fi
9757if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009758
Matthias Kloseb9621712010-04-24 17:59:49 +00009759$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009760
9761fi
9762
Matthias Kloseb9621712010-04-24 17:59:49 +00009763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9764$as_echo_n "checking for lchflags... " >&6; }
9765if test "${ac_cv_have_lchflags+set}" = set; then :
9766 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009767else
Matthias Kloseb9621712010-04-24 17:59:49 +00009768 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009769 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009770else
Matthias Kloseb9621712010-04-24 17:59:49 +00009771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009772/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009773[
Christian Heimesd0764e22007-12-04 15:00:33 +00009774#include <sys/stat.h>
9775#include <unistd.h>
9776int main(int argc, char*argv[])
9777{
9778 if(lchflags(argv[0], 0) != 0)
9779 return 1;
9780 return 0;
9781}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009782]
Christian Heimesd0764e22007-12-04 15:00:33 +00009783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009784if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009785 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009786else
Matthias Kloseb9621712010-04-24 17:59:49 +00009787 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009789rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9790 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009791fi
9792
9793
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9796$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009797if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009798 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
9799if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009800 ac_cv_have_lchflags="yes"
9801else
9802 ac_cv_have_lchflags="no"
9803fi
9804
9805fi
9806if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009807
Matthias Kloseb9621712010-04-24 17:59:49 +00009808$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009809
9810fi
9811
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009812case $ac_sys_system/$ac_sys_release in
9813Darwin/*)
9814 _CUR_CFLAGS="${CFLAGS}"
9815 _CUR_LDFLAGS="${LDFLAGS}"
9816 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9817 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9818 ;;
9819esac
9820
Matthias Kloseb9621712010-04-24 17:59:49 +00009821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9822$as_echo_n "checking for inflateCopy in -lz... " >&6; }
9823if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
9824 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009825else
9826 ac_check_lib_save_LIBS=$LIBS
9827LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009829/* end confdefs.h. */
9830
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831/* Override any GCC internal prototype to avoid an error.
9832 Use char because int might match the return type of a GCC
9833 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009834#ifdef __cplusplus
9835extern "C"
9836#endif
9837char inflateCopy ();
9838int
9839main ()
9840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009841return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009842 ;
9843 return 0;
9844}
9845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009846if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009847 ac_cv_lib_z_inflateCopy=yes
9848else
Matthias Kloseb9621712010-04-24 17:59:49 +00009849 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009851rm -f core conftest.err conftest.$ac_objext \
9852 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009853LIBS=$ac_check_lib_save_LIBS
9854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9856$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
9857if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009858
Matthias Kloseb9621712010-04-24 17:59:49 +00009859$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009860
9861fi
9862
9863
9864case $ac_sys_system/$ac_sys_release in
9865Darwin/*)
9866 CFLAGS="${_CUR_CFLAGS}"
9867 LDFLAGS="${_CUR_LDFLAGS}"
9868 ;;
9869esac
9870
Matthias Kloseb9621712010-04-24 17:59:49 +00009871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9872$as_echo_n "checking for hstrerror... " >&6; }
9873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009874/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009875
9876#include "confdefs.h"
9877#include <netdb.h>
9878
Martin v. Löwise9416172003-05-03 10:12:45 +00009879int
9880main ()
9881{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009882void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009883 ;
9884 return 0;
9885}
9886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009887if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009888
Matthias Kloseb9621712010-04-24 17:59:49 +00009889$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009890
Matthias Kloseb159a552010-04-25 21:00:44 +00009891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009892$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009893else
Matthias Kloseb9621712010-04-24 17:59:49 +00009894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9895$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009896
9897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009898rm -f core conftest.err conftest.$ac_objext \
9899 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009900
Matthias Kloseb9621712010-04-24 17:59:49 +00009901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9902$as_echo_n "checking for inet_aton... " >&6; }
9903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009904/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009905
9906#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +00009907#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009908#include <sys/socket.h>
9909#include <netinet/in.h>
9910#include <arpa/inet.h>
9911
Martin v. Löwise9416172003-05-03 10:12:45 +00009912int
9913main ()
9914{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009915void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009916 ;
9917 return 0;
9918}
9919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009920if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009921
Matthias Kloseb9621712010-04-24 17:59:49 +00009922$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009923
Matthias Kloseb159a552010-04-25 21:00:44 +00009924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009925$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009926else
Matthias Kloseb9621712010-04-24 17:59:49 +00009927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9928$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009929
9930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009931rm -f core conftest.err conftest.$ac_objext \
9932 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009933
Matthias Kloseb9621712010-04-24 17:59:49 +00009934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
9935$as_echo_n "checking for inet_pton... " >&6; }
9936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009937/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009938
9939#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009940#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009941#include <sys/socket.h>
9942#include <netinet/in.h>
9943#include <arpa/inet.h>
9944
Martin v. Löwise9416172003-05-03 10:12:45 +00009945int
9946main ()
9947{
9948void* p = inet_pton
9949 ;
9950 return 0;
9951}
9952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009953if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009954
Matthias Kloseb9621712010-04-24 17:59:49 +00009955$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009956
Matthias Kloseb159a552010-04-25 21:00:44 +00009957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009958$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009959else
Matthias Kloseb9621712010-04-24 17:59:49 +00009960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9961$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009962
9963fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +00009965
Martin v. Löwisd6640d42003-07-06 09:29:52 +00009966# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +00009967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
9968$as_echo_n "checking for setgroups... " >&6; }
9969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009970/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009971
9972#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009973#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +00009974#ifdef HAVE_GRP_H
9975#include <grp.h>
9976#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +00009977
Martin v. Löwisd5843682002-11-21 20:41:28 +00009978int
9979main ()
9980{
9981void* p = setgroups
9982 ;
9983 return 0;
9984}
9985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009986if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009987
Matthias Kloseb9621712010-04-24 17:59:49 +00009988$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009989
Matthias Kloseb159a552010-04-25 21:00:44 +00009990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009991$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009992else
Matthias Kloseb9621712010-04-24 17:59:49 +00009993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9994$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009995
9996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009998
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009999# check for openpty and forkpty
10000
10001for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010002do :
10003 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
10004if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010005 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010006#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010007_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010008
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010009else
Matthias Kloseb9621712010-04-24 17:59:49 +000010010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10011$as_echo_n "checking for openpty in -lutil... " >&6; }
10012if test "${ac_cv_lib_util_openpty+set}" = set; then :
10013 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010014else
Martin v. Löwis11437992002-04-12 09:54:03 +000010015 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010016LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010018/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010020/* Override any GCC internal prototype to avoid an error.
10021 Use char because int might match the return type of a GCC
10022 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010023#ifdef __cplusplus
10024extern "C"
10025#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010026char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010027int
10028main ()
10029{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010030return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010031 ;
10032 return 0;
10033}
10034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010035if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010036 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010037else
Matthias Kloseb9621712010-04-24 17:59:49 +000010038 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010040rm -f core conftest.err conftest.$ac_objext \
10041 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010042LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10045$as_echo "$ac_cv_lib_util_openpty" >&6; }
10046if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10047 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010048 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010049else
Matthias Kloseb9621712010-04-24 17:59:49 +000010050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10051$as_echo_n "checking for openpty in -lbsd... " >&6; }
10052if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
10053 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010054else
10055 ac_check_lib_save_LIBS=$LIBS
10056LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010058/* end confdefs.h. */
10059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010060/* Override any GCC internal prototype to avoid an error.
10061 Use char because int might match the return type of a GCC
10062 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010063#ifdef __cplusplus
10064extern "C"
10065#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010066char openpty ();
10067int
10068main ()
10069{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010070return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010071 ;
10072 return 0;
10073}
10074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010075if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010076 ac_cv_lib_bsd_openpty=yes
10077else
Matthias Kloseb9621712010-04-24 17:59:49 +000010078 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010080rm -f core conftest.err conftest.$ac_objext \
10081 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010082LIBS=$ac_check_lib_save_LIBS
10083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10085$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10086if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10087 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010088 LIBS="$LIBS -lbsd"
10089fi
10090
10091
10092fi
10093
Fred Drake8cef4cf2000-06-28 16:40:38 +000010094
10095fi
10096done
10097
10098for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010099do :
10100 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10101if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010102 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010103#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010104_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010105
Fred Drake8cef4cf2000-06-28 16:40:38 +000010106else
Matthias Kloseb9621712010-04-24 17:59:49 +000010107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10108$as_echo_n "checking for forkpty in -lutil... " >&6; }
10109if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10110 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010111else
Martin v. Löwis11437992002-04-12 09:54:03 +000010112 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010113LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010117/* Override any GCC internal prototype to avoid an error.
10118 Use char because int might match the return type of a GCC
10119 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010120#ifdef __cplusplus
10121extern "C"
10122#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010123char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010124int
10125main ()
10126{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010127return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010128 ;
10129 return 0;
10130}
10131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010132if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010133 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010134else
Matthias Kloseb9621712010-04-24 17:59:49 +000010135 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010136fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010137rm -f core conftest.err conftest.$ac_objext \
10138 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010139LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010140fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10142$as_echo "$ac_cv_lib_util_forkpty" >&6; }
10143if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10144 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010145 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010146else
Matthias Kloseb9621712010-04-24 17:59:49 +000010147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10148$as_echo_n "checking for forkpty in -lbsd... " >&6; }
10149if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10150 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010151else
10152 ac_check_lib_save_LIBS=$LIBS
10153LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010155/* end confdefs.h. */
10156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010157/* Override any GCC internal prototype to avoid an error.
10158 Use char because int might match the return type of a GCC
10159 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010160#ifdef __cplusplus
10161extern "C"
10162#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010163char forkpty ();
10164int
10165main ()
10166{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010167return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010168 ;
10169 return 0;
10170}
10171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010172if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010173 ac_cv_lib_bsd_forkpty=yes
10174else
Matthias Kloseb9621712010-04-24 17:59:49 +000010175 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010176fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010177rm -f core conftest.err conftest.$ac_objext \
10178 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010179LIBS=$ac_check_lib_save_LIBS
10180fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10182$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10183if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10184 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010185 LIBS="$LIBS -lbsd"
10186fi
10187
10188
10189fi
10190
Fred Drake8cef4cf2000-06-28 16:40:38 +000010191
10192fi
10193done
10194
Jack Jansendd19cf82001-12-06 22:36:17 +000010195
Christian Heimesb186d002008-03-18 15:15:01 +000010196# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010197for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010198do :
10199 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10200if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010201 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010202#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010203_ACEOF
10204
10205fi
10206done
10207
10208
Michael W. Hudson54241132001-12-07 15:38:26 +000010209# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010210for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010211do :
10212 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10213ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10214eval as_val=\$$as_ac_var
10215 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010216 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010217#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010218_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010219
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010220fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010221done
10222
Michael W. Hudson54241132001-12-07 15:38:26 +000010223
Christian Heimesb186d002008-03-18 15:15:01 +000010224for ac_func in dup2 getcwd strdup
Matthias Kloseb9621712010-04-24 17:59:49 +000010225do :
10226 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10227ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10228eval as_val=\$$as_ac_var
10229 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010230 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010231#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010232_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010233
Martin v. Löwis1142de32002-03-29 16:28:31 +000010234else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010235 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010236 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010237 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
10238 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010239esac
10240
Martin v. Löwis1142de32002-03-29 16:28:31 +000010241fi
10242done
10243
10244
10245for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010246do :
10247 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10248if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010249 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010250#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010253/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010254#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010255int
10256main ()
10257{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010258getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010259 ;
10260 return 0;
10261}
10262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010263if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010264
Matthias Kloseb9621712010-04-24 17:59:49 +000010265$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010266
Guido van Rossum627b2d71993-12-24 10:39:16 +000010267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010269
Guido van Rossum627b2d71993-12-24 10:39:16 +000010270fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010271done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010272
Jack Jansen150753c2003-03-29 22:07:47 +000010273for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010274do :
10275 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10276if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010277 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010278#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010281/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010282#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010283int
10284main ()
10285{
10286setpgrp(0,0);
10287 ;
10288 return 0;
10289}
10290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010291if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010292
Matthias Kloseb9621712010-04-24 17:59:49 +000010293$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010294
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010297
10298fi
10299done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010300
Thomas Wouters3a584202000-08-05 23:28:51 +000010301for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010302do :
10303 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10304if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010305 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010306#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010309/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010310#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010311int
10312main ()
10313{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010314gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010315 ;
10316 return 0;
10317}
10318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010319if ac_fn_c_try_compile "$LINENO"; then :
10320
Guido van Rossum627b2d71993-12-24 10:39:16 +000010321else
Skip Montanaro6dead952003-09-25 14:50:04 +000010322
Matthias Kloseb9621712010-04-24 17:59:49 +000010323$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010324
Martin v. Löwis11437992002-04-12 09:54:03 +000010325
Guido van Rossum627b2d71993-12-24 10:39:16 +000010326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010328
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010329fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010330done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010331
Michael W. Hudson54241132001-12-07 15:38:26 +000010332
Matthias Kloseb9621712010-04-24 17:59:49 +000010333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10334$as_echo_n "checking for major... " >&6; }
10335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010336/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010337
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010338#if defined(MAJOR_IN_MKDEV)
10339#include <sys/mkdev.h>
10340#elif defined(MAJOR_IN_SYSMACROS)
10341#include <sys/sysmacros.h>
10342#else
10343#include <sys/types.h>
10344#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010345
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010346int
10347main ()
10348{
10349
10350 makedev(major(0),minor(0));
10351
10352 ;
10353 return 0;
10354}
10355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010356if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010357
10358
Matthias Kloseb9621712010-04-24 17:59:49 +000010359$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010360
Matthias Kloseb9621712010-04-24 17:59:49 +000010361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10362$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010363
10364else
Skip Montanaro6dead952003-09-25 14:50:04 +000010365
Matthias Kloseb9621712010-04-24 17:59:49 +000010366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10367$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010368
10369fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010370rm -f core conftest.err conftest.$ac_objext \
10371 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010372
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010373# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010374# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10376$as_echo_n "checking for getaddrinfo... " >&6; }
10377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010378/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010379
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010380#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010381#include <sys/socket.h>
10382#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010383#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010384
Martin v. Löwis11437992002-04-12 09:54:03 +000010385int
10386main ()
10387{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010388getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010389 ;
10390 return 0;
10391}
10392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010393if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010394 have_getaddrinfo=yes
10395else
Matthias Kloseb9621712010-04-24 17:59:49 +000010396 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010398rm -f core conftest.err conftest.$ac_objext \
10399 conftest$ac_exeext conftest.$ac_ext
10400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10401$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010402if test $have_getaddrinfo = yes
10403then
Matthias Kloseb9621712010-04-24 17:59:49 +000010404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10405$as_echo_n "checking getaddrinfo bug... " >&6; }
10406 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10407 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010408else
Matthias Kloseb9621712010-04-24 17:59:49 +000010409 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010410 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010411else
Matthias Kloseb9621712010-04-24 17:59:49 +000010412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010413/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010414
10415#include <sys/types.h>
10416#include <netdb.h>
10417#include <string.h>
10418#include <sys/socket.h>
10419#include <netinet/in.h>
10420
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010421int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010422{
10423 int passive, gaierr, inet4 = 0, inet6 = 0;
10424 struct addrinfo hints, *ai, *aitop;
10425 char straddr[INET6_ADDRSTRLEN], strport[16];
10426
10427 for (passive = 0; passive <= 1; passive++) {
10428 memset(&hints, 0, sizeof(hints));
10429 hints.ai_family = AF_UNSPEC;
10430 hints.ai_flags = passive ? AI_PASSIVE : 0;
10431 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010432 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010433 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10434 (void)gai_strerror(gaierr);
10435 goto bad;
10436 }
10437 for (ai = aitop; ai; ai = ai->ai_next) {
10438 if (ai->ai_addr == NULL ||
10439 ai->ai_addrlen == 0 ||
10440 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10441 straddr, sizeof(straddr), strport, sizeof(strport),
10442 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10443 goto bad;
10444 }
10445 switch (ai->ai_family) {
10446 case AF_INET:
10447 if (strcmp(strport, "54321") != 0) {
10448 goto bad;
10449 }
10450 if (passive) {
10451 if (strcmp(straddr, "0.0.0.0") != 0) {
10452 goto bad;
10453 }
10454 } else {
10455 if (strcmp(straddr, "127.0.0.1") != 0) {
10456 goto bad;
10457 }
10458 }
10459 inet4++;
10460 break;
10461 case AF_INET6:
10462 if (strcmp(strport, "54321") != 0) {
10463 goto bad;
10464 }
10465 if (passive) {
10466 if (strcmp(straddr, "::") != 0) {
10467 goto bad;
10468 }
10469 } else {
10470 if (strcmp(straddr, "::1") != 0) {
10471 goto bad;
10472 }
10473 }
10474 inet6++;
10475 break;
10476 case AF_UNSPEC:
10477 goto bad;
10478 break;
10479 default:
10480 /* another family support? */
10481 break;
10482 }
10483 }
10484 }
10485
10486 if (!(inet4 == 0 || inet4 == 2))
10487 goto bad;
10488 if (!(inet6 == 0 || inet6 == 2))
10489 goto bad;
10490
10491 if (aitop)
10492 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010493 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010494
10495 bad:
10496 if (aitop)
10497 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010498 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010499}
10500
Martin v. Löwis11437992002-04-12 09:54:03 +000010501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010502if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010503 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010504else
Matthias Kloseb9621712010-04-24 17:59:49 +000010505 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010506fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010507rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10508 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010510
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010511fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010512
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010514
Mark Dickinson2df5d282009-12-31 21:22:50 +000010515if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010516then
10517 if test $ipv6 = yes
10518 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010519 echo 'Fatal: You must get working getaddrinfo() function.'
10520 echo ' or you can specify "--disable-ipv6"'.
10521 exit 1
10522 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010523else
Martin v. Löwis11437992002-04-12 09:54:03 +000010524
Matthias Kloseb9621712010-04-24 17:59:49 +000010525$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010526
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010527fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010528for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010529do :
10530 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10531if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010532 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010533#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010534_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010535
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010536fi
10537done
10538
Michael W. Hudson54241132001-12-07 15:38:26 +000010539
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010540# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10542$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10543if test "${ac_cv_header_time+set}" = set; then :
10544 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010545else
Matthias Kloseb9621712010-04-24 17:59:49 +000010546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010547/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010548#include <sys/types.h>
10549#include <sys/time.h>
10550#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010551
Martin v. Löwis11437992002-04-12 09:54:03 +000010552int
10553main ()
10554{
10555if ((struct tm *) 0)
10556return 0;
10557 ;
10558 return 0;
10559}
10560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010561if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010562 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010563else
Matthias Kloseb9621712010-04-24 17:59:49 +000010564 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010565fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010567fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10569$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010570if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010571
Matthias Kloseb9621712010-04-24 17:59:49 +000010572$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010573
10574fi
10575
Matthias Kloseb9621712010-04-24 17:59:49 +000010576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10577$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10578if test "${ac_cv_struct_tm+set}" = set; then :
10579 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010580else
Matthias Kloseb9621712010-04-24 17:59:49 +000010581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010582/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010583#include <sys/types.h>
10584#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010585
Martin v. Löwis11437992002-04-12 09:54:03 +000010586int
10587main ()
10588{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010589struct tm tm;
10590 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010591 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010592 ;
10593 return 0;
10594}
10595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010596if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010597 ac_cv_struct_tm=time.h
10598else
Matthias Kloseb9621712010-04-24 17:59:49 +000010599 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010602fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10604$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010605if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010606
Matthias Kloseb9621712010-04-24 17:59:49 +000010607$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010608
10609fi
10610
Matthias Kloseb9621712010-04-24 17:59:49 +000010611ac_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 +000010612#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010613
Matthias Kloseb9621712010-04-24 17:59:49 +000010614"
10615if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010616
10617cat >>confdefs.h <<_ACEOF
10618#define HAVE_STRUCT_TM_TM_ZONE 1
10619_ACEOF
10620
10621
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010622fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010623
Martin v. Löwis11437992002-04-12 09:54:03 +000010624if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10625
Matthias Kloseb9621712010-04-24 17:59:49 +000010626$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010627
10628else
Matthias Kloseb9621712010-04-24 17:59:49 +000010629 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10630"
10631if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10632 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633else
Matthias Kloseb9621712010-04-24 17:59:49 +000010634 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010635fi
10636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010637cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010638#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010639_ACEOF
10640
Matthias Kloseb9621712010-04-24 17:59:49 +000010641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10642$as_echo_n "checking for tzname... " >&6; }
10643if test "${ac_cv_var_tzname+set}" = set; then :
10644 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010645else
Matthias Kloseb9621712010-04-24 17:59:49 +000010646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010647/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010648#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010649#if !HAVE_DECL_TZNAME
10650extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010651#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010652
Martin v. Löwis11437992002-04-12 09:54:03 +000010653int
10654main ()
10655{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010656return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010657 ;
10658 return 0;
10659}
10660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010661if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010662 ac_cv_var_tzname=yes
10663else
Matthias Kloseb9621712010-04-24 17:59:49 +000010664 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010665fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010666rm -f core conftest.err conftest.$ac_objext \
10667 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010668fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10670$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010671 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010672
Matthias Kloseb9621712010-04-24 17:59:49 +000010673$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010674
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010675 fi
10676fi
10677
Matthias Kloseb9621712010-04-24 17:59:49 +000010678ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10679if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010680
10681cat >>confdefs.h <<_ACEOF
10682#define HAVE_STRUCT_STAT_ST_RDEV 1
10683_ACEOF
10684
10685
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010686fi
10687
Matthias Kloseb9621712010-04-24 17:59:49 +000010688ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10689if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010690
Martin v. Löwis11437992002-04-12 09:54:03 +000010691cat >>confdefs.h <<_ACEOF
10692#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10693_ACEOF
10694
10695
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010696fi
10697
Matthias Kloseb9621712010-04-24 17:59:49 +000010698ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10699if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010700
10701cat >>confdefs.h <<_ACEOF
10702#define HAVE_STRUCT_STAT_ST_FLAGS 1
10703_ACEOF
10704
10705
10706fi
10707
Matthias Kloseb9621712010-04-24 17:59:49 +000010708ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10709if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010710
10711cat >>confdefs.h <<_ACEOF
10712#define HAVE_STRUCT_STAT_ST_GEN 1
10713_ACEOF
10714
10715
10716fi
10717
Matthias Kloseb9621712010-04-24 17:59:49 +000010718ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10719if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010720
10721cat >>confdefs.h <<_ACEOF
10722#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10723_ACEOF
10724
10725
10726fi
10727
Matthias Kloseb9621712010-04-24 17:59:49 +000010728ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10729if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010730
Martin v. Löwis11437992002-04-12 09:54:03 +000010731cat >>confdefs.h <<_ACEOF
10732#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10733_ACEOF
10734
10735
Matthias Kloseb9621712010-04-24 17:59:49 +000010736$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010737
10738else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010739 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010740 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010741 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10742 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010743esac
10744
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010745fi
10746
Michael W. Hudson54241132001-12-07 15:38:26 +000010747
Martin v. Löwis11437992002-04-12 09:54:03 +000010748
Matthias Kloseb9621712010-04-24 17:59:49 +000010749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10750$as_echo_n "checking for time.h that defines altzone... " >&6; }
10751if test "${ac_cv_header_time_altzone+set}" = set; then :
10752 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010753else
Matthias Kloseb159a552010-04-25 21:00:44 +000010754
Matthias Kloseb9621712010-04-24 17:59:49 +000010755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010756/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010757#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010758int
10759main ()
10760{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010761return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010762 ;
10763 return 0;
10764}
10765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010766if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010767 ac_cv_header_time_altzone=yes
10768else
Matthias Kloseb9621712010-04-24 17:59:49 +000010769 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010773fi
10774
Matthias Kloseb9621712010-04-24 17:59:49 +000010775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10776$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010777if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010778
Matthias Kloseb9621712010-04-24 17:59:49 +000010779$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010780
10781fi
10782
Guido van Rossumda88dad1995-01-26 00:46:29 +000010783was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10785$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010787/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010788
10789#include <sys/types.h>
10790#include <sys/select.h>
10791#include <sys/time.h>
10792
Martin v. Löwis11437992002-04-12 09:54:03 +000010793int
10794main ()
10795{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010796;
Martin v. Löwis11437992002-04-12 09:54:03 +000010797 ;
10798 return 0;
10799}
10800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010801if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010802
10803
Matthias Kloseb9621712010-04-24 17:59:49 +000010804$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010805
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010806 was_it_defined=yes
10807
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010808fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10811$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010812
Matthias Kloseb9621712010-04-24 17:59:49 +000010813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10814$as_echo_n "checking for addrinfo... " >&6; }
10815if test "${ac_cv_struct_addrinfo+set}" = set; then :
10816 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010817else
Matthias Kloseb9621712010-04-24 17:59:49 +000010818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010819/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010820#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010821int
10822main ()
10823{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010824struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010825 ;
10826 return 0;
10827}
10828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010829if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010830 ac_cv_struct_addrinfo=yes
10831else
Matthias Kloseb9621712010-04-24 17:59:49 +000010832 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10835fi
10836
Matthias Kloseb9621712010-04-24 17:59:49 +000010837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10838$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010839if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010840
Matthias Kloseb9621712010-04-24 17:59:49 +000010841$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010842
10843fi
10844
Matthias Kloseb9621712010-04-24 17:59:49 +000010845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10846$as_echo_n "checking for sockaddr_storage... " >&6; }
10847if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
10848 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010849else
Matthias Kloseb9621712010-04-24 17:59:49 +000010850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010851/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010852
10853# include <sys/types.h>
10854# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010855int
10856main ()
10857{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010858struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010859 ;
10860 return 0;
10861}
10862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010863if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010864 ac_cv_struct_sockaddr_storage=yes
10865else
Matthias Kloseb9621712010-04-24 17:59:49 +000010866 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10869fi
10870
Matthias Kloseb9621712010-04-24 17:59:49 +000010871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10872$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010873if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010874
Matthias Kloseb9621712010-04-24 17:59:49 +000010875$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010876
10877fi
10878
Guido van Rossum627b2d71993-12-24 10:39:16 +000010879# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010880
Matthias Kloseb9621712010-04-24 17:59:49 +000010881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10882$as_echo_n "checking whether char is unsigned... " >&6; }
10883if test "${ac_cv_c_char_unsigned+set}" = set; then :
10884 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010885else
Matthias Kloseb9621712010-04-24 17:59:49 +000010886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010887/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010888$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010889int
10890main ()
10891{
10892static int test_array [1 - 2 * !(((char) -1) < 0)];
10893test_array [0] = 0
10894
10895 ;
10896 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010897}
Martin v. Löwis11437992002-04-12 09:54:03 +000010898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010899if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010900 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010901else
Matthias Kloseb9621712010-04-24 17:59:49 +000010902 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10907$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010908if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010909 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010910
10911fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010912
Matthias Kloseb9621712010-04-24 17:59:49 +000010913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10914$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10915if test "${ac_cv_c_const+set}" = set; then :
10916 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010917else
Matthias Kloseb9621712010-04-24 17:59:49 +000010918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010919/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010920
Martin v. Löwis11437992002-04-12 09:54:03 +000010921int
10922main ()
10923{
10924/* FIXME: Include the comments suggested by Paul. */
10925#ifndef __cplusplus
10926 /* Ultrix mips cc rejects this. */
10927 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010928 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000010929 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010930 char const *const *pcpcc;
10931 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010932 /* NEC SVR4.0.2 mips cc rejects this. */
10933 struct point {int x, y;};
10934 static struct point const zero = {0,0};
10935 /* AIX XL C 1.02.0.0 rejects this.
10936 It does not let you subtract one const X* pointer from another in
10937 an arm of an if-expression whose if-part is not a constant
10938 expression */
10939 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010940 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010941 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010942 ++pcpcc;
10943 ppc = (char**) pcpcc;
10944 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010945 { /* SCO 3.2v4 cc rejects this. */
10946 char *t;
10947 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010948
Martin v. Löwis11437992002-04-12 09:54:03 +000010949 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010950 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010951 }
10952 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
10953 int x[] = {25, 17};
10954 const int *foo = &x[0];
10955 ++foo;
10956 }
10957 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10958 typedef const int *iptr;
10959 iptr p = 0;
10960 ++p;
10961 }
10962 { /* AIX XL C 1.02.0.0 rejects this saying
10963 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10964 struct s { int j; const int *ap[3]; };
10965 struct s *b; b->j = 5;
10966 }
10967 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10968 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010970 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010971 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000010972#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000010973
Martin v. Löwis11437992002-04-12 09:54:03 +000010974 ;
10975 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000010976}
Martin v. Löwis11437992002-04-12 09:54:03 +000010977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010978if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010979 ac_cv_c_const=yes
10980else
Matthias Kloseb9621712010-04-24 17:59:49 +000010981 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010984fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
10986$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010987if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010988
Matthias Kloseb9621712010-04-24 17:59:49 +000010989$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010990
10991fi
10992
Michael W. Hudson54241132001-12-07 15:38:26 +000010993
Guido van Rossumda88dad1995-01-26 00:46:29 +000010994works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
10996$as_echo_n "checking for working volatile... " >&6; }
10997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010998/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010999
Martin v. Löwis11437992002-04-12 09:54:03 +000011000int
11001main ()
11002{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011003volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011004 ;
11005 return 0;
11006}
11007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011008if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011009 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011010else
Skip Montanaro6dead952003-09-25 14:50:04 +000011011
Matthias Kloseb9621712010-04-24 17:59:49 +000011012$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011013
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011014
Guido van Rossum627b2d71993-12-24 10:39:16 +000011015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11018$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011019
Guido van Rossumda88dad1995-01-26 00:46:29 +000011020works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11022$as_echo_n "checking for working signed char... " >&6; }
11023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011024/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011025
Martin v. Löwis11437992002-04-12 09:54:03 +000011026int
11027main ()
11028{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011029signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011030 ;
11031 return 0;
11032}
11033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011034if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011035 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011036else
Skip Montanaro6dead952003-09-25 14:50:04 +000011037
Matthias Kloseb9621712010-04-24 17:59:49 +000011038$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011039
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011040
Guido van Rossum7f43da71994-08-01 12:15:30 +000011041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11044$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011045
Guido van Rossumda88dad1995-01-26 00:46:29 +000011046have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11048$as_echo_n "checking for prototypes... " >&6; }
11049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011050/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011051int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011052int
11053main ()
11054{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011055return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011056 ;
11057 return 0;
11058}
11059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011060if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011061
Matthias Kloseb9621712010-04-24 17:59:49 +000011062$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011063
Matthias Kloseb159a552010-04-25 21:00:44 +000011064 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11068$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011069
Guido van Rossumda88dad1995-01-26 00:46:29 +000011070works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11072$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011074/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011075
11076#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011077int foo(int x, ...) {
11078 va_list va;
11079 va_start(va, x);
11080 va_arg(va, int);
11081 va_arg(va, char *);
11082 va_arg(va, double);
11083 return 0;
11084}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011085
Martin v. Löwis11437992002-04-12 09:54:03 +000011086int
11087main ()
11088{
Guido van Rossum90eea071996-08-30 20:58:57 +000011089return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011090 ;
11091 return 0;
11092}
11093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011094if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011095
11096
Matthias Kloseb9621712010-04-24 17:59:49 +000011097$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011098
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011099 works=yes
11100
Guido van Rossum627b2d71993-12-24 10:39:16 +000011101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11104$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011105
Martin v. Löwisd6320502004-08-12 13:45:08 +000011106# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11108$as_echo_n "checking for socketpair... " >&6; }
11109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011110/* end confdefs.h. */
11111
11112#include <sys/types.h>
11113#include <sys/socket.h>
11114
11115int
11116main ()
11117{
11118void *x=socketpair
11119 ;
11120 return 0;
11121}
11122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011123if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011124
Matthias Kloseb9621712010-04-24 17:59:49 +000011125$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011126
Matthias Kloseb159a552010-04-25 21:00:44 +000011127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011128$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011129else
Matthias Kloseb9621712010-04-24 17:59:49 +000011130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11131$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011132
11133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011135
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011136# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11138$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011140/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011141#include <sys/types.h>
11142#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011143int
11144main ()
11145{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011146struct sockaddr x;
11147x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011148 ;
11149 return 0;
11150}
11151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011152if ac_fn_c_try_compile "$LINENO"; then :
11153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11154$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011155
Matthias Kloseb9621712010-04-24 17:59:49 +000011156$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011157
11158else
Matthias Kloseb9621712010-04-24 17:59:49 +000011159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11160$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011161
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011162fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011164
Guido van Rossumda88dad1995-01-26 00:46:29 +000011165va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11167$as_echo_n "checking whether va_list is an array... " >&6; }
11168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011169/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011170
11171#ifdef HAVE_STDARG_PROTOTYPES
11172#include <stdarg.h>
11173#else
11174#include <varargs.h>
11175#endif
11176
Martin v. Löwis11437992002-04-12 09:54:03 +000011177int
11178main ()
11179{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011180va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011181 ;
11182 return 0;
11183}
11184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011185if ac_fn_c_try_compile "$LINENO"; then :
11186
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011187else
Skip Montanaro6dead952003-09-25 14:50:04 +000011188
Martin v. Löwis11437992002-04-12 09:54:03 +000011189
Matthias Kloseb9621712010-04-24 17:59:49 +000011190$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011191
Guido van Rossumda88dad1995-01-26 00:46:29 +000011192 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011193
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11197$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011198
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011199# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011200
11201
Matthias Kloseb9621712010-04-24 17:59:49 +000011202ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11203if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011204
Matthias Kloseb9621712010-04-24 17:59:49 +000011205 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011206
Matthias Kloseb9621712010-04-24 17:59:49 +000011207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11208$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011209 OLD_CFLAGS=$CFLAGS
11210 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011212/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011213
11214# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011215
Martin v. Löwis11437992002-04-12 09:54:03 +000011216int
11217main ()
11218{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011219
11220 char *name;
11221 struct hostent *he, *res;
11222 char buffer[2048];
11223 int buflen = 2048;
11224 int h_errnop;
11225
11226 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011227
11228 ;
11229 return 0;
11230}
11231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011232if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011233
Matthias Kloseb9621712010-04-24 17:59:49 +000011234 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011235
Martin v. Löwis11437992002-04-12 09:54:03 +000011236
Matthias Kloseb9621712010-04-24 17:59:49 +000011237$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011238
Matthias Kloseb9621712010-04-24 17:59:49 +000011239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11240$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011241
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011242else
Skip Montanaro6dead952003-09-25 14:50:04 +000011243
Matthias Kloseb9621712010-04-24 17:59:49 +000011244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11245$as_echo "no" >&6; }
11246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11247$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011249/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011250
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011251# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011252
Martin v. Löwis11437992002-04-12 09:54:03 +000011253int
11254main ()
11255{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011256
11257 char *name;
11258 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011259 char buffer[2048];
11260 int buflen = 2048;
11261 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011262
Matthias Kloseb159a552010-04-25 21:00:44 +000011263 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011264
11265 ;
11266 return 0;
11267}
11268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011269if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011270
Matthias Kloseb9621712010-04-24 17:59:49 +000011271 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011272
Martin v. Löwis11437992002-04-12 09:54:03 +000011273
Matthias Kloseb159a552010-04-25 21:00:44 +000011274$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011275
Matthias Kloseb9621712010-04-24 17:59:49 +000011276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11277$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011278
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011279else
Skip Montanaro6dead952003-09-25 14:50:04 +000011280
Matthias Kloseb9621712010-04-24 17:59:49 +000011281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11282$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11284$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11286/* end confdefs.h. */
11287
11288# include <netdb.h>
11289
11290int
11291main ()
11292{
11293
11294 char *name;
11295 struct hostent *he;
11296 struct hostent_data data;
11297
11298 (void) gethostbyname_r(name, he, &data);
11299
11300 ;
11301 return 0;
11302}
11303_ACEOF
11304if ac_fn_c_try_compile "$LINENO"; then :
11305
11306 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11307
11308
11309$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11310
11311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11312$as_echo "yes" >&6; }
11313
11314else
11315
11316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11317$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011318
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011321
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011324
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011327 CFLAGS=$OLD_CFLAGS
11328
11329else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011330
Matthias Kloseb9621712010-04-24 17:59:49 +000011331 for ac_func in gethostbyname
11332do :
11333 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11334if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011335 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011336#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011337_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011338
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011339fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011340done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011341
Michael W. Hudson54241132001-12-07 15:38:26 +000011342
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011343fi
11344
Michael W. Hudson54241132001-12-07 15:38:26 +000011345
11346
11347
11348
11349
11350
Guido van Rossum627b2d71993-12-24 10:39:16 +000011351# checks for system services
11352# (none yet)
11353
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011354# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011355ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11356if test "x$ac_cv_func___fpu_control" = x""yes; then :
11357
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011358else
Matthias Kloseb9621712010-04-24 17:59:49 +000011359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11360$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11361if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11362 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011363else
Martin v. Löwis11437992002-04-12 09:54:03 +000011364 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011365LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011367/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011369/* Override any GCC internal prototype to avoid an error.
11370 Use char because int might match the return type of a GCC
11371 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011372#ifdef __cplusplus
11373extern "C"
11374#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011375char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011376int
11377main ()
11378{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011379return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011380 ;
11381 return 0;
11382}
11383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011384if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011385 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011386else
Matthias Kloseb9621712010-04-24 17:59:49 +000011387 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011388fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011389rm -f core conftest.err conftest.$ac_objext \
11390 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011391LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011392fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11394$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11395if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011396 cat >>confdefs.h <<_ACEOF
11397#define HAVE_LIBIEEE 1
11398_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011399
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011400 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011401
Guido van Rossum627b2d71993-12-24 10:39:16 +000011402fi
11403
Michael W. Hudson54241132001-12-07 15:38:26 +000011404
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011405fi
11406
Michael W. Hudson54241132001-12-07 15:38:26 +000011407
Guido van Rossum7f253911997-05-09 02:42:48 +000011408# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11410$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011411
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011412# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011413if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011414 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011415if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011416then
11417
Matthias Kloseb9621712010-04-24 17:59:49 +000011418$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011419
Matthias Kloseb9621712010-04-24 17:59:49 +000011420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11421$as_echo "yes" >&6; }
11422else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11423$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011424fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011425else
Matthias Kloseb9621712010-04-24 17:59:49 +000011426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11427$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011428fi
11429
Guido van Rossum7f253911997-05-09 02:42:48 +000011430
Guido van Rossum7f43da71994-08-01 12:15:30 +000011431# check for --with-libm=...
11432
Guido van Rossum563e7081996-09-10 18:20:48 +000011433case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011434Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011435*) LIBM=-lm
11436esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11438$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011440# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011441if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011442 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011443if test "$withval" = no
11444then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11446$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011447elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011448then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11450$as_echo "set LIBM=\"$withval\"" >&6; }
11451else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011452fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011453else
Matthias Kloseb9621712010-04-24 17:59:49 +000011454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11455$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011456fi
11457
Guido van Rossum7f43da71994-08-01 12:15:30 +000011458
11459# check for --with-libc=...
11460
Matthias Kloseb9621712010-04-24 17:59:49 +000011461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11462$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011464# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011465if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011466 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011467if test "$withval" = no
11468then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11470$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011471elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011472then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11474$as_echo "set LIBC=\"$withval\"" >&6; }
11475else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011476fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011477else
Matthias Kloseb9621712010-04-24 17:59:49 +000011478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11479$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011480fi
11481
Guido van Rossum7f43da71994-08-01 12:15:30 +000011482
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011483# **************************************************
11484# * Check for various properties of floating point *
11485# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011486
Matthias Kloseb9621712010-04-24 17:59:49 +000011487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11488$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11489if test "${ac_cv_little_endian_double+set}" = set; then :
11490 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011491else
11492
Matthias Kloseb9621712010-04-24 17:59:49 +000011493if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011494 ac_cv_little_endian_double=no
11495else
Matthias Kloseb9621712010-04-24 17:59:49 +000011496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011497/* end confdefs.h. */
11498
11499#include <string.h>
11500int main() {
11501 double x = 9006104071832581.0;
11502 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11503 return 0;
11504 else
11505 return 1;
11506}
11507
11508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011509if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011510 ac_cv_little_endian_double=yes
11511else
Matthias Kloseb9621712010-04-24 17:59:49 +000011512 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011513fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011514rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11515 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011516fi
11517
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011518fi
11519
Matthias Kloseb9621712010-04-24 17:59:49 +000011520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11521$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011522if test "$ac_cv_little_endian_double" = yes
11523then
11524
Matthias Kloseb9621712010-04-24 17:59:49 +000011525$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011526
11527fi
11528
Matthias Kloseb9621712010-04-24 17:59:49 +000011529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11530$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11531if test "${ac_cv_big_endian_double+set}" = set; then :
11532 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011533else
11534
Matthias Kloseb9621712010-04-24 17:59:49 +000011535if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011536 ac_cv_big_endian_double=no
11537else
Matthias Kloseb9621712010-04-24 17:59:49 +000011538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011539/* end confdefs.h. */
11540
11541#include <string.h>
11542int main() {
11543 double x = 9006104071832581.0;
11544 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11545 return 0;
11546 else
11547 return 1;
11548}
11549
11550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011551if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011552 ac_cv_big_endian_double=yes
11553else
Matthias Kloseb9621712010-04-24 17:59:49 +000011554 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011555fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11557 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011558fi
11559
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011560fi
11561
Matthias Kloseb9621712010-04-24 17:59:49 +000011562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11563$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011564if test "$ac_cv_big_endian_double" = yes
11565then
11566
Matthias Kloseb9621712010-04-24 17:59:49 +000011567$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011568
11569fi
11570
11571# Some ARM platforms use a mixed-endian representation for doubles.
11572# While Python doesn't currently have full support for these platforms
11573# (see e.g., issue 1762561), we can at least make sure that float <-> string
11574# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11576$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11577if test "${ac_cv_mixed_endian_double+set}" = set; then :
11578 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011579else
11580
Matthias Kloseb9621712010-04-24 17:59:49 +000011581if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011582 ac_cv_mixed_endian_double=no
11583else
Matthias Kloseb9621712010-04-24 17:59:49 +000011584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011585/* end confdefs.h. */
11586
11587#include <string.h>
11588int main() {
11589 double x = 9006104071832581.0;
11590 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11591 return 0;
11592 else
11593 return 1;
11594}
11595
11596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011597if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011598 ac_cv_mixed_endian_double=yes
11599else
Matthias Kloseb9621712010-04-24 17:59:49 +000011600 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011601fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011602rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11603 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011604fi
11605
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011606fi
11607
Matthias Kloseb9621712010-04-24 17:59:49 +000011608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11609$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011610if test "$ac_cv_mixed_endian_double" = yes
11611then
11612
Matthias Kloseb9621712010-04-24 17:59:49 +000011613$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011614
11615fi
11616
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011617# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011618# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011619# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011620# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011621# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011622# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011623
11624# This inline assembler syntax may also work for suncc and icc,
11625# so we try it on all platforms.
11626
Matthias Kloseb9621712010-04-24 17:59:49 +000011627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11628$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011630/* end confdefs.h. */
11631
11632int
11633main ()
11634{
11635
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011636 unsigned short cw;
11637 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11638 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011639
11640 ;
11641 return 0;
11642}
11643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011644if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011645 have_gcc_asm_for_x87=yes
11646else
Matthias Kloseb9621712010-04-24 17:59:49 +000011647 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011648fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11651$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011652if test "$have_gcc_asm_for_x87" = yes
11653then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011654
Matthias Kloseb9621712010-04-24 17:59:49 +000011655$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011656
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011657fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011658
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011659# Detect whether system arithmetic is subject to x87-style double
11660# rounding issues. The result of this test has little meaning on non
11661# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11662# mode is round-to-nearest and double rounding issues are present, and
11663# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11665$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011666# $BASECFLAGS may affect the result
11667ac_save_cc="$CC"
11668CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011669if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011670 ac_cv_x87_double_rounding=no
11671else
Matthias Kloseb9621712010-04-24 17:59:49 +000011672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011673/* end confdefs.h. */
11674
11675#include <stdlib.h>
11676#include <math.h>
11677int main() {
11678 volatile double x, y, z;
11679 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11680 x = 0.99999999999999989; /* 1-2**-53 */
11681 y = 1./x;
11682 if (y != 1.)
11683 exit(0);
11684 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11685 x = 1e16;
11686 y = 2.99999;
11687 z = x + y;
11688 if (z != 1e16+4.)
11689 exit(0);
11690 /* both tests show evidence of double rounding */
11691 exit(1);
11692}
11693
11694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011695if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011696 ac_cv_x87_double_rounding=no
11697else
Matthias Kloseb9621712010-04-24 17:59:49 +000011698 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011699fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011700rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11701 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011702fi
11703
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011704CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11706$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011707if test "$ac_cv_x87_double_rounding" = yes
11708then
11709
Matthias Kloseb9621712010-04-24 17:59:49 +000011710$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011711
11712fi
11713
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011714# ************************************
11715# * Check for mathematical functions *
11716# ************************************
11717
11718LIBS_SAVE=$LIBS
11719LIBS="$LIBS $LIBM"
11720
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011721# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11722# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11724$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
11725if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
11726 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011727else
11728
Matthias Kloseb9621712010-04-24 17:59:49 +000011729if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011730 ac_cv_tanh_preserves_zero_sign=no
11731else
Matthias Kloseb9621712010-04-24 17:59:49 +000011732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011733/* end confdefs.h. */
11734
11735#include <math.h>
11736#include <stdlib.h>
11737int main() {
11738 /* return 0 if either negative zeros don't exist
11739 on this platform or if negative zeros exist
11740 and tanh(-0.) == -0. */
11741 if (atan2(0., -1.) == atan2(-0., -1.) ||
11742 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11743 else exit(1);
11744}
11745
11746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011747if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011748 ac_cv_tanh_preserves_zero_sign=yes
11749else
Matthias Kloseb9621712010-04-24 17:59:49 +000011750 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011751fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11753 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011754fi
11755
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011756fi
11757
Matthias Kloseb9621712010-04-24 17:59:49 +000011758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11759$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011760if test "$ac_cv_tanh_preserves_zero_sign" = yes
11761then
11762
Matthias Kloseb9621712010-04-24 17:59:49 +000011763$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011764
11765fi
11766
Mark Dickinson9c113362009-09-05 10:36:23 +000011767for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011768do :
11769 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11770ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11771eval as_val=\$$as_ac_var
11772 if test "x$as_val" = x""yes; then :
Mark Dickinson9c113362009-09-05 10:36:23 +000011773 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011774#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000011775_ACEOF
11776
11777fi
11778done
11779
Mark Dickinson9c113362009-09-05 10:36:23 +000011780for ac_func in hypot lgamma log1p round tgamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011781do :
11782 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11783ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11784eval as_val=\$$as_ac_var
11785 if test "x$as_val" = x""yes; then :
Christian Heimes99170a52007-12-19 02:07:34 +000011786 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011787#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000011788_ACEOF
11789
11790fi
11791done
11792
Matthias Kloseb9621712010-04-24 17:59:49 +000011793ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11794"
11795if test "x$ac_cv_have_decl_isinf" = x""yes; then :
11796 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011797else
Matthias Kloseb9621712010-04-24 17:59:49 +000011798 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011799fi
11800
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011801cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011802#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011804ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11805"
11806if test "x$ac_cv_have_decl_isnan" = x""yes; then :
11807 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011808else
Matthias Kloseb9621712010-04-24 17:59:49 +000011809 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011810fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011811
11812cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011813#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011815ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11816"
11817if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
11818 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011819else
Matthias Kloseb9621712010-04-24 17:59:49 +000011820 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011821fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011822
11823cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011824#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011825_ACEOF
11826
11827
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011828LIBS=$LIBS_SAVE
11829
Mark Dickinsona614f042009-11-28 12:48:43 +000011830# For multiprocessing module, check that sem_open
11831# actually works. For FreeBSD versions <= 7.2,
11832# the kernel module that provides POSIX semaphores
11833# isn't loaded by default, so an attempt to call
11834# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11836$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
11837if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
11838 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011839else
Matthias Kloseb9621712010-04-24 17:59:49 +000011840 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011841 ac_cv_posix_semaphores_enabled=yes
11842else
Matthias Kloseb9621712010-04-24 17:59:49 +000011843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011844/* end confdefs.h. */
11845
11846#include <unistd.h>
11847#include <fcntl.h>
11848#include <stdio.h>
11849#include <semaphore.h>
11850#include <sys/stat.h>
11851
11852int main(void) {
11853 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11854 if (a == SEM_FAILED) {
11855 perror("sem_open");
11856 return 1;
11857 }
11858 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011859 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011860 return 0;
11861}
11862
11863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011864if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011865 ac_cv_posix_semaphores_enabled=yes
11866else
Matthias Kloseb9621712010-04-24 17:59:49 +000011867 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011868fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11870 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011871fi
11872
11873
Mark Dickinsona614f042009-11-28 12:48:43 +000011874fi
11875
Matthias Kloseb9621712010-04-24 17:59:49 +000011876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11877$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011878if test $ac_cv_posix_semaphores_enabled = no
11879then
11880
Matthias Kloseb9621712010-04-24 17:59:49 +000011881$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000011882
11883fi
11884
Mark Dickinson10683072009-04-18 21:18:19 +000011885# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000011886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
11887$as_echo_n "checking for broken sem_getvalue... " >&6; }
11888if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
11889 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011890else
Matthias Kloseb9621712010-04-24 17:59:49 +000011891 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011892 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000011893else
Matthias Kloseb9621712010-04-24 17:59:49 +000011894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000011895/* end confdefs.h. */
11896
11897#include <unistd.h>
11898#include <fcntl.h>
11899#include <stdio.h>
11900#include <semaphore.h>
11901#include <sys/stat.h>
11902
11903int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000011904 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000011905 int count;
11906 int res;
11907 if(a==SEM_FAILED){
11908 perror("sem_open");
11909 return 1;
11910
11911 }
11912 res = sem_getvalue(a, &count);
11913 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011914 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000011915 return res==-1 ? 1 : 0;
11916}
11917
Mark Dickinson10683072009-04-18 21:18:19 +000011918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011919if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011920 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000011921else
Matthias Kloseb9621712010-04-24 17:59:49 +000011922 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011923fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11925 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011926fi
11927
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011928
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011929fi
11930
Matthias Kloseb9621712010-04-24 17:59:49 +000011931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
11932$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011933if test $ac_cv_broken_sem_getvalue = yes
11934then
11935
Matthias Kloseb9621712010-04-24 17:59:49 +000011936$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011937
11938fi
11939
Mark Dickinsonbd792642009-03-18 20:06:12 +000011940# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000011941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
11942$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011943# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011944if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000011945 enableval=$enable_big_digits; case $enable_big_digits in
11946yes)
11947 enable_big_digits=30 ;;
11948no)
11949 enable_big_digits=15 ;;
1195015|30)
11951 ;;
11952*)
Matthias Kloseb9621712010-04-24 17:59:49 +000011953 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 +000011954esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
11956$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011957
11958cat >>confdefs.h <<_ACEOF
11959#define PYLONG_BITS_IN_DIGIT $enable_big_digits
11960_ACEOF
11961
11962
11963else
Matthias Kloseb9621712010-04-24 17:59:49 +000011964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
11965$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011966fi
11967
11968
Guido van Rossumef2255b2000-03-10 22:30:29 +000011969# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011970ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
11971if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011972
11973
Matthias Kloseb9621712010-04-24 17:59:49 +000011974$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011975
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011976 wchar_h="yes"
11977
Guido van Rossumef2255b2000-03-10 22:30:29 +000011978else
Martin v. Löwis11437992002-04-12 09:54:03 +000011979 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000011980
11981fi
11982
Michael W. Hudson54241132001-12-07 15:38:26 +000011983
Martin v. Löwis11437992002-04-12 09:54:03 +000011984
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000011985# determine wchar_t size
11986if test "$wchar_h" = yes
11987then
Matthias Kloseb9621712010-04-24 17:59:49 +000011988 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011989# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11990# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11991# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000011992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
11993$as_echo_n "checking size of wchar_t... " >&6; }
11994if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
11995 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011996else
Matthias Kloseb9621712010-04-24 17:59:49 +000011997 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
11998"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011999
Martin v. Löwis11437992002-04-12 09:54:03 +000012000else
Matthias Kloseb9621712010-04-24 17:59:49 +000012001 if test "$ac_cv_type_wchar_t" = yes; then
12002 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12004{ as_fn_set_status 77
12005as_fn_error "cannot compute sizeof (wchar_t)
12006See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012007 else
12008 ac_cv_sizeof_wchar_t=0
12009 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012011
Martin v. Löwis11437992002-04-12 09:54:03 +000012012fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12014$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012015
12016
12017
Martin v. Löwis11437992002-04-12 09:54:03 +000012018cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012019#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012020_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012021
Michael W. Hudson54241132001-12-07 15:38:26 +000012022
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012023fi
12024
Matthias Kloseb9621712010-04-24 17:59:49 +000012025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12026$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012027have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012029/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012030
12031#include <tcl.h>
12032#if TCL_UTF_MAX != 6
12033# error "NOT UCS4_TCL"
12034#endif
12035int
12036main ()
12037{
12038
12039 ;
12040 return 0;
12041}
12042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012043if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012044
12045
Matthias Kloseb9621712010-04-24 17:59:49 +000012046$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012047
12048 have_ucs4_tcl=yes
12049
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12053$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012054
Skip Montanaro6dead952003-09-25 14:50:04 +000012055# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012056if test "$wchar_h" = yes
12057then
12058 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12060$as_echo_n "checking whether wchar_t is signed... " >&6; }
12061 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12062 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012063else
12064
Matthias Kloseb9621712010-04-24 17:59:49 +000012065 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012066 ac_cv_wchar_t_signed=yes
12067else
Matthias Kloseb9621712010-04-24 17:59:49 +000012068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012069/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012070
12071 #include <wchar.h>
12072 int main()
12073 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012074 /* Success: exit code 0 */
12075 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012076 }
12077
12078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012079if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012080 ac_cv_wchar_t_signed=yes
12081else
Matthias Kloseb9621712010-04-24 17:59:49 +000012082 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012084rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12085 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012086fi
12087
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012088fi
12089
Matthias Kloseb9621712010-04-24 17:59:49 +000012090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12091$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012092fi
12093
Matthias Kloseb9621712010-04-24 17:59:49 +000012094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12095$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012096
12097# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012098if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012099 withval=$with_wide_unicode;
12100if test "$withval" != no
12101then unicode_size="4"
12102else unicode_size="2"
12103fi
12104
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012105else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012106
Georg Brandl52d168a2008-01-07 18:10:24 +000012107case "$have_ucs4_tcl" in
12108 yes) unicode_size="4" ;;
12109 *) unicode_size="2" ;;
12110esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012111
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012112fi
12113
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012114
12115
Georg Brandl52d168a2008-01-07 18:10:24 +000012116case "$unicode_size" in
Matthias Kloseb9621712010-04-24 17:59:49 +000012117 4) $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012118 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012120 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012121esac
12122
Michael W. Hudson54241132001-12-07 15:38:26 +000012123
Martin v. Löwis11437992002-04-12 09:54:03 +000012124
Georg Brandl52d168a2008-01-07 18:10:24 +000012125# wchar_t is only usable if it maps to an unsigned type
12126if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012127 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012128then
12129 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012130
Matthias Kloseb9621712010-04-24 17:59:49 +000012131$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012132
Matthias Kloseb9621712010-04-24 17:59:49 +000012133 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012134
Georg Brandl52d168a2008-01-07 18:10:24 +000012135elif test "$ac_cv_sizeof_short" = "$unicode_size"
12136then
12137 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012138 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012139
Georg Brandl52d168a2008-01-07 18:10:24 +000012140elif test "$ac_cv_sizeof_long" = "$unicode_size"
12141then
12142 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012143 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012144
Georg Brandl52d168a2008-01-07 18:10:24 +000012145else
12146 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12149$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012150
12151# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12153$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12154if test "${ac_cv_c_bigendian+set}" = set; then :
12155 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012156else
Matthias Kloseb9621712010-04-24 17:59:49 +000012157 ac_cv_c_bigendian=unknown
12158 # See if we're dealing with a universal compiler.
12159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12160/* end confdefs.h. */
12161#ifndef __APPLE_CC__
12162 not a universal capable compiler
12163 #endif
12164 typedef int dummy;
12165
Skip Montanaro6dead952003-09-25 14:50:04 +000012166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012167if ac_fn_c_try_compile "$LINENO"; then :
12168
12169 # Check for potential -arch flags. It is not universal unless
12170 # there are at least two -arch flags with different values.
12171 ac_arch=
12172 ac_prev=
12173 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12174 if test -n "$ac_prev"; then
12175 case $ac_word in
12176 i?86 | x86_64 | ppc | ppc64)
12177 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12178 ac_arch=$ac_word
12179 else
12180 ac_cv_c_bigendian=universal
12181 break
12182 fi
12183 ;;
12184 esac
12185 ac_prev=
12186 elif test "x$ac_word" = "x-arch"; then
12187 ac_prev=arch
12188 fi
12189 done
12190fi
12191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12192 if test $ac_cv_c_bigendian = unknown; then
12193 # See if sys/param.h defines the BYTE_ORDER macro.
12194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012195/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012196#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012197 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012198
Martin v. Löwis11437992002-04-12 09:54:03 +000012199int
12200main ()
12201{
Matthias Kloseb9621712010-04-24 17:59:49 +000012202#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12203 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12204 && LITTLE_ENDIAN)
12205 bogus endian macros
12206 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012207
12208 ;
12209 return 0;
12210}
12211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012212if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012213 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012215/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012216#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012217 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012218
Martin v. Löwis11437992002-04-12 09:54:03 +000012219int
12220main ()
12221{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012222#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012223 not big endian
12224 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012225
12226 ;
12227 return 0;
12228}
12229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012230if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012231 ac_cv_c_bigendian=yes
12232else
Matthias Kloseb9621712010-04-24 17:59:49 +000012233 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012236fi
12237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12238 fi
12239 if test $ac_cv_c_bigendian = unknown; then
12240 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012242/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012243#include <limits.h>
12244
Martin v. Löwis11437992002-04-12 09:54:03 +000012245int
12246main ()
12247{
Matthias Kloseb9621712010-04-24 17:59:49 +000012248#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12249 bogus endian macros
12250 #endif
12251
Martin v. Löwis11437992002-04-12 09:54:03 +000012252 ;
12253 return 0;
12254}
12255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012256if ac_fn_c_try_compile "$LINENO"; then :
12257 # It does; now see whether it defined to _BIG_ENDIAN or not.
12258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12259/* end confdefs.h. */
12260#include <limits.h>
12261
12262int
12263main ()
12264{
12265#ifndef _BIG_ENDIAN
12266 not big endian
12267 #endif
12268
12269 ;
12270 return 0;
12271}
12272_ACEOF
12273if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012274 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012275else
Matthias Kloseb9621712010-04-24 17:59:49 +000012276 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12279fi
12280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12281 fi
12282 if test $ac_cv_c_bigendian = unknown; then
12283 # Compile a test program.
12284 if test "$cross_compiling" = yes; then :
12285 # Try to guess by grepping values from an object file.
12286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12287/* end confdefs.h. */
12288short int ascii_mm[] =
12289 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12290 short int ascii_ii[] =
12291 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12292 int use_ascii (int i) {
12293 return ascii_mm[i] + ascii_ii[i];
12294 }
12295 short int ebcdic_ii[] =
12296 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12297 short int ebcdic_mm[] =
12298 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12299 int use_ebcdic (int i) {
12300 return ebcdic_mm[i] + ebcdic_ii[i];
12301 }
12302 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012303
Matthias Kloseb9621712010-04-24 17:59:49 +000012304int
12305main ()
12306{
12307return use_ascii (foo) == use_ebcdic (foo);
12308 ;
12309 return 0;
12310}
12311_ACEOF
12312if ac_fn_c_try_compile "$LINENO"; then :
12313 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12314 ac_cv_c_bigendian=yes
12315 fi
12316 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12317 if test "$ac_cv_c_bigendian" = unknown; then
12318 ac_cv_c_bigendian=no
12319 else
12320 # finding both strings is unlikely to happen, but who knows?
12321 ac_cv_c_bigendian=unknown
12322 fi
12323 fi
12324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012326else
Matthias Kloseb9621712010-04-24 17:59:49 +000012327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012328/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012329$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012330int
12331main ()
12332{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012333
Matthias Kloseb9621712010-04-24 17:59:49 +000012334 /* Are we little or big endian? From Harbison&Steele. */
12335 union
12336 {
12337 long int l;
12338 char c[sizeof (long int)];
12339 } u;
12340 u.l = 1;
12341 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012342
12343 ;
12344 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012345}
Martin v. Löwis11437992002-04-12 09:54:03 +000012346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012347if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012348 ac_cv_c_bigendian=no
12349else
Matthias Kloseb9621712010-04-24 17:59:49 +000012350 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012351fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012352rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12353 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012355
Matthias Kloseb9621712010-04-24 17:59:49 +000012356 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12359$as_echo "$ac_cv_c_bigendian" >&6; }
12360 case $ac_cv_c_bigendian in #(
12361 yes)
12362 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12363;; #(
12364 no)
12365 ;; #(
12366 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012367
Matthias Kloseb9621712010-04-24 17:59:49 +000012368$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012369
Matthias Kloseb9621712010-04-24 17:59:49 +000012370 ;; #(
12371 *)
12372 as_fn_error "unknown endianness
12373 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12374 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012375
Michael W. Hudson54241132001-12-07 15:38:26 +000012376
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012377# Check whether right shifting a negative integer extends the sign bit
12378# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12380$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12381if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12382 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012383else
Martin v. Löwis11437992002-04-12 09:54:03 +000012384
Matthias Kloseb9621712010-04-24 17:59:49 +000012385if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012386 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012387else
Matthias Kloseb9621712010-04-24 17:59:49 +000012388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012389/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012390
12391int main()
12392{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012393 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012394}
12395
Martin v. Löwis11437992002-04-12 09:54:03 +000012396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012397if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012398 ac_cv_rshift_extends_sign=yes
12399else
Matthias Kloseb9621712010-04-24 17:59:49 +000012400 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012402rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12403 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012404fi
12405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012406fi
12407
Matthias Kloseb9621712010-04-24 17:59:49 +000012408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12409$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012410if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012411then
Martin v. Löwis11437992002-04-12 09:54:03 +000012412
Matthias Kloseb9621712010-04-24 17:59:49 +000012413$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012414
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012415fi
12416
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012417# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12419$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12420if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12421 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012422else
Martin v. Löwis11437992002-04-12 09:54:03 +000012423
Matthias Kloseb9621712010-04-24 17:59:49 +000012424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012425/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012426#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012427int
12428main ()
12429{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012430
12431 FILE *f = fopen("/dev/null", "r");
12432 flockfile(f);
12433 getc_unlocked(f);
12434 funlockfile(f);
12435
Martin v. Löwis11437992002-04-12 09:54:03 +000012436 ;
12437 return 0;
12438}
12439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012440if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012441 ac_cv_have_getc_unlocked=yes
12442else
Matthias Kloseb9621712010-04-24 17:59:49 +000012443 ac_cv_have_getc_unlocked=no
12444fi
12445rm -f core conftest.err conftest.$ac_objext \
12446 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448
Matthias Kloseb9621712010-04-24 17:59:49 +000012449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12450$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012451if test "$ac_cv_have_getc_unlocked" = yes
12452then
Martin v. Löwis11437992002-04-12 09:54:03 +000012453
Matthias Kloseb9621712010-04-24 17:59:49 +000012454$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012455
12456fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012457
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012458# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012459# save the value of LIBS so we don't actually link Python with readline
12460LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012461
Gregory P. Smith18820942008-09-07 06:24:49 +000012462# On some systems we need to link readline to a termcap compatible
12463# library. NOTE: Keep the precedence of listed libraries synchronised
12464# with setup.py.
12465py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12467$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012468for py_libtermcap in "" ncursesw ncurses curses termcap; do
12469 if test -z "$py_libtermcap"; then
12470 READLINE_LIBS="-lreadline"
12471 else
12472 READLINE_LIBS="-lreadline -l$py_libtermcap"
12473 fi
12474 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012476/* end confdefs.h. */
12477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012478/* Override any GCC internal prototype to avoid an error.
12479 Use char because int might match the return type of a GCC
12480 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012481#ifdef __cplusplus
12482extern "C"
12483#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012484char readline ();
12485int
12486main ()
12487{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012488return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012489 ;
12490 return 0;
12491}
12492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012493if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012494 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012495fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012496rm -f core conftest.err conftest.$ac_objext \
12497 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012498 if test $py_cv_lib_readline = yes; then
12499 break
12500 fi
12501done
12502# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12503#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012504if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12506$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012507else
Matthias Kloseb9621712010-04-24 17:59:49 +000012508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12509$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012510
Matthias Kloseb9621712010-04-24 17:59:49 +000012511$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012512
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012513fi
12514
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012515# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12517$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12518if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12519 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012520else
12521 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012522LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012524/* end confdefs.h. */
12525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012526/* Override any GCC internal prototype to avoid an error.
12527 Use char because int might match the return type of a GCC
12528 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012529#ifdef __cplusplus
12530extern "C"
12531#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012532char rl_callback_handler_install ();
12533int
12534main ()
12535{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012536return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012537 ;
12538 return 0;
12539}
12540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012541if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012542 ac_cv_lib_readline_rl_callback_handler_install=yes
12543else
Matthias Kloseb9621712010-04-24 17:59:49 +000012544 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012545fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012546rm -f core conftest.err conftest.$ac_objext \
12547 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012548LIBS=$ac_check_lib_save_LIBS
12549fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12551$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12552if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012553
Matthias Kloseb9621712010-04-24 17:59:49 +000012554$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012555
12556fi
12557
12558
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012559# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012561/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012562#include <readline/readline.h>
12563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012564if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012565 have_readline=yes
12566else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012567 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012568
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012569fi
12570rm -f conftest.err conftest.$ac_ext
12571if test $have_readline = yes
12572then
Matthias Kloseb9621712010-04-24 17:59:49 +000012573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012574/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012575#include <readline/readline.h>
12576
12577_ACEOF
12578if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012579 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012580
Matthias Kloseb9621712010-04-24 17:59:49 +000012581$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012582
12583fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012584rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012585
Matthias Kloseb9621712010-04-24 17:59:49 +000012586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012587/* end confdefs.h. */
12588#include <readline/readline.h>
12589
12590_ACEOF
12591if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012592 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012593
Matthias Kloseb9621712010-04-24 17:59:49 +000012594$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012595
12596fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012597rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012598
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012599fi
12600
Martin v. Löwis0daad592001-09-30 21:09:59 +000012601# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12603$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12604if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12605 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012606else
Martin v. Löwis11437992002-04-12 09:54:03 +000012607 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012608LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012610/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012611
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012612/* Override any GCC internal prototype to avoid an error.
12613 Use char because int might match the return type of a GCC
12614 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012615#ifdef __cplusplus
12616extern "C"
12617#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012618char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012619int
12620main ()
12621{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012622return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012623 ;
12624 return 0;
12625}
12626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012627if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012628 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012629else
Matthias Kloseb9621712010-04-24 17:59:49 +000012630 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012631fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012632rm -f core conftest.err conftest.$ac_objext \
12633 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012634LIBS=$ac_check_lib_save_LIBS
12635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12637$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12638if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012639
Matthias Kloseb9621712010-04-24 17:59:49 +000012640$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012641
Martin v. Löwis0daad592001-09-30 21:09:59 +000012642fi
12643
Michael W. Hudson54241132001-12-07 15:38:26 +000012644
Thomas Wouters89d996e2007-09-08 17:39:28 +000012645# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12647$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12648if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12649 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012650else
12651 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012652LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012654/* end confdefs.h. */
12655
12656/* Override any GCC internal prototype to avoid an error.
12657 Use char because int might match the return type of a GCC
12658 builtin and then its argument prototype would still apply. */
12659#ifdef __cplusplus
12660extern "C"
12661#endif
12662char rl_completion_display_matches_hook ();
12663int
12664main ()
12665{
12666return rl_completion_display_matches_hook ();
12667 ;
12668 return 0;
12669}
12670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012671if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012672 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12673else
Matthias Kloseb9621712010-04-24 17:59:49 +000012674 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012675fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012676rm -f core conftest.err conftest.$ac_objext \
12677 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012678LIBS=$ac_check_lib_save_LIBS
12679fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12681$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12682if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012683
Matthias Kloseb9621712010-04-24 17:59:49 +000012684$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012685
12686fi
12687
12688
Martin v. Löwis0daad592001-09-30 21:09:59 +000012689# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12691$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12692if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12693 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012694else
Martin v. Löwis11437992002-04-12 09:54:03 +000012695 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012696LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012698/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012699
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012700/* Override any GCC internal prototype to avoid an error.
12701 Use char because int might match the return type of a GCC
12702 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012703#ifdef __cplusplus
12704extern "C"
12705#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012706char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012707int
12708main ()
12709{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012710return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012711 ;
12712 return 0;
12713}
12714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012715if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012716 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012717else
Matthias Kloseb9621712010-04-24 17:59:49 +000012718 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012720rm -f core conftest.err conftest.$ac_objext \
12721 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012722LIBS=$ac_check_lib_save_LIBS
12723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12725$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
12726if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012727
Matthias Kloseb9621712010-04-24 17:59:49 +000012728$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012729
Guido van Rossum353ae582001-07-10 16:45:32 +000012730fi
12731
Jack Jansendd19cf82001-12-06 22:36:17 +000012732
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012733# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012735/* end confdefs.h. */
12736#include <readline/readline.h>
12737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012738if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012739 have_readline=yes
12740else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012741 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012742
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012743fi
12744rm -f conftest.err conftest.$ac_ext
12745if test $have_readline = yes
12746then
Matthias Kloseb9621712010-04-24 17:59:49 +000012747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012748/* end confdefs.h. */
12749#include <readline/readline.h>
12750
12751_ACEOF
12752if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012753 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012754
Matthias Kloseb9621712010-04-24 17:59:49 +000012755$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012756
12757fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012758rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012759
12760fi
12761
Martin v. Löwis82bca632006-02-10 20:49:30 +000012762# End of readline checks: restore LIBS
12763LIBS=$LIBS_no_readline
12764
Matthias Kloseb9621712010-04-24 17:59:49 +000012765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12766$as_echo_n "checking for broken nice()... " >&6; }
12767if test "${ac_cv_broken_nice+set}" = set; then :
12768 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012769else
Martin v. Löwis11437992002-04-12 09:54:03 +000012770
Matthias Kloseb9621712010-04-24 17:59:49 +000012771if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012772 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012773else
Matthias Kloseb9621712010-04-24 17:59:49 +000012774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012775/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012776
12777int main()
12778{
12779 int val1 = nice(1);
12780 if (val1 != -1 && val1 == nice(2))
12781 exit(0);
12782 exit(1);
12783}
12784
Martin v. Löwis11437992002-04-12 09:54:03 +000012785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012786if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012787 ac_cv_broken_nice=yes
12788else
Matthias Kloseb9621712010-04-24 17:59:49 +000012789 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012790fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012791rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12792 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012793fi
12794
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012795fi
12796
Matthias Kloseb9621712010-04-24 17:59:49 +000012797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12798$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012799if test "$ac_cv_broken_nice" = yes
12800then
Martin v. Löwis11437992002-04-12 09:54:03 +000012801
Matthias Kloseb9621712010-04-24 17:59:49 +000012802$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012803
12804fi
12805
Matthias Kloseb9621712010-04-24 17:59:49 +000012806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12807$as_echo_n "checking for broken poll()... " >&6; }
12808if test "${ac_cv_broken_poll+set}" = set; then :
12809 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012810else
Matthias Kloseb9621712010-04-24 17:59:49 +000012811 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012812 ac_cv_broken_poll=no
12813else
Matthias Kloseb9621712010-04-24 17:59:49 +000012814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012815/* end confdefs.h. */
12816
12817#include <poll.h>
12818
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012819int main()
12820{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012821 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012822 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012823
12824 close (42);
12825
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012826 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012827 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012828 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012829 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012830 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012831 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012832 return 1;
12833}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012834
12835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012836if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012837 ac_cv_broken_poll=yes
12838else
Matthias Kloseb9621712010-04-24 17:59:49 +000012839 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012840fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12842 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012844
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012845fi
12846
Matthias Kloseb9621712010-04-24 17:59:49 +000012847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
12848$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012849if test "$ac_cv_broken_poll" = yes
12850then
12851
Matthias Kloseb9621712010-04-24 17:59:49 +000012852$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012853
12854fi
12855
Brett Cannon43802422005-02-10 20:48:03 +000012856# 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 +000012857# (which is not required by ISO C or UNIX spec) and/or if we support
12858# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000012859ac_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 +000012860#include <$ac_cv_struct_tm>
12861
Matthias Kloseb9621712010-04-24 17:59:49 +000012862"
12863if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000012864
12865cat >>confdefs.h <<_ACEOF
12866#define HAVE_STRUCT_TM_TM_ZONE 1
12867_ACEOF
12868
12869
12870fi
12871
12872if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12873
Matthias Kloseb9621712010-04-24 17:59:49 +000012874$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012875
12876else
Matthias Kloseb9621712010-04-24 17:59:49 +000012877 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12878"
12879if test "x$ac_cv_have_decl_tzname" = x""yes; then :
12880 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012881else
Matthias Kloseb9621712010-04-24 17:59:49 +000012882 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012883fi
12884
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012885cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012886#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012887_ACEOF
12888
Matthias Kloseb9621712010-04-24 17:59:49 +000012889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12890$as_echo_n "checking for tzname... " >&6; }
12891if test "${ac_cv_var_tzname+set}" = set; then :
12892 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012893else
Matthias Kloseb9621712010-04-24 17:59:49 +000012894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012895/* end confdefs.h. */
12896#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012897#if !HAVE_DECL_TZNAME
12898extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000012899#endif
12900
12901int
12902main ()
12903{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012904return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000012905 ;
12906 return 0;
12907}
12908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012909if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000012910 ac_cv_var_tzname=yes
12911else
Matthias Kloseb9621712010-04-24 17:59:49 +000012912 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000012913fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012914rm -f core conftest.err conftest.$ac_objext \
12915 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012916fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12918$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000012919 if test $ac_cv_var_tzname = yes; then
12920
Matthias Kloseb9621712010-04-24 17:59:49 +000012921$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012922
12923 fi
12924fi
12925
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012926
Martin v. Löwis1d459062005-03-14 21:23:33 +000012927# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000012928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
12929$as_echo_n "checking for working tzset()... " >&6; }
12930if test "${ac_cv_working_tzset+set}" = set; then :
12931 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012932else
12933
Matthias Kloseb9621712010-04-24 17:59:49 +000012934if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012935 ac_cv_working_tzset=no
12936else
Matthias Kloseb9621712010-04-24 17:59:49 +000012937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012938/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012939
12940#include <stdlib.h>
12941#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000012942#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000012943
12944#if HAVE_TZNAME
12945extern char *tzname[];
12946#endif
12947
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012948int main()
12949{
Brett Cannon18367812003-09-19 00:59:16 +000012950 /* Note that we need to ensure that not only does tzset(3)
12951 do 'something' with localtime, but it works as documented
12952 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000012953 This includes making sure that tzname is set properly if
12954 tm->tm_zone does not exist since it is the alternative way
12955 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000012956
12957 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000012958 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000012959 */
12960
Martin v. Löwis1d459062005-03-14 21:23:33 +000012961 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000012962 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
12963
Neal Norwitz7f2588c2003-04-11 15:35:53 +000012964 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012965 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000012966 if (localtime(&groundhogday)->tm_hour != 0)
12967 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000012968#if HAVE_TZNAME
12969 /* For UTC, tzname[1] is sometimes "", sometimes " " */
12970 if (strcmp(tzname[0], "UTC") ||
12971 (tzname[1][0] != 0 && tzname[1][0] != ' '))
12972 exit(1);
12973#endif
Brett Cannon18367812003-09-19 00:59:16 +000012974
Neal Norwitz7f2588c2003-04-11 15:35:53 +000012975 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012976 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000012977 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012978 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000012979#if HAVE_TZNAME
12980 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
12981 exit(1);
12982#endif
Brett Cannon18367812003-09-19 00:59:16 +000012983
12984 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
12985 tzset();
12986 if (localtime(&groundhogday)->tm_hour != 11)
12987 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000012988#if HAVE_TZNAME
12989 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
12990 exit(1);
12991#endif
12992
12993#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000012994 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
12995 exit(1);
12996 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
12997 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000012998#endif
Brett Cannon18367812003-09-19 00:59:16 +000012999
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013000 exit(0);
13001}
13002
13003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013004if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013005 ac_cv_working_tzset=yes
13006else
Matthias Kloseb9621712010-04-24 17:59:49 +000013007 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013009rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13010 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013011fi
13012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013013fi
13014
Matthias Kloseb9621712010-04-24 17:59:49 +000013015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13016$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013017if test "$ac_cv_working_tzset" = yes
13018then
13019
Matthias Kloseb9621712010-04-24 17:59:49 +000013020$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013021
13022fi
13023
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013024# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13026$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13027if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13028 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013029else
Matthias Kloseb9621712010-04-24 17:59:49 +000013030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013031/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013032#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013033int
13034main ()
13035{
13036
13037struct stat st;
13038st.st_mtim.tv_nsec = 1;
13039
13040 ;
13041 return 0;
13042}
13043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013044if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013045 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013046else
Matthias Kloseb9621712010-04-24 17:59:49 +000013047 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13050fi
13051
Matthias Kloseb9621712010-04-24 17:59:49 +000013052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13053$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013054if test "$ac_cv_stat_tv_nsec" = yes
13055then
13056
Matthias Kloseb9621712010-04-24 17:59:49 +000013057$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013058
13059fi
13060
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013061# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13063$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13064if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13065 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013066else
Matthias Kloseb9621712010-04-24 17:59:49 +000013067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013068/* end confdefs.h. */
13069#include <sys/stat.h>
13070int
13071main ()
13072{
13073
13074struct stat st;
13075st.st_mtimespec.tv_nsec = 1;
13076
13077 ;
13078 return 0;
13079}
13080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013081if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013082 ac_cv_stat_tv_nsec2=yes
13083else
Matthias Kloseb9621712010-04-24 17:59:49 +000013084 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13087fi
13088
Matthias Kloseb9621712010-04-24 17:59:49 +000013089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13090$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013091if test "$ac_cv_stat_tv_nsec2" = yes
13092then
13093
Matthias Kloseb9621712010-04-24 17:59:49 +000013094$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013095
13096fi
13097
Jack Jansen666b1e72001-10-31 12:11:48 +000013098# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13100$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13101if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13102 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013103else
Matthias Kloseb9621712010-04-24 17:59:49 +000013104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013105/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013106#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013107int
13108main ()
13109{
Jack Jansen666b1e72001-10-31 12:11:48 +000013110
13111 int rtn;
13112 rtn = mvwdelch(0,0,0);
13113
Martin v. Löwis11437992002-04-12 09:54:03 +000013114 ;
13115 return 0;
13116}
13117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013118if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013119 ac_cv_mvwdelch_is_expression=yes
13120else
Matthias Kloseb9621712010-04-24 17:59:49 +000013121 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013122fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13124fi
13125
Matthias Kloseb9621712010-04-24 17:59:49 +000013126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13127$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013128
13129if test "$ac_cv_mvwdelch_is_expression" = yes
13130then
Martin v. Löwis11437992002-04-12 09:54:03 +000013131
Matthias Kloseb9621712010-04-24 17:59:49 +000013132$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013133
13134fi
13135
Matthias Kloseb9621712010-04-24 17:59:49 +000013136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13137$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13138if test "${ac_cv_window_has_flags+set}" = set; then :
13139 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013140else
Matthias Kloseb9621712010-04-24 17:59:49 +000013141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013142/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013143#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013144int
13145main ()
13146{
Jack Jansen666b1e72001-10-31 12:11:48 +000013147
13148 WINDOW *w;
13149 w->_flags = 0;
13150
Martin v. Löwis11437992002-04-12 09:54:03 +000013151 ;
13152 return 0;
13153}
13154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013155if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013156 ac_cv_window_has_flags=yes
13157else
Matthias Kloseb9621712010-04-24 17:59:49 +000013158 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13161fi
13162
Matthias Kloseb9621712010-04-24 17:59:49 +000013163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13164$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013165
Jack Jansen666b1e72001-10-31 12:11:48 +000013166
13167if test "$ac_cv_window_has_flags" = yes
13168then
Martin v. Löwis11437992002-04-12 09:54:03 +000013169
Matthias Kloseb9621712010-04-24 17:59:49 +000013170$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013171
13172fi
13173
Matthias Kloseb9621712010-04-24 17:59:49 +000013174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13175$as_echo_n "checking for is_term_resized... " >&6; }
13176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013177/* end confdefs.h. */
13178#include <curses.h>
13179int
13180main ()
13181{
13182void *x=is_term_resized
13183 ;
13184 return 0;
13185}
13186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013187if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013188
Matthias Kloseb9621712010-04-24 17:59:49 +000013189$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013190
Matthias Kloseb159a552010-04-25 21:00:44 +000013191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013192$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013193else
Matthias Kloseb9621712010-04-24 17:59:49 +000013194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13195$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013196
13197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13199
Matthias Kloseb9621712010-04-24 17:59:49 +000013200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13201$as_echo_n "checking for resize_term... " >&6; }
13202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013203/* end confdefs.h. */
13204#include <curses.h>
13205int
13206main ()
13207{
13208void *x=resize_term
13209 ;
13210 return 0;
13211}
13212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013213if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013214
Matthias Kloseb9621712010-04-24 17:59:49 +000013215$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013216
Matthias Kloseb159a552010-04-25 21:00:44 +000013217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013218$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013219else
Matthias Kloseb9621712010-04-24 17:59:49 +000013220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13221$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013222
13223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13225
Matthias Kloseb9621712010-04-24 17:59:49 +000013226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13227$as_echo_n "checking for resizeterm... " >&6; }
13228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013229/* end confdefs.h. */
13230#include <curses.h>
13231int
13232main ()
13233{
13234void *x=resizeterm
13235 ;
13236 return 0;
13237}
13238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013239if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013240
Matthias Kloseb9621712010-04-24 17:59:49 +000013241$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013242
Matthias Kloseb159a552010-04-25 21:00:44 +000013243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013244$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013245else
Matthias Kloseb9621712010-04-24 17:59:49 +000013246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13247$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013248
13249fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13251
Matthias Kloseb9621712010-04-24 17:59:49 +000013252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13253$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013254
13255if test -r /dev/ptmx
13256then
Matthias Kloseb9621712010-04-24 17:59:49 +000013257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13258$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013259
Matthias Kloseb9621712010-04-24 17:59:49 +000013260$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013261
Thomas Wouters89f507f2006-12-13 04:49:30 +000013262else
Matthias Kloseb9621712010-04-24 17:59:49 +000013263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13264$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013265fi
13266
Matthias Kloseb9621712010-04-24 17:59:49 +000013267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13268$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013269
13270if test -r /dev/ptc
13271then
Matthias Kloseb9621712010-04-24 17:59:49 +000013272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13273$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013274
Matthias Kloseb9621712010-04-24 17:59:49 +000013275$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013276
Thomas Wouters89f507f2006-12-13 04:49:30 +000013277else
Matthias Kloseb9621712010-04-24 17:59:49 +000013278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13279$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013280fi
13281
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013282if test "$have_long_long" = yes
13283then
Matthias Kloseb9621712010-04-24 17:59:49 +000013284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13285$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13286 if test "${ac_cv_have_long_long_format+set}" = set; then :
13287 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013288else
Matthias Kloseb9621712010-04-24 17:59:49 +000013289 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013290 ac_cv_have_long_long_format=no
13291else
Matthias Kloseb9621712010-04-24 17:59:49 +000013292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013293/* end confdefs.h. */
13294
13295 #include <stdio.h>
13296 #include <stddef.h>
13297 #include <string.h>
13298
13299 #ifdef HAVE_SYS_TYPES_H
13300 #include <sys/types.h>
13301 #endif
13302
13303 int main()
13304 {
13305 char buffer[256];
13306
13307 if (sprintf(buffer, "%lld", (long long)123) < 0)
13308 return 1;
13309 if (strcmp(buffer, "123"))
13310 return 1;
13311
13312 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13313 return 1;
13314 if (strcmp(buffer, "-123"))
13315 return 1;
13316
13317 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13318 return 1;
13319 if (strcmp(buffer, "123"))
13320 return 1;
13321
13322 return 0;
13323 }
13324
13325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013326if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013327 ac_cv_have_long_long_format=yes
13328else
Matthias Kloseb9621712010-04-24 17:59:49 +000013329 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013330fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013331rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13332 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013333fi
13334
13335
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013336fi
13337
Matthias Kloseb9621712010-04-24 17:59:49 +000013338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13339$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013340fi
13341
Mark Dickinson89d7d412009-12-31 20:50:59 +000013342if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013343then
13344
Matthias Kloseb9621712010-04-24 17:59:49 +000013345$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013346
13347fi
13348
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013349if test $ac_sys_system = Darwin
13350then
13351 LIBS="$LIBS -framework CoreFoundation"
13352fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013353
Matthias Kloseb9621712010-04-24 17:59:49 +000013354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13355$as_echo_n "checking for %zd printf() format support... " >&6; }
13356if test "${ac_cv_have_size_t_format+set}" = set; then :
13357 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013358else
Matthias Kloseb9621712010-04-24 17:59:49 +000013359 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013360 ac_cv_have_size_t_format="cross -- assuming yes"
13361
Thomas Wouters477c8d52006-05-27 19:21:47 +000013362else
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013364/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013365
Thomas Wouters477c8d52006-05-27 19:21:47 +000013366#include <stdio.h>
13367#include <stddef.h>
13368#include <string.h>
13369
Christian Heimes2c181612007-12-17 20:04:13 +000013370#ifdef HAVE_SYS_TYPES_H
13371#include <sys/types.h>
13372#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013373
13374#ifdef HAVE_SSIZE_T
13375typedef ssize_t Py_ssize_t;
13376#elif SIZEOF_VOID_P == SIZEOF_LONG
13377typedef long Py_ssize_t;
13378#else
13379typedef int Py_ssize_t;
13380#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013381
Christian Heimes2c181612007-12-17 20:04:13 +000013382int main()
13383{
13384 char buffer[256];
13385
Thomas Wouters477c8d52006-05-27 19:21:47 +000013386 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13387 return 1;
13388
Thomas Wouters89f507f2006-12-13 04:49:30 +000013389 if (strcmp(buffer, "123"))
13390 return 1;
13391
13392 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13393 return 1;
13394
13395 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013396 return 1;
13397
13398 return 0;
13399}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013400
Thomas Wouters477c8d52006-05-27 19:21:47 +000013401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013402if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013403 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013404else
Matthias Kloseb9621712010-04-24 17:59:49 +000013405 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013406fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013407rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13408 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013409fi
13410
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013411fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13413$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013414if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013415
Matthias Kloseb9621712010-04-24 17:59:49 +000013416$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013417
13418fi
13419
Matthias Kloseb9621712010-04-24 17:59:49 +000013420ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013421#ifdef HAVE_SYS_TYPES_H
13422#include <sys/types.h>
13423#endif
13424#ifdef HAVE_SYS_SOCKET_H
13425#include <sys/socket.h>
13426#endif
13427
Matthias Kloseb9621712010-04-24 17:59:49 +000013428"
13429if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013430
Martin v. Löwis11437992002-04-12 09:54:03 +000013431else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013432
Matthias Kloseb9621712010-04-24 17:59:49 +000013433$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013434
13435fi
13436
Michael W. Hudson54241132001-12-07 15:38:26 +000013437
Matthias Kloseb9621712010-04-24 17:59:49 +000013438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13439$as_echo_n "checking for broken mbstowcs... " >&6; }
13440if test "${ac_cv_broken_mbstowcs+set}" = set; then :
13441 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013442else
Matthias Kloseb9621712010-04-24 17:59:49 +000013443 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013444 ac_cv_broken_mbstowcs=no
13445else
Matthias Kloseb9621712010-04-24 17:59:49 +000013446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013447/* end confdefs.h. */
13448
13449#include<stdlib.h>
13450int main() {
13451 size_t len = -1;
13452 const char *str = "text";
13453 len = mbstowcs(NULL, str, 0);
13454 return (len != 4);
13455}
13456
13457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013458if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013459 ac_cv_broken_mbstowcs=no
13460else
Matthias Kloseb9621712010-04-24 17:59:49 +000013461 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013463rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13464 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013465fi
13466
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013467fi
13468
Matthias Kloseb9621712010-04-24 17:59:49 +000013469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13470$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013471if test "$ac_cv_broken_mbstowcs" = yes
13472then
13473
Matthias Kloseb9621712010-04-24 17:59:49 +000013474$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013475
13476fi
13477
Antoine Pitroub52ec782009-01-25 16:34:23 +000013478# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13480$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013481
13482# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013483if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013484 withval=$with_computed_gotos;
13485if test "$withval" != no
13486then
13487
Matthias Kloseb9621712010-04-24 17:59:49 +000013488$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013489
Matthias Kloseb9621712010-04-24 17:59:49 +000013490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13491$as_echo "yes" >&6; }
13492else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13493$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013494fi
13495else
Matthias Kloseb9621712010-04-24 17:59:49 +000013496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13497$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013498fi
13499
13500
13501
Michael W. Hudson54241132001-12-07 15:38:26 +000013502
13503
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013504for h in `(cd $srcdir;echo Python/thread_*.h)`
13505do
13506 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13507done
13508
Michael W. Hudson54241132001-12-07 15:38:26 +000013509
Neal Norwitzd24499d2005-12-18 21:36:39 +000013510SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13512$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013513for dir in $SRCDIRS; do
13514 if test ! -d $dir; then
13515 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013516 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013517done
Matthias Kloseb9621712010-04-24 17:59:49 +000013518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13519$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013520
Guido van Rossum627b2d71993-12-24 10:39:16 +000013521# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013522ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013523
Martin v. Löwis11437992002-04-12 09:54:03 +000013524cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013525# This file is a shell script that caches the results of configure
13526# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013527# scripts and configure runs, see configure's option --config-cache.
13528# It is not useful on other systems. If it contains results you don't
13529# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013530#
Martin v. Löwis11437992002-04-12 09:54:03 +000013531# config.status only pays attention to the cache file if you give it
13532# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013533#
Skip Montanaro6dead952003-09-25 14:50:04 +000013534# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013535# loading this file, other *unset* `ac_cv_foo' will be assigned the
13536# following values.
13537
13538_ACEOF
13539
Guido van Rossumf78abae1997-01-21 22:02:36 +000013540# The following way of writing the cache mishandles newlines in values,
13541# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013542# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013543# Ultrix sh set writes to stderr and can't be redirected directly,
13544# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013545(
13546 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13547 eval ac_val=\$$ac_var
13548 case $ac_val in #(
13549 *${as_nl}*)
13550 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013551 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13552$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013553 esac
13554 case $ac_var in #(
13555 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013556 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13557 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013558 esac ;;
13559 esac
13560 done
13561
Martin v. Löwis11437992002-04-12 09:54:03 +000013562 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013563 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13564 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 # `set' does not quote correctly, so add quotes: double-quote
13566 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013567 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013568 "s/'/'\\\\''/g;
13569 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013570 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013571 *)
13572 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013573 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013574 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013575 esac |
13576 sort
13577) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013578 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013579 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013580 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013581 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013582 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13583 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013584 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13585 :end' >>confcache
13586if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13587 if test -w "$cache_file"; then
13588 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013589 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13590$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013591 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013592 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013593 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13594$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013595 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013596fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013597rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013598
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013599test "x$prefix" = xNONE && prefix=$ac_default_prefix
13600# Let make expand exec_prefix.
13601test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013602
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013603DEFS=-DHAVE_CONFIG_H
13604
Skip Montanaro6dead952003-09-25 14:50:04 +000013605ac_libobjs=
13606ac_ltlibobjs=
13607for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13608 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013609 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013610 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013611 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13612 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013613 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13614 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013615done
13616LIBOBJS=$ac_libobjs
13617
13618LTLIBOBJS=$ac_ltlibobjs
13619
13620
Martin v. Löwis11437992002-04-12 09:54:03 +000013621
Matthias Kloseb9621712010-04-24 17:59:49 +000013622
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013623: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013624ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013625ac_clean_files_save=$ac_clean_files
13626ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013627{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13628$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13629as_write_fail=0
13630cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013631#! $SHELL
13632# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013633# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013634# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013635# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013636
Martin v. Löwis11437992002-04-12 09:54:03 +000013637debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013638ac_cs_recheck=false
13639ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013640
Matthias Kloseb9621712010-04-24 17:59:49 +000013641SHELL=\${CONFIG_SHELL-$SHELL}
13642export SHELL
13643_ASEOF
13644cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13645## -------------------- ##
13646## M4sh Initialization. ##
13647## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013649# Be more Bourne compatible
13650DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013651if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013652 emulate sh
13653 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013654 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013655 # is contrary to our usage. Disable this feature.
13656 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013657 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013658else
Matthias Kloseb9621712010-04-24 17:59:49 +000013659 case `(set -o) 2>/dev/null` in #(
13660 *posix*) :
13661 set -o posix ;; #(
13662 *) :
13663 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013664esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013665fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013666
13667
Matthias Kloseb9621712010-04-24 17:59:49 +000013668as_nl='
13669'
13670export as_nl
13671# Printing a long string crashes Solaris 7 /usr/bin/printf.
13672as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13673as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13674as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13675# Prefer a ksh shell builtin over an external printf program on Solaris,
13676# but without wasting forks for bash or zsh.
13677if test -z "$BASH_VERSION$ZSH_VERSION" \
13678 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13679 as_echo='print -r --'
13680 as_echo_n='print -rn --'
13681elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13682 as_echo='printf %s\n'
13683 as_echo_n='printf %s'
13684else
13685 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13686 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13687 as_echo_n='/usr/ucb/echo -n'
13688 else
13689 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13690 as_echo_n_body='eval
13691 arg=$1;
13692 case $arg in #(
13693 *"$as_nl"*)
13694 expr "X$arg" : "X\\(.*\\)$as_nl";
13695 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13696 esac;
13697 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13698 '
13699 export as_echo_n_body
13700 as_echo_n='sh -c $as_echo_n_body as_echo'
13701 fi
13702 export as_echo_body
13703 as_echo='sh -c $as_echo_body as_echo'
13704fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013705
13706# The user is always right.
13707if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013708 PATH_SEPARATOR=:
13709 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13710 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13711 PATH_SEPARATOR=';'
13712 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013713fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013715
13716# IFS
13717# We need space, tab and new line, in precisely that order. Quoting is
13718# there to prevent editors from complaining about space-tab.
13719# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13720# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013721IFS=" "" $as_nl"
13722
13723# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013724case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013725 *[\\/]* ) as_myself=$0 ;;
13726 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013727for as_dir in $PATH
13728do
13729 IFS=$as_save_IFS
13730 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013731 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13732 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013733IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013734
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013735 ;;
13736esac
13737# We did not find ourselves, most probably we were run as `sh COMMAND'
13738# in which case we are not to be found in the path.
13739if test "x$as_myself" = x; then
13740 as_myself=$0
13741fi
13742if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013743 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13744 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013745fi
13746
Matthias Kloseb9621712010-04-24 17:59:49 +000013747# Unset variables that we do not need and which cause bugs (e.g. in
13748# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13749# suppresses any "Segmentation fault" message there. '((' could
13750# trigger a bug in pdksh 5.2.14.
13751for as_var in BASH_ENV ENV MAIL MAILPATH
13752do eval test x\${$as_var+set} = xset \
13753 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013754done
13755PS1='$ '
13756PS2='> '
13757PS4='+ '
13758
13759# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000013760LC_ALL=C
13761export LC_ALL
13762LANGUAGE=C
13763export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013764
Matthias Kloseb9621712010-04-24 17:59:49 +000013765# CDPATH.
13766(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13767
13768
13769# as_fn_error ERROR [LINENO LOG_FD]
13770# ---------------------------------
13771# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13772# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
13773# script with status $?, using 1 if that was 0.
13774as_fn_error ()
13775{
13776 as_status=$?; test $as_status -eq 0 && as_status=1
13777 if test "$3"; then
13778 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13779 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
13780 fi
13781 $as_echo "$as_me: error: $1" >&2
13782 as_fn_exit $as_status
13783} # as_fn_error
13784
13785
13786# as_fn_set_status STATUS
13787# -----------------------
13788# Set $? to STATUS, without forking.
13789as_fn_set_status ()
13790{
13791 return $1
13792} # as_fn_set_status
13793
13794# as_fn_exit STATUS
13795# -----------------
13796# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13797as_fn_exit ()
13798{
13799 set +e
13800 as_fn_set_status $1
13801 exit $1
13802} # as_fn_exit
13803
13804# as_fn_unset VAR
13805# ---------------
13806# Portably unset VAR.
13807as_fn_unset ()
13808{
13809 { eval $1=; unset $1;}
13810}
13811as_unset=as_fn_unset
13812# as_fn_append VAR VALUE
13813# ----------------------
13814# Append the text in VALUE to the end of the definition contained in VAR. Take
13815# advantage of any shell optimizations that allow amortized linear growth over
13816# repeated appends, instead of the typical quadratic growth present in naive
13817# implementations.
13818if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13819 eval 'as_fn_append ()
13820 {
13821 eval $1+=\$2
13822 }'
13823else
13824 as_fn_append ()
13825 {
13826 eval $1=\$$1\$2
13827 }
13828fi # as_fn_append
13829
13830# as_fn_arith ARG...
13831# ------------------
13832# Perform arithmetic evaluation on the ARGs, and store the result in the
13833# global $as_val. Take advantage of shells that can avoid forks. The arguments
13834# must be portable across $(()) and expr.
13835if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13836 eval 'as_fn_arith ()
13837 {
13838 as_val=$(( $* ))
13839 }'
13840else
13841 as_fn_arith ()
13842 {
13843 as_val=`expr "$@" || test $? -eq 1`
13844 }
13845fi # as_fn_arith
13846
13847
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013848if expr a : '\(a\)' >/dev/null 2>&1 &&
13849 test "X`expr 00001 : '.*\(...\)'`" = X001; then
13850 as_expr=expr
13851else
13852 as_expr=false
13853fi
13854
13855if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
13856 as_basename=basename
13857else
13858 as_basename=false
13859fi
13860
Matthias Kloseb9621712010-04-24 17:59:49 +000013861if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13862 as_dirname=dirname
13863else
13864 as_dirname=false
13865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013866
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013867as_me=`$as_basename -- "$0" ||
13868$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13869 X"$0" : 'X\(//\)$' \| \
13870 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000013871$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013872 sed '/^.*\/\([^/][^/]*\)\/*$/{
13873 s//\1/
13874 q
13875 }
13876 /^X\/\(\/\/\)$/{
13877 s//\1/
13878 q
13879 }
13880 /^X\/\(\/\).*/{
13881 s//\1/
13882 q
13883 }
13884 s/.*/./; q'`
13885
Matthias Kloseb9621712010-04-24 17:59:49 +000013886# Avoid depending upon Character Ranges.
13887as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13888as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13889as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13890as_cr_digits='0123456789'
13891as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013892
13893ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000013894case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013895-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000013896 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013897 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000013898 xy) ECHO_C='\c';;
13899 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
13900 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013901 esac;;
13902*)
13903 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000013904esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013905
Martin v. Löwis11437992002-04-12 09:54:03 +000013906rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907if test -d conf$$.dir; then
13908 rm -f conf$$.dir/conf$$.file
13909else
13910 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000013911 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013912fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013913if (echo >conf$$.file) 2>/dev/null; then
13914 if ln -s conf$$.file conf$$ 2>/dev/null; then
13915 as_ln_s='ln -s'
13916 # ... but there are two gotchas:
13917 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13918 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13919 # In both cases, we have to default to `cp -p'.
13920 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13921 as_ln_s='cp -p'
13922 elif ln conf$$.file conf$$ 2>/dev/null; then
13923 as_ln_s=ln
13924 else
Martin v. Löwis11437992002-04-12 09:54:03 +000013925 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000013926 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013927else
13928 as_ln_s='cp -p'
13929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013930rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13931rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000013932
Matthias Kloseb9621712010-04-24 17:59:49 +000013933
13934# as_fn_mkdir_p
13935# -------------
13936# Create "$as_dir" as a directory, including parents if necessary.
13937as_fn_mkdir_p ()
13938{
13939
13940 case $as_dir in #(
13941 -*) as_dir=./$as_dir;;
13942 esac
13943 test -d "$as_dir" || eval $as_mkdir_p || {
13944 as_dirs=
13945 while :; do
13946 case $as_dir in #(
13947 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
13948 *) as_qdir=$as_dir;;
13949 esac
13950 as_dirs="'$as_qdir' $as_dirs"
13951 as_dir=`$as_dirname -- "$as_dir" ||
13952$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13953 X"$as_dir" : 'X\(//\)[^/]' \| \
13954 X"$as_dir" : 'X\(//\)$' \| \
13955 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
13956$as_echo X"$as_dir" |
13957 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13958 s//\1/
13959 q
13960 }
13961 /^X\(\/\/\)[^/].*/{
13962 s//\1/
13963 q
13964 }
13965 /^X\(\/\/\)$/{
13966 s//\1/
13967 q
13968 }
13969 /^X\(\/\).*/{
13970 s//\1/
13971 q
13972 }
13973 s/.*/./; q'`
13974 test -d "$as_dir" && break
13975 done
13976 test -z "$as_dirs" || eval "mkdir $as_dirs"
13977 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
13978
13979
13980} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000013981if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013982 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000013983else
Skip Montanarof0d5f792004-08-15 14:08:23 +000013984 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000013985 as_mkdir_p=false
13986fi
13987
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013988if test -x / >/dev/null 2>&1; then
13989 as_test_x='test -x'
13990else
13991 if ls -dL / >/dev/null 2>&1; then
13992 as_ls_L_option=L
13993 else
13994 as_ls_L_option=
13995 fi
13996 as_test_x='
13997 eval sh -c '\''
13998 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013999 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014000 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014001 case $1 in #(
14002 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014003 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014004 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014005 ???[sx]*):;;*)false;;esac;fi
14006 '\'' sh
14007 '
14008fi
14009as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014010
14011# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014012as_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 +000014013
14014# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014015as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014016
14017
Martin v. Löwis11437992002-04-12 09:54:03 +000014018exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014019## ----------------------------------- ##
14020## Main body of $CONFIG_STATUS script. ##
14021## ----------------------------------- ##
14022_ASEOF
14023test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014024
Matthias Kloseb9621712010-04-24 17:59:49 +000014025cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14026# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014027# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014028# values after options handling.
14029ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014030This file was extended by python $as_me 3.2, which was
Matthias Kloseb9621712010-04-24 17:59:49 +000014031generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014032
14033 CONFIG_FILES = $CONFIG_FILES
14034 CONFIG_HEADERS = $CONFIG_HEADERS
14035 CONFIG_LINKS = $CONFIG_LINKS
14036 CONFIG_COMMANDS = $CONFIG_COMMANDS
14037 $ $0 $@
14038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014039on `(hostname || uname -n) 2>/dev/null | sed 1q`
14040"
14041
Martin v. Löwis11437992002-04-12 09:54:03 +000014042_ACEOF
14043
Matthias Kloseb9621712010-04-24 17:59:49 +000014044case $ac_config_files in *"
14045"*) set x $ac_config_files; shift; ac_config_files=$*;;
14046esac
14047
14048case $ac_config_headers in *"
14049"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14050esac
14051
14052
14053cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014054# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000014055config_files="$ac_config_files"
14056config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014058_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014059
Matthias Kloseb9621712010-04-24 17:59:49 +000014060cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014061ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014062\`$as_me' instantiates files and other configuration actions
14063from templates according to the current configuration. Unless the files
14064and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014065
Matthias Kloseb9621712010-04-24 17:59:49 +000014066Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014067
14068 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014069 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014070 --config print configuration, then exit
14071 -q, --quiet, --silent
14072 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014073 -d, --debug don't remove temporary files
14074 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014075 --file=FILE[:TEMPLATE]
14076 instantiate the configuration file FILE
14077 --header=FILE[:TEMPLATE]
14078 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014079
14080Configuration files:
14081$config_files
14082
14083Configuration headers:
14084$config_headers
14085
Matthias Kloseb9621712010-04-24 17:59:49 +000014086Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014087
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014089cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14090ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014091ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014092python config.status 3.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014093configured by $0, generated by GNU Autoconf 2.65,
14094 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014095
Matthias Kloseb9621712010-04-24 17:59:49 +000014096Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014097This config.status script is free software; the Free Software Foundation
14098gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014099
14100ac_pwd='$ac_pwd'
14101srcdir='$srcdir'
14102INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014103test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014104_ACEOF
14105
Matthias Kloseb9621712010-04-24 17:59:49 +000014106cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14107# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014108ac_need_defaults=:
14109while test $# != 0
14110do
14111 case $1 in
14112 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014113 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14114 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014115 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014116 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014117 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014118 ac_option=$1
14119 ac_optarg=$2
14120 ac_shift=shift
14121 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014122 esac
14123
Skip Montanaro6dead952003-09-25 14:50:04 +000014124 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014125 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014126 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14127 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014128 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014129 $as_echo "$ac_cs_version"; exit ;;
14130 --config | --confi | --conf | --con | --co | --c )
14131 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014132 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014133 debug=: ;;
14134 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014135 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014136 case $ac_optarg in
14137 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14138 esac
14139 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014140 ac_need_defaults=false;;
14141 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014142 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014143 case $ac_optarg in
14144 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14145 esac
14146 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014147 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014148 --he | --h)
14149 # Conflict between --help and --header
Matthias Kloseb9621712010-04-24 17:59:49 +000014150 as_fn_error "ambiguous option: \`$1'
14151Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014152 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014153 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014154 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14155 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14156 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014157
14158 # This is an error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014159 -*) as_fn_error "unrecognized option: \`$1'
14160Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014161
Matthias Kloseb9621712010-04-24 17:59:49 +000014162 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014163 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014164
14165 esac
14166 shift
14167done
14168
Skip Montanaro6dead952003-09-25 14:50:04 +000014169ac_configure_extra_args=
14170
14171if $ac_cs_silent; then
14172 exec 6>/dev/null
14173 ac_configure_extra_args="$ac_configure_extra_args --silent"
14174fi
14175
14176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014177cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014178if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014179 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14180 shift
14181 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14182 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014183 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014184 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014185fi
14186
Martin v. Löwis11437992002-04-12 09:54:03 +000014187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014188cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014189exec 5>>config.log
14190{
14191 echo
14192 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14193## Running $as_me. ##
14194_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014196} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014199cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014200_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014201
Matthias Kloseb9621712010-04-24 17:59:49 +000014202cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014203
14204# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014205for ac_config_target in $ac_config_targets
14206do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014207 case $ac_config_target in
14208 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14209 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14210 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014211 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14212 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014213 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14214 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014215 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014216
Matthias Kloseb9621712010-04-24 17:59:49 +000014217 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014218 esac
14219done
14220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014221
Martin v. Löwis11437992002-04-12 09:54:03 +000014222# If the user did not use the arguments to specify the items to instantiate,
14223# then the envvar interface is used. Set only those that are not.
14224# We use the long form for the default assignment because of an extremely
14225# bizarre bug on SunOS 4.1.3.
14226if $ac_need_defaults; then
14227 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14228 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14229fi
14230
Skip Montanaro6dead952003-09-25 14:50:04 +000014231# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014232# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014233# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014234# Hook for its removal unless debugging.
14235# Note that there is a small window in which the directory will not be cleaned:
14236# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014237$debug ||
14238{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014239 tmp=
14240 trap 'exit_status=$?
14241 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14242' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014243 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014244}
Martin v. Löwis11437992002-04-12 09:54:03 +000014245# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014246
Martin v. Löwis11437992002-04-12 09:54:03 +000014247{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014248 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014249 test -n "$tmp" && test -d "$tmp"
14250} ||
14251{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014252 tmp=./conf$$-$RANDOM
14253 (umask 077 && mkdir "$tmp")
Matthias Kloseb9621712010-04-24 17:59:49 +000014254} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014255
Matthias Kloseb9621712010-04-24 17:59:49 +000014256# Set up the scripts for CONFIG_FILES section.
14257# No need to generate them if there are no CONFIG_FILES.
14258# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014259if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014260
Matthias Kloseb9621712010-04-24 17:59:49 +000014261
14262ac_cr=`echo X | tr X '\015'`
14263# On cygwin, bash can eat \r inside `` if the user requested igncr.
14264# But we know of no other shell where ac_cr would be empty at this
14265# point, so we can use a bashism as a fallback.
14266if test "x$ac_cr" = x; then
14267 eval ac_cr=\$\'\\r\'
14268fi
14269ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14270if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14271 ac_cs_awk_cr='\r'
14272else
14273 ac_cs_awk_cr=$ac_cr
14274fi
14275
14276echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014277_ACEOF
14278
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014279
Matthias Kloseb9621712010-04-24 17:59:49 +000014280{
14281 echo "cat >conf$$subs.awk <<_ACEOF" &&
14282 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14283 echo "_ACEOF"
14284} >conf$$subs.sh ||
14285 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14286ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014287ac_delim='%!_!# '
14288for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014289 . ./conf$$subs.sh ||
14290 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014291
Matthias Kloseb9621712010-04-24 17:59:49 +000014292 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14293 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014294 break
14295 elif $ac_last_try; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014296 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014297 else
14298 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014299 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014300done
Matthias Kloseb9621712010-04-24 17:59:49 +000014301rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014302
Matthias Kloseb9621712010-04-24 17:59:49 +000014303cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14304cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014306sed -n '
14307h
14308s/^/S["/; s/!.*/"]=/
14309p
14310g
14311s/^[^!]*!//
14312:repl
14313t repl
14314s/'"$ac_delim"'$//
14315t delim
14316:nl
14317h
14318s/\(.\{148\}\)..*/\1/
14319t more1
14320s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14321p
14322n
14323b repl
14324:more1
14325s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14326p
14327g
14328s/.\{148\}//
14329t nl
14330:delim
14331h
14332s/\(.\{148\}\)..*/\1/
14333t more2
14334s/["\\]/\\&/g; s/^/"/; s/$/"/
14335p
14336b
14337:more2
14338s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14339p
14340g
14341s/.\{148\}//
14342t delim
14343' <conf$$subs.awk | sed '
14344/^[^""]/{
14345 N
14346 s/\n//
14347}
14348' >>$CONFIG_STATUS || ac_write_fail=1
14349rm -f conf$$subs.awk
14350cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14351_ACAWK
14352cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14353 for (key in S) S_is_set[key] = 1
14354 FS = ""
14355
14356}
14357{
14358 line = $ 0
14359 nfields = split(line, field, "@")
14360 substed = 0
14361 len = length(field[1])
14362 for (i = 2; i < nfields; i++) {
14363 key = field[i]
14364 keylen = length(key)
14365 if (S_is_set[key]) {
14366 value = S[key]
14367 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14368 len += length(value) + length(field[++i])
14369 substed = 1
14370 } else
14371 len += 1 + keylen
14372 }
14373
14374 print line
14375}
14376
14377_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014379cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14380if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14381 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14382else
14383 cat
14384fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14385 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014386_ACEOF
14387
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014388# VPATH may cause trouble with some makes, so we remove $(srcdir),
14389# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14390# trailing colons and then remove the whole line if VPATH becomes empty
14391# (actually we leave an empty line to preserve line numbers).
14392if test "x$srcdir" = x.; then
14393 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14394s/:*\$(srcdir):*/:/
14395s/:*\${srcdir}:*/:/
14396s/:*@srcdir@:*/:/
14397s/^\([^=]*=[ ]*\):*/\1/
14398s/:*$//
14399s/^[^=]*=[ ]*$//
14400}'
14401fi
14402
Matthias Kloseb9621712010-04-24 17:59:49 +000014403cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014404fi # test -n "$CONFIG_FILES"
14405
Matthias Kloseb9621712010-04-24 17:59:49 +000014406# Set up the scripts for CONFIG_HEADERS section.
14407# No need to generate them if there are no CONFIG_HEADERS.
14408# This happens for instance with `./config.status Makefile'.
14409if test -n "$CONFIG_HEADERS"; then
14410cat >"$tmp/defines.awk" <<\_ACAWK ||
14411BEGIN {
14412_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014413
Matthias Kloseb9621712010-04-24 17:59:49 +000014414# Transform confdefs.h into an awk script `defines.awk', embedded as
14415# here-document in config.status, that substitutes the proper values into
14416# config.h.in to produce config.h.
14417
14418# Create a delimiter string that does not exist in confdefs.h, to ease
14419# handling of long lines.
14420ac_delim='%!_!# '
14421for ac_last_try in false false :; do
14422 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14423 if test -z "$ac_t"; then
14424 break
14425 elif $ac_last_try; then
14426 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
14427 else
14428 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14429 fi
14430done
14431
14432# For the awk script, D is an array of macro values keyed by name,
14433# likewise P contains macro parameters if any. Preserve backslash
14434# newline sequences.
14435
14436ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14437sed -n '
14438s/.\{148\}/&'"$ac_delim"'/g
14439t rset
14440:rset
14441s/^[ ]*#[ ]*define[ ][ ]*/ /
14442t def
14443d
14444:def
14445s/\\$//
14446t bsnl
14447s/["\\]/\\&/g
14448s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14449D["\1"]=" \3"/p
14450s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14451d
14452:bsnl
14453s/["\\]/\\&/g
14454s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14455D["\1"]=" \3\\\\\\n"\\/p
14456t cont
14457s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14458t cont
14459d
14460:cont
14461n
14462s/.\{148\}/&'"$ac_delim"'/g
14463t clear
14464:clear
14465s/\\$//
14466t bsnlc
14467s/["\\]/\\&/g; s/^/"/; s/$/"/p
14468d
14469:bsnlc
14470s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14471b cont
14472' <confdefs.h | sed '
14473s/'"$ac_delim"'/"\\\
14474"/g' >>$CONFIG_STATUS || ac_write_fail=1
14475
14476cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14477 for (key in D) D_is_set[key] = 1
14478 FS = ""
14479}
14480/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14481 line = \$ 0
14482 split(line, arg, " ")
14483 if (arg[1] == "#") {
14484 defundef = arg[2]
14485 mac1 = arg[3]
14486 } else {
14487 defundef = substr(arg[1], 2)
14488 mac1 = arg[2]
14489 }
14490 split(mac1, mac2, "(") #)
14491 macro = mac2[1]
14492 prefix = substr(line, 1, index(line, defundef) - 1)
14493 if (D_is_set[macro]) {
14494 # Preserve the white space surrounding the "#".
14495 print prefix "define", macro P[macro] D[macro]
14496 next
14497 } else {
14498 # Replace #undef with comments. This is necessary, for example,
14499 # in the case of _POSIX_SOURCE, which is predefined and required
14500 # on some systems where configure will not decide to define it.
14501 if (defundef == "undef") {
14502 print "/*", prefix defundef, macro, "*/"
14503 next
14504 }
14505 }
14506}
14507{ print }
14508_ACAWK
14509_ACEOF
14510cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14511 as_fn_error "could not setup config headers machinery" "$LINENO" 5
14512fi # test -n "$CONFIG_HEADERS"
14513
14514
14515eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14516shift
14517for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014518do
14519 case $ac_tag in
14520 :[FHLC]) ac_mode=$ac_tag; continue;;
14521 esac
14522 case $ac_mode$ac_tag in
14523 :[FHL]*:*);;
Matthias Kloseb9621712010-04-24 17:59:49 +000014524 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014525 :[FH]-) ac_tag=-:-;;
14526 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14527 esac
14528 ac_save_IFS=$IFS
14529 IFS=:
14530 set x $ac_tag
14531 IFS=$ac_save_IFS
14532 shift
14533 ac_file=$1
14534 shift
14535
14536 case $ac_mode in
14537 :L) ac_source=$1;;
14538 :[FH])
14539 ac_file_inputs=
14540 for ac_f
14541 do
14542 case $ac_f in
14543 -) ac_f="$tmp/stdin";;
14544 *) # Look for the file first in the build tree, then in the source tree
14545 # (if the path is not absolute). The absolute path cannot be DOS-style,
14546 # because $ac_f cannot contain `:'.
14547 test -f "$ac_f" ||
14548 case $ac_f in
14549 [\\/$]*) false;;
14550 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14551 esac ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014552 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014553 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014554 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14555 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014556 done
14557
14558 # Let's still pretend it is `configure' which instantiates (i.e., don't
14559 # use $as_me), people would be surprised to read:
14560 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014561 configure_input='Generated from '`
14562 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14563 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014564 if test x"$ac_file" != x-; then
14565 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014566 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14567$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014568 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014569 # Neutralize special characters interpreted by sed in replacement strings.
14570 case $configure_input in #(
14571 *\&* | *\|* | *\\* )
14572 ac_sed_conf_input=`$as_echo "$configure_input" |
14573 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14574 *) ac_sed_conf_input=$configure_input;;
14575 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014576
14577 case $ac_tag in
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 *:-:* | *:-) cat >"$tmp/stdin" \
14579 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014580 esac
14581 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014582 esac
14583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014584 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014585$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014586 X"$ac_file" : 'X\(//\)[^/]' \| \
14587 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014588 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014589$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014590 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14591 s//\1/
14592 q
14593 }
14594 /^X\(\/\/\)[^/].*/{
14595 s//\1/
14596 q
14597 }
14598 /^X\(\/\/\)$/{
14599 s//\1/
14600 q
14601 }
14602 /^X\(\/\).*/{
14603 s//\1/
14604 q
14605 }
14606 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014607 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014608 ac_builddir=.
14609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014610case "$ac_dir" in
14611.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14612*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014613 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014614 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014615 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014616 case $ac_top_builddir_sub in
14617 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14618 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14619 esac ;;
14620esac
14621ac_abs_top_builddir=$ac_pwd
14622ac_abs_builddir=$ac_pwd$ac_dir_suffix
14623# for backward compatibility:
14624ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014625
14626case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014627 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014628 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014629 ac_top_srcdir=$ac_top_builddir_sub
14630 ac_abs_top_srcdir=$ac_pwd ;;
14631 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014632 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014633 ac_top_srcdir=$srcdir
14634 ac_abs_top_srcdir=$srcdir ;;
14635 *) # Relative name.
14636 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14637 ac_top_srcdir=$ac_top_build_prefix$srcdir
14638 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014639esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014640ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014641
Martin v. Löwis11437992002-04-12 09:54:03 +000014642
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014643 case $ac_mode in
14644 :F)
14645 #
14646 # CONFIG_FILE
14647 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014648
14649 case $INSTALL in
14650 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014651 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014652 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014653_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014654
Matthias Kloseb9621712010-04-24 17:59:49 +000014655cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014656# If the template does not know about datarootdir, expand it.
14657# FIXME: This hack should be removed a few years after 2.60.
14658ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014659ac_sed_dataroot='
14660/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014661 p
14662 q
14663}
14664/@datadir@/p
14665/@docdir@/p
14666/@infodir@/p
14667/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014668/@mandir@/p'
14669case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014670*datarootdir*) ac_datarootdir_seen=yes;;
14671*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14673$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014675cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014676 ac_datarootdir_hack='
14677 s&@datadir@&$datadir&g
14678 s&@docdir@&$docdir&g
14679 s&@infodir@&$infodir&g
14680 s&@localedir@&$localedir&g
14681 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014682 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014683esac
14684_ACEOF
14685
14686# Neutralize VPATH when `$srcdir' = `.'.
14687# Shell code in configure.ac might set extrasub.
14688# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014689cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14690ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014691$extrasub
14692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014693cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014694:t
14695/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014696s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014697s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014698s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014699s&@srcdir@&$ac_srcdir&;t t
14700s&@abs_srcdir@&$ac_abs_srcdir&;t t
14701s&@top_srcdir@&$ac_top_srcdir&;t t
14702s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14703s&@builddir@&$ac_builddir&;t t
14704s&@abs_builddir@&$ac_abs_builddir&;t t
14705s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14706s&@INSTALL@&$ac_INSTALL&;t t
14707$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014708"
14709eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
14710 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014712test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14713 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14714 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014716which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014717$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014718which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014720 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014721 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +000014722 -) cat "$tmp/out" && rm -f "$tmp/out";;
14723 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14724 esac \
14725 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014726 ;;
14727 :H)
14728 #
14729 # CONFIG_HEADER
14730 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014731 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014732 {
14733 $as_echo "/* $configure_input */" \
14734 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14735 } >"$tmp/config.h" \
14736 || as_fn_error "could not create $ac_file" "$LINENO" 5
14737 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14738 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14739$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014740 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014741 rm -f "$ac_file"
14742 mv "$tmp/config.h" "$ac_file" \
14743 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014744 fi
14745 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014746 $as_echo "/* $configure_input */" \
14747 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
14748 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014749 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014750 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014751
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014752
14753 esac
14754
14755done # for ac_tag
14756
Guido van Rossum627b2d71993-12-24 10:39:16 +000014757
Matthias Kloseb9621712010-04-24 17:59:49 +000014758as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000014759_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014760ac_clean_files=$ac_clean_files_save
14761
Matthias Kloseb9621712010-04-24 17:59:49 +000014762test $ac_write_fail = 0 ||
14763 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
14764
Martin v. Löwis11437992002-04-12 09:54:03 +000014765
14766# configure is writing to config.log, and then calls config.status.
14767# config.status does its own redirection, appending to config.log.
14768# Unfortunately, on DOS this fails, as config.log is still kept open
14769# by configure, so config.status won't be able to write to it; its
14770# output is simply discarded. So we exec the FD to /dev/null,
14771# effectively closing config.log, so it can be properly (re)opened and
14772# appended to by config.status. When coming back to configure, we
14773# need to make the FD available again.
14774if test "$no_create" != yes; then
14775 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000014776 ac_config_status_args=
14777 test "$silent" = yes &&
14778 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000014779 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000014780 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000014781 exec 5>>config.log
14782 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14783 # would make configure fail if this is the last instruction.
Matthias Kloseb9621712010-04-24 17:59:49 +000014784 $ac_cs_success || as_fn_exit $?
14785fi
14786if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14787 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14788$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014789fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014790
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014791
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014792echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014793if test ! -f Modules/Setup
14794then
14795 cp $srcdir/Modules/Setup.dist Modules/Setup
14796fi
14797
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014798echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014799if test ! -f Modules/Setup.local
14800then
14801 echo "# Edit this file for local setup changes" >Modules/Setup.local
14802fi
14803
14804echo "creating Makefile"
14805$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
14806 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000014807 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014808mv config.c Modules