blob: 0cbcc2af3f64d844623f2276bf45792cf61814d2 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Kloseb9621712010-04-24 17:59:49 +00002# From configure.in Revision: 80444 .
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 Klosec80c93f2010-04-24 17:04:35 +00002910## AC_HELP_STRING([--with-dyld],
2911## [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
4584
4585# Check for unsupported systems
4586case $ac_sys_system/$ac_sys_release in
4587atheos*|Linux*/1*)
4588 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4589 echo See README for details.
4590 exit 1;;
4591esac
4592
4593
Matthias Kloseb9621712010-04-24 17:59:49 +00004594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4595$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004596
4597# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004598if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004599 withval=$with_suffix;
4600 case $withval in
4601 no) EXEEXT=;;
4602 yes) EXEEXT=.exe;;
4603 *) EXEEXT=$withval;;
4604 esac
4605fi
4606
Matthias Kloseb9621712010-04-24 17:59:49 +00004607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4608$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004609
4610# Test whether we're running on a non-case-sensitive system, in which
4611# case we give a warning if no ext is given
4612
Matthias Kloseb9621712010-04-24 17:59:49 +00004613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4614$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004615if test ! -d CaseSensitiveTestDir; then
4616mkdir CaseSensitiveTestDir
4617fi
4618
4619if test -d casesensitivetestdir
4620then
Matthias Kloseb9621712010-04-24 17:59:49 +00004621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4622$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004623 BUILDEXEEXT=.exe
4624else
Matthias Kloseb9621712010-04-24 17:59:49 +00004625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4626$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004627 BUILDEXEEXT=$EXEEXT
4628fi
4629rmdir CaseSensitiveTestDir
4630
4631case $MACHDEP in
4632bsdos*)
4633 case $CC in
4634 gcc) CC="$CC -D_HAVE_BSDI";;
4635 esac;;
4636esac
4637
4638case $ac_sys_system in
4639hp*|HP*)
4640 case $CC in
4641 cc|*/cc) CC="$CC -Ae";;
4642 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004643esac
4644
4645
4646
Matthias Kloseb9621712010-04-24 17:59:49 +00004647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4648$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004649if test -z "$LIBRARY"
4650then
4651 LIBRARY='libpython$(VERSION).a'
4652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4654$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004655
4656# LDLIBRARY is the name of the library to link against (as opposed to the
4657# name of the library into which to insert object files). BLDLIBRARY is also
4658# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4659# is blank as the main program is not linked directly against LDLIBRARY.
4660# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4661# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4662# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4663# DLLLIBRARY is the shared (i.e., DLL) library.
4664#
4665# RUNSHARED is used to run shared python without installed libraries
4666#
4667# INSTSONAME is the name of the shared library that will be use to install
4668# on the system - some systems like version suffix, others don't
4669
4670
4671
4672
4673
4674
4675LDLIBRARY="$LIBRARY"
4676BLDLIBRARY='$(LDLIBRARY)'
4677INSTSONAME='$(LDLIBRARY)'
4678DLLLIBRARY=''
4679LDLIBRARYDIR=''
4680RUNSHARED=''
4681
4682# LINKCC is the command that links the python executable -- default is $(CC).
4683# If CXX is set, and if it is needed to link a main function that was
4684# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4685# python might then depend on the C++ runtime
4686# This is altered for AIX in order to build the export list before
4687# linking.
4688
Matthias Kloseb9621712010-04-24 17:59:49 +00004689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4690$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004691if test -z "$LINKCC"
4692then
4693 LINKCC='$(PURIFY) $(MAINCC)'
4694 case $ac_sys_system in
4695 AIX*)
4696 exp_extra="\"\""
4697 if test $ac_sys_release -ge 5 -o \
4698 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4699 exp_extra="."
4700 fi
4701 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004702 QNX*)
4703 # qcc must be used because the other compilers do not
4704 # support -N.
4705 LINKCC=qcc;;
4706 esac
4707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4709$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004710
4711# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4712# make sure we default having it set to "no": this is used by
4713# distutils.unixccompiler to know if it should add --enable-new-dtags
4714# to linker command lines, and failing to detect GNU ld simply results
4715# in the same bahaviour as before.
4716
Matthias Kloseb9621712010-04-24 17:59:49 +00004717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4718$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004719ac_prog=ld
4720if test "$GCC" = yes; then
4721 ac_prog=`$CC -print-prog-name=ld`
4722fi
4723case `"$ac_prog" -V 2>&1 < /dev/null` in
4724 *GNU*)
4725 GNULD=yes;;
4726 *)
4727 GNULD=no;;
4728esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4730$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004731
Matthias Kloseb9621712010-04-24 17:59:49 +00004732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4733$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004734# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004735if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004736 enableval=$enable_shared;
4737fi
4738
4739
4740if test -z "$enable_shared"
4741then
4742 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004743 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004744 enable_shared="yes";;
4745 *)
4746 enable_shared="no";;
4747 esac
4748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4750$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004751
Matthias Kloseb9621712010-04-24 17:59:49 +00004752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4753$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004754# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004755if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004756 enableval=$enable_profiling; ac_save_cc="$CC"
4757 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004758 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004759 ac_enable_profiling="no"
4760else
Matthias Kloseb9621712010-04-24 17:59:49 +00004761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004762/* end confdefs.h. */
4763int main() { return 0; }
4764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004765if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004766 ac_enable_profiling="yes"
4767else
Matthias Kloseb9621712010-04-24 17:59:49 +00004768 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004770rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4771 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004772fi
4773
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004774 CC="$ac_save_cc"
4775fi
4776
Matthias Kloseb9621712010-04-24 17:59:49 +00004777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4778$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004779
4780case "$ac_enable_profiling" in
4781 "yes")
4782 BASECFLAGS="-pg $BASECFLAGS"
4783 LDFLAGS="-pg $LDFLAGS"
4784 ;;
4785esac
4786
Matthias Kloseb9621712010-04-24 17:59:49 +00004787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4788$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004789
4790# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4791# library that we build, but we do not want to link against it (we
4792# will find it with a -framework option). For this reason there is an
4793# extra variable BLDLIBRARY against which Python and the extension
4794# modules are linked, BLDLIBRARY. This is normally the same as
4795# LDLIBRARY, but empty for MacOSX framework builds.
4796if test "$enable_framework"
4797then
4798 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4799 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4800 BLDLIBRARY=''
4801else
4802 BLDLIBRARY='$(LDLIBRARY)'
4803fi
4804
4805# Other platforms follow
4806if test $enable_shared = "yes"; then
4807
Matthias Kloseb9621712010-04-24 17:59:49 +00004808$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004809
4810 case $ac_sys_system in
4811 CYGWIN*)
4812 LDLIBRARY='libpython$(VERSION).dll.a'
4813 DLLLIBRARY='libpython$(VERSION).dll'
4814 ;;
4815 SunOS*)
4816 LDLIBRARY='libpython$(VERSION).so'
4817 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4818 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4819 INSTSONAME="$LDLIBRARY".$SOVERSION
4820 ;;
4821 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4822 LDLIBRARY='libpython$(VERSION).so'
4823 BLDLIBRARY='-L. -lpython$(VERSION)'
4824 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4825 case $ac_sys_system in
4826 FreeBSD*)
4827 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4828 ;;
4829 esac
4830 INSTSONAME="$LDLIBRARY".$SOVERSION
4831 ;;
4832 hp*|HP*)
4833 case `uname -m` in
4834 ia64)
4835 LDLIBRARY='libpython$(VERSION).so'
4836 ;;
4837 *)
4838 LDLIBRARY='libpython$(VERSION).sl'
4839 ;;
4840 esac
4841 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4842 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4843 ;;
4844 OSF*)
4845 LDLIBRARY='libpython$(VERSION).so'
4846 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4847 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4848 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004849 Darwin*)
4850 LDLIBRARY='libpython$(VERSION).dylib'
4851 BLDLIBRARY='-L. -lpython$(VERSION)'
4852 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4853 ;;
4854
4855 esac
4856else # shared is disabled
4857 case $ac_sys_system in
4858 CYGWIN*)
4859 BLDLIBRARY='$(LIBRARY)'
4860 LDLIBRARY='libpython$(VERSION).dll.a'
4861 ;;
4862 esac
4863fi
4864
Matthias Kloseb9621712010-04-24 17:59:49 +00004865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4866$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004867
4868if test -n "$ac_tool_prefix"; then
4869 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4870set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4872$as_echo_n "checking for $ac_word... " >&6; }
4873if test "${ac_cv_prog_RANLIB+set}" = set; then :
4874 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004875else
4876 if test -n "$RANLIB"; then
4877 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4878else
4879as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4880for as_dir in $PATH
4881do
4882 IFS=$as_save_IFS
4883 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004884 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004885 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4886 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004887 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004888 break 2
4889 fi
4890done
Matthias Kloseb9621712010-04-24 17:59:49 +00004891 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004892IFS=$as_save_IFS
4893
4894fi
4895fi
4896RANLIB=$ac_cv_prog_RANLIB
4897if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4899$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004900else
Matthias Kloseb9621712010-04-24 17:59:49 +00004901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4902$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004903fi
4904
4905
4906fi
4907if test -z "$ac_cv_prog_RANLIB"; then
4908 ac_ct_RANLIB=$RANLIB
4909 # Extract the first word of "ranlib", so it can be a program name with args.
4910set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4912$as_echo_n "checking for $ac_word... " >&6; }
4913if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4914 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004915else
4916 if test -n "$ac_ct_RANLIB"; then
4917 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4918else
4919as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4920for as_dir in $PATH
4921do
4922 IFS=$as_save_IFS
4923 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004924 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004925 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4926 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004927 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928 break 2
4929 fi
4930done
Matthias Kloseb9621712010-04-24 17:59:49 +00004931 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004932IFS=$as_save_IFS
4933
4934fi
4935fi
4936ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4937if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4939$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004940else
Matthias Kloseb9621712010-04-24 17:59:49 +00004941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4942$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004943fi
4944
4945 if test "x$ac_ct_RANLIB" = x; then
4946 RANLIB=":"
4947 else
4948 case $cross_compiling:$ac_tool_warned in
4949yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00004950{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4951$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004952ac_tool_warned=yes ;;
4953esac
4954 RANLIB=$ac_ct_RANLIB
4955 fi
4956else
4957 RANLIB="$ac_cv_prog_RANLIB"
4958fi
4959
4960
4961for ac_prog in ar aal
4962do
4963 # Extract the first word of "$ac_prog", so it can be a program name with args.
4964set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4966$as_echo_n "checking for $ac_word... " >&6; }
4967if test "${ac_cv_prog_AR+set}" = set; then :
4968 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004969else
4970 if test -n "$AR"; then
4971 ac_cv_prog_AR="$AR" # Let the user override the test.
4972else
4973as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4974for as_dir in $PATH
4975do
4976 IFS=$as_save_IFS
4977 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004978 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004979 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4980 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004982 break 2
4983 fi
4984done
Matthias Kloseb9621712010-04-24 17:59:49 +00004985 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004986IFS=$as_save_IFS
4987
4988fi
4989fi
4990AR=$ac_cv_prog_AR
4991if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4993$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004994else
Matthias Kloseb9621712010-04-24 17:59:49 +00004995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4996$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004997fi
4998
4999
5000 test -n "$AR" && break
5001done
5002test -n "$AR" || AR="ar"
5003
5004
5005# tweak ARFLAGS only if the user didn't set it on the command line
5006
5007if test -z "$ARFLAGS"
5008then
5009 ARFLAGS="rc"
5010fi
5011
5012
5013# Extract the first word of "svnversion", so it can be a program name with args.
5014set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5016$as_echo_n "checking for $ac_word... " >&6; }
5017if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5018 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005019else
5020 if test -n "$SVNVERSION"; then
5021 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5022else
5023as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5024for as_dir in $PATH
5025do
5026 IFS=$as_save_IFS
5027 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005029 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5030 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005032 break 2
5033 fi
5034done
Matthias Kloseb9621712010-04-24 17:59:49 +00005035 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005036IFS=$as_save_IFS
5037
5038 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5039fi
5040fi
5041SVNVERSION=$ac_cv_prog_SVNVERSION
5042if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5044$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005045else
Matthias Kloseb9621712010-04-24 17:59:49 +00005046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5047$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005048fi
5049
5050
5051if test $SVNVERSION = found
5052then
5053 SVNVERSION="svnversion \$(srcdir)"
5054else
5055 SVNVERSION="echo Unversioned directory"
5056fi
5057
5058case $MACHDEP in
5059bsdos*|hp*|HP*)
5060 # install -d does not work on BSDI or HP-UX
5061 if test -z "$INSTALL"
5062 then
5063 INSTALL="${srcdir}/install-sh -c"
5064 fi
5065esac
5066ac_aux_dir=
5067for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 for ac_t in install-sh install.sh shtool; do
5069 if test -f "$ac_dir/$ac_t"; then
5070 ac_aux_dir=$ac_dir
5071 ac_install_sh="$ac_aux_dir/$ac_t -c"
5072 break 2
5073 fi
5074 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005075done
5076if test -z "$ac_aux_dir"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005077 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005078fi
5079
5080# These three variables are undocumented and unsupported,
5081# and are intended to be withdrawn in a future Autoconf release.
5082# They can cause serious problems if a builder's source tree is in a directory
5083# whose full name contains unusual characters.
5084ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5085ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5086ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5087
5088
5089# Find a good install program. We prefer a C program (faster),
5090# so one script is as good as another. But avoid the broken or
5091# incompatible versions:
5092# SysV /etc/install, /usr/sbin/install
5093# SunOS /usr/etc/install
5094# IRIX /sbin/install
5095# AIX /bin/install
5096# AmigaOS /C/install, which installs bootblocks on floppy discs
5097# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5098# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5099# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5100# OS/2's system install, which has a completely different semantic
5101# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005102# Reject install programs that cannot install multiple files.
5103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5104$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005105if test -z "$INSTALL"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005106if test "${ac_cv_path_install+set}" = set; then :
5107 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005108else
5109 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5110for as_dir in $PATH
5111do
5112 IFS=$as_save_IFS
5113 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005114 # Account for people who put trailing slashes in PATH elements.
5115case $as_dir/ in #((
5116 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005117 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005119 /usr/ucb/* ) ;;
5120 *)
5121 # OSF1 and SCO ODT 3.0 have their own names for install.
5122 # Don't use installbsd from OSF since it installs stuff as root
5123 # by default.
5124 for ac_prog in ginstall scoinst install; do
5125 for ac_exec_ext in '' $ac_executable_extensions; do
5126 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5127 if test $ac_prog = install &&
5128 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5129 # AIX install. It has an incompatible calling convention.
5130 :
5131 elif test $ac_prog = install &&
5132 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5133 # program-specific install script used by HP pwplus--don't use.
5134 :
5135 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005136 rm -rf conftest.one conftest.two conftest.dir
5137 echo one > conftest.one
5138 echo two > conftest.two
5139 mkdir conftest.dir
5140 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5141 test -s conftest.one && test -s conftest.two &&
5142 test -s conftest.dir/conftest.one &&
5143 test -s conftest.dir/conftest.two
5144 then
5145 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5146 break 3
5147 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005148 fi
5149 fi
5150 done
5151 done
5152 ;;
5153esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005154
5155 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005156IFS=$as_save_IFS
5157
Matthias Kloseb9621712010-04-24 17:59:49 +00005158rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005159
5160fi
5161 if test "${ac_cv_path_install+set}" = set; then
5162 INSTALL=$ac_cv_path_install
5163 else
5164 # As a last resort, use the slow shell script. Don't cache a
5165 # value for INSTALL within a source directory, because that will
5166 # break other packages using the cache if that directory is
5167 # removed, or if the value is a relative name.
5168 INSTALL=$ac_install_sh
5169 fi
5170fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5172$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005173
5174# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5175# It thinks the first close brace ends the variable substitution.
5176test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5177
5178test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5179
5180test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5181
5182
5183# Not every filesystem supports hard links
5184
5185if test -z "$LN" ; then
5186 case $ac_sys_system in
5187 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005188 *) LN=ln;;
5189 esac
5190fi
5191
5192# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5194$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005195
5196# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005197if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005198 withval=$with_pydebug;
5199if test "$withval" != no
5200then
5201
Matthias Kloseb9621712010-04-24 17:59:49 +00005202$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005203
Matthias Kloseb9621712010-04-24 17:59:49 +00005204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5205$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005206 Py_DEBUG='true'
Matthias Kloseb9621712010-04-24 17:59:49 +00005207else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5208$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005209fi
5210else
Matthias Kloseb9621712010-04-24 17:59:49 +00005211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5212$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005213fi
5214
5215
5216# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5217# merged with this chunk of code?
5218
5219# Optimizer/debugger flags
5220# ------------------------
5221# (The following bit of code is complicated enough - please keep things
5222# indented properly. Just pretend you're editing Python code. ;-)
5223
5224# There are two parallel sets of case statements below, one that checks to
5225# see if OPT was set and one that does BASECFLAGS setting based upon
5226# compiler and platform. BASECFLAGS tweaks need to be made even if the
5227# user set OPT.
5228
5229# tweak OPT based on compiler and platform, only if the user didn't set
5230# it on the command line
5231
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005232if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005233then
5234 case $GCC in
5235 yes)
5236 if test "$CC" != 'g++' ; then
5237 STRICT_PROTO="-Wstrict-prototypes"
5238 fi
5239 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5240 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5241 WRAP="-fwrapv"
5242 fi
5243 case $ac_cv_prog_cc_g in
5244 yes)
5245 if test "$Py_DEBUG" = 'true' ; then
5246 # Optimization messes up debuggers, so turn it off for
5247 # debug builds.
5248 OPT="-g -Wall $STRICT_PROTO"
5249 else
5250 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5251 fi
5252 ;;
5253 *)
5254 OPT="-O3 -Wall $STRICT_PROTO"
5255 ;;
5256 esac
5257 case $ac_sys_system in
5258 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5259 ;;
5260 esac
5261 ;;
5262
5263 *)
5264 OPT="-O"
5265 ;;
5266 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005267fi
5268
5269
5270
5271# The -arch flags for universal builds on OSX
5272UNIVERSAL_ARCH_FLAGS=
5273
5274
5275# tweak BASECFLAGS based on compiler and platform
5276case $GCC in
5277yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005278 # Python doesn't violate C99 aliasing rules, but older versions of
5279 # GCC produce warnings for legal Python code. Enable
5280 # -fno-strict-aliasing on versions of GCC that support but produce
5281 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5283$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005284 ac_save_cc="$CC"
5285 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005286 save_CFLAGS="$CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +00005287 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
5288 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005289else
Matthias Kloseb9621712010-04-24 17:59:49 +00005290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005291/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005292
5293int
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}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005301if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005302 CC="$ac_save_cc -fstrict-aliasing"
5303 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
Matthias Kloseb9621712010-04-24 17:59:49 +00005304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005305/* end confdefs.h. */
5306
5307int
5308main ()
5309{
5310void f(int **x) {} int main() { double *x; f((int **) &x); return 0; }
5311 ;
5312 return 0;
5313}
5314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005315if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005316 ac_cv_no_strict_aliasing=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005317else
Matthias Kloseb9621712010-04-24 17:59:49 +00005318 ac_cv_no_strict_aliasing=yes
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005319fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5321else
Matthias Kloseb9621712010-04-24 17:59:49 +00005322 ac_cv_no_strict_aliasing=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005323fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005325fi
5326
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005327 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005328 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5330$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005331 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005332 then
5333 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5334 fi
5335
5336 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5337 # support. Without this, treatment of subnormals doesn't follow
5338 # the standard.
5339 case $ac_sys_machine in
5340 alpha*)
5341 BASECFLAGS="$BASECFLAGS -mieee"
5342 ;;
5343 esac
5344
5345 case $ac_sys_system in
5346 SCO_SV*)
5347 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5348 ;;
5349 # is there any other compiler on Darwin besides gcc?
5350 Darwin*)
5351 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5352 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005353 if test "${CC}" = gcc
5354 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5356$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005357 case "${UNIVERSALSDK}" in
5358 */MacOSX10.4u.sdk)
5359 # Build using 10.4 SDK, force usage of gcc when the
5360 # compiler is gcc, otherwise the user will get very
5361 # confusing error messages when building on OSX 10.6
5362 CC=gcc-4.0
5363 CPP=cpp-4.0
5364 ;;
5365 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5367$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005368 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005369
5370
5371 if test "${enable_universalsdk}"; then
5372 UNIVERSAL_ARCH_FLAGS=""
5373 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5374 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5375 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005376 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005377 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5378 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005379 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005380 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005381
5382 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5383 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005384 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005385 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005386
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005387 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5388 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005389 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005390 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005391
5392 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5393 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005394 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005395 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005396
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005397 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005398 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 +00005399
5400 fi
5401
5402
Ronald Oussoren666028b2010-04-18 19:07:43 +00005403 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5404 if test "${UNIVERSALSDK}" != "/"
5405 then
5406 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5407 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005408 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005409 fi
5410 fi
5411
5412 # Calculate the right deployment target for this build.
5413 #
5414 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5415 if test ${cur_target} '>' 10.2; then
5416 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005417 if test ${enable_universalsdk}; then
5418 if test "${UNIVERSAL_ARCHS}" = "all"; then
5419 # Ensure that the default platform for a
5420 # 4-way universal build is OSX 10.5,
5421 # that's the first OS release where
5422 # 4-way builds make sense.
5423 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005424
5425 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5426 cur_target='10.5'
5427
5428 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5429 cur_target='10.5'
5430
5431 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5432 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005433 fi
5434 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005435 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005436 # On Intel macs default to a deployment
5437 # target of 10.4, that's the first OSX
5438 # release with Intel support.
5439 cur_target="10.4"
5440 fi
5441 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005442 fi
5443 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5444
5445 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5446 # environment with a value that is the same as what we'll use
5447 # in the Makefile to ensure that we'll get the same compiler
5448 # environment during configure and build time.
5449 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5450 export MACOSX_DEPLOYMENT_TARGET
5451 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5452
5453 ;;
5454 OSF*)
5455 BASECFLAGS="$BASECFLAGS -mieee"
5456 ;;
5457 esac
5458 ;;
5459
5460*)
5461 case $ac_sys_system in
5462 OpenUNIX*|UnixWare*)
5463 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5464 ;;
5465 OSF*)
5466 BASECFLAGS="$BASECFLAGS -ieee -std"
5467 ;;
5468 SCO_SV*)
5469 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5470 ;;
5471 esac
5472 ;;
5473esac
5474
5475if test "$Py_DEBUG" = 'true'; then
5476 :
5477else
5478 OPT="-DNDEBUG $OPT"
5479fi
5480
5481if test "$ac_arch_flags"
5482then
5483 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5484fi
5485
5486# disable check for icc since it seems to pass, but generates a warning
5487if test "$CC" = icc
5488then
5489 ac_cv_opt_olimit_ok=no
5490fi
5491
Matthias Kloseb9621712010-04-24 17:59:49 +00005492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5493$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5494if test "${ac_cv_opt_olimit_ok+set}" = set; then :
5495 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005496else
5497 ac_save_cc="$CC"
5498CC="$CC -OPT:Olimit=0"
Matthias Kloseb9621712010-04-24 17:59:49 +00005499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005500/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005501
5502int
5503main ()
5504{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005505int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005506 ;
5507 return 0;
5508}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005510if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005511 ac_cv_opt_olimit_ok=yes
5512else
Matthias Kloseb9621712010-04-24 17:59:49 +00005513 ac_cv_opt_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005514fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005516CC="$ac_save_cc"
5517fi
5518
Matthias Kloseb9621712010-04-24 17:59:49 +00005519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5520$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005521if test $ac_cv_opt_olimit_ok = yes; then
5522 case $ac_sys_system in
5523 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5524 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5525 # environment?
5526 Darwin*)
5527 ;;
5528 *)
5529 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5530 ;;
5531 esac
5532else
Matthias Kloseb9621712010-04-24 17:59:49 +00005533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5534$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5535 if test "${ac_cv_olimit_ok+set}" = set; then :
5536 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005537else
5538 ac_save_cc="$CC"
5539 CC="$CC -Olimit 1500"
Matthias Kloseb9621712010-04-24 17:59:49 +00005540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005541/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005542
5543int
5544main ()
5545{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005546int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005547 ;
5548 return 0;
5549}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005551if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005552 ac_cv_olimit_ok=yes
5553else
Matthias Kloseb9621712010-04-24 17:59:49 +00005554 ac_cv_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005555fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005557 CC="$ac_save_cc"
5558fi
5559
Matthias Kloseb9621712010-04-24 17:59:49 +00005560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5561$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005562 if test $ac_cv_olimit_ok = yes; then
5563 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5564 fi
5565fi
5566
5567# Check whether GCC supports PyArg_ParseTuple format
5568if test "$GCC" = "yes"
5569then
Matthias Kloseb9621712010-04-24 17:59:49 +00005570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5571$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005572 save_CFLAGS=$CFLAGS
5573 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005575/* end confdefs.h. */
5576
5577 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
5578
5579int
5580main ()
5581{
5582
5583 ;
5584 return 0;
5585}
5586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005587if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005588
Matthias Kloseb9621712010-04-24 17:59:49 +00005589$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590
Matthias Kloseb9621712010-04-24 17:59:49 +00005591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5592$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005593else
Matthias Kloseb9621712010-04-24 17:59:49 +00005594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5595$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005596
5597fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5599 CFLAGS=$save_CFLAGS
5600fi
5601
5602# On some compilers, pthreads are available without further options
5603# (e.g. MacOS X). On some of these systems, the compiler will not
5604# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5605# So we have to see first whether pthreads are available without
5606# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5608$as_echo_n "checking whether pthreads are available without options... " >&6; }
5609if test "${ac_cv_pthread_is_default+set}" = set; then :
5610 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611else
Matthias Kloseb9621712010-04-24 17:59:49 +00005612 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613 ac_cv_pthread_is_default=no
5614else
Matthias Kloseb9621712010-04-24 17:59:49 +00005615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616/* end confdefs.h. */
5617
5618#include <pthread.h>
5619
5620void* routine(void* p){return NULL;}
5621
5622int main(){
5623 pthread_t p;
5624 if(pthread_create(&p,NULL,routine,NULL)!=0)
5625 return 1;
5626 (void)pthread_detach(p);
5627 return 0;
5628}
5629
5630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005631if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005632
5633 ac_cv_pthread_is_default=yes
5634 ac_cv_kthread=no
5635 ac_cv_pthread=no
5636
5637else
Matthias Kloseb9621712010-04-24 17:59:49 +00005638 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005640rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5641 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005642fi
5643
5644
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005645fi
5646
Matthias Kloseb9621712010-04-24 17:59:49 +00005647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5648$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005649
5650
5651if test $ac_cv_pthread_is_default = yes
5652then
5653 ac_cv_kpthread=no
5654else
5655# -Kpthread, if available, provides the right #defines
5656# and linker options to make pthread_create available
5657# Some compilers won't report that they do not support -Kpthread,
5658# so we need to run a program to see whether it really made the
5659# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5661$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5662if test "${ac_cv_kpthread+set}" = set; then :
5663 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005664else
5665 ac_save_cc="$CC"
5666CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005667if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668 ac_cv_kpthread=no
5669else
Matthias Kloseb9621712010-04-24 17:59:49 +00005670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671/* end confdefs.h. */
5672
5673#include <pthread.h>
5674
5675void* routine(void* p){return NULL;}
5676
5677int main(){
5678 pthread_t p;
5679 if(pthread_create(&p,NULL,routine,NULL)!=0)
5680 return 1;
5681 (void)pthread_detach(p);
5682 return 0;
5683}
5684
5685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005686if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687 ac_cv_kpthread=yes
5688else
Matthias Kloseb9621712010-04-24 17:59:49 +00005689 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005691rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5692 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693fi
5694
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695CC="$ac_save_cc"
5696fi
5697
Matthias Kloseb9621712010-04-24 17:59:49 +00005698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5699$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700fi
5701
5702if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5703then
5704# -Kthread, if available, provides the right #defines
5705# and linker options to make pthread_create available
5706# Some compilers won't report that they do not support -Kthread,
5707# so we need to run a program to see whether it really made the
5708# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5710$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5711if test "${ac_cv_kthread+set}" = set; then :
5712 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713else
5714 ac_save_cc="$CC"
5715CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005716if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717 ac_cv_kthread=no
5718else
Matthias Kloseb9621712010-04-24 17:59:49 +00005719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720/* end confdefs.h. */
5721
5722#include <pthread.h>
5723
5724void* routine(void* p){return NULL;}
5725
5726int main(){
5727 pthread_t p;
5728 if(pthread_create(&p,NULL,routine,NULL)!=0)
5729 return 1;
5730 (void)pthread_detach(p);
5731 return 0;
5732}
5733
5734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005735if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736 ac_cv_kthread=yes
5737else
Matthias Kloseb9621712010-04-24 17:59:49 +00005738 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5741 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742fi
5743
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744CC="$ac_save_cc"
5745fi
5746
Matthias Kloseb9621712010-04-24 17:59:49 +00005747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5748$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749fi
5750
5751if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5752then
5753# -pthread, if available, provides the right #defines
5754# and linker options to make pthread_create available
5755# Some compilers won't report that they do not support -pthread,
5756# so we need to run a program to see whether it really made the
5757# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5759$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5760if test "${ac_cv_thread+set}" = set; then :
5761 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762else
5763 ac_save_cc="$CC"
5764CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005765if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766 ac_cv_pthread=no
5767else
Matthias Kloseb9621712010-04-24 17:59:49 +00005768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769/* end confdefs.h. */
5770
5771#include <pthread.h>
5772
5773void* routine(void* p){return NULL;}
5774
5775int main(){
5776 pthread_t p;
5777 if(pthread_create(&p,NULL,routine,NULL)!=0)
5778 return 1;
5779 (void)pthread_detach(p);
5780 return 0;
5781}
5782
5783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005784if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785 ac_cv_pthread=yes
5786else
Matthias Kloseb9621712010-04-24 17:59:49 +00005787 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005789rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5790 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791fi
5792
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793CC="$ac_save_cc"
5794fi
5795
Matthias Kloseb9621712010-04-24 17:59:49 +00005796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5797$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005798fi
5799
5800# If we have set a CC compiler flag for thread support then
5801# check if it works for CXX, too.
5802ac_cv_cxx_thread=no
5803if test ! -z "$CXX"
5804then
Matthias Kloseb9621712010-04-24 17:59:49 +00005805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5806$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807ac_save_cxx="$CXX"
5808
5809if test "$ac_cv_kpthread" = "yes"
5810then
5811 CXX="$CXX -Kpthread"
5812 ac_cv_cxx_thread=yes
5813elif test "$ac_cv_kthread" = "yes"
5814then
5815 CXX="$CXX -Kthread"
5816 ac_cv_cxx_thread=yes
5817elif test "$ac_cv_pthread" = "yes"
5818then
5819 CXX="$CXX -pthread"
5820 ac_cv_cxx_thread=yes
5821fi
5822
5823if test $ac_cv_cxx_thread = yes
5824then
5825 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5826 $CXX -c conftest.$ac_ext 2>&5
5827 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5828 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5829 then
5830 ac_cv_cxx_thread=yes
5831 else
5832 ac_cv_cxx_thread=no
5833 fi
5834 rm -fr conftest*
5835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5837$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838fi
5839CXX="$ac_save_cxx"
5840
5841
5842# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5844$as_echo_n "checking for ANSI C header files... " >&6; }
5845if test "${ac_cv_header_stdc+set}" = set; then :
5846 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847else
Matthias Kloseb9621712010-04-24 17:59:49 +00005848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849/* end confdefs.h. */
5850#include <stdlib.h>
5851#include <stdarg.h>
5852#include <string.h>
5853#include <float.h>
5854
5855int
5856main ()
5857{
5858
5859 ;
5860 return 0;
5861}
5862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005863if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864 ac_cv_header_stdc=yes
5865else
Matthias Kloseb9621712010-04-24 17:59:49 +00005866 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5869
5870if test $ac_cv_header_stdc = yes; then
5871 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873/* end confdefs.h. */
5874#include <string.h>
5875
5876_ACEOF
5877if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005878 $EGREP "memchr" >/dev/null 2>&1; then :
5879
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880else
5881 ac_cv_header_stdc=no
5882fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005883rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884
5885fi
5886
5887if test $ac_cv_header_stdc = yes; then
5888 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890/* end confdefs.h. */
5891#include <stdlib.h>
5892
5893_ACEOF
5894if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005895 $EGREP "free" >/dev/null 2>&1; then :
5896
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897else
5898 ac_cv_header_stdc=no
5899fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005900rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901
5902fi
5903
5904if test $ac_cv_header_stdc = yes; then
5905 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005906 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907 :
5908else
Matthias Kloseb9621712010-04-24 17:59:49 +00005909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910/* end confdefs.h. */
5911#include <ctype.h>
5912#include <stdlib.h>
5913#if ((' ' & 0x0FF) == 0x020)
5914# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5915# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5916#else
5917# define ISLOWER(c) \
5918 (('a' <= (c) && (c) <= 'i') \
5919 || ('j' <= (c) && (c) <= 'r') \
5920 || ('s' <= (c) && (c) <= 'z'))
5921# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5922#endif
5923
5924#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5925int
5926main ()
5927{
5928 int i;
5929 for (i = 0; i < 256; i++)
5930 if (XOR (islower (i), ISLOWER (i))
5931 || toupper (i) != TOUPPER (i))
5932 return 2;
5933 return 0;
5934}
5935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005936if ac_fn_c_try_run "$LINENO"; then :
5937
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938else
Matthias Kloseb9621712010-04-24 17:59:49 +00005939 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005941rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5942 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943fi
5944
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945fi
5946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5948$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949if test $ac_cv_header_stdc = yes; then
5950
Matthias Kloseb9621712010-04-24 17:59:49 +00005951$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952
5953fi
5954
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005955for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5956fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005957ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005958shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005959unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005960sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5961sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005962sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005963sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005964sys/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 +00005965sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00005966bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005967do :
5968 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5969ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5970eval as_val=\$$as_ac_Header
5971 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00005972 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005973#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005974_ACEOF
5975
5976fi
5977
Guido van Rossum627b2d71993-12-24 10:39:16 +00005978done
5979
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005980ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005981for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00005982 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
5984$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
5985if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
5986 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005987else
Matthias Kloseb9621712010-04-24 17:59:49 +00005988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00005989/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005990#include <sys/types.h>
5991#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005992
Martin v. Löwis11437992002-04-12 09:54:03 +00005993int
5994main ()
5995{
5996if ((DIR *) 0)
5997return 0;
5998 ;
5999 return 0;
6000}
6001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006002if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006003 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006004else
Matthias Kloseb9621712010-04-24 17:59:49 +00006005 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006008fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006009eval ac_res=\$$as_ac_Header
6010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6011$as_echo "$ac_res" >&6; }
6012eval as_val=\$$as_ac_Header
6013 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006014 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006015#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006016_ACEOF
6017
6018ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006019fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006020
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006021done
6022# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6023if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6025$as_echo_n "checking for library containing opendir... " >&6; }
6026if test "${ac_cv_search_opendir+set}" = set; then :
6027 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006028else
Martin v. Löwis11437992002-04-12 09:54:03 +00006029 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006031/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006032
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006033/* Override any GCC internal prototype to avoid an error.
6034 Use char because int might match the return type of a GCC
6035 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006036#ifdef __cplusplus
6037extern "C"
6038#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006039char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006040int
6041main ()
6042{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006043return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006044 ;
6045 return 0;
6046}
6047_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006048for ac_lib in '' dir; do
6049 if test -z "$ac_lib"; then
6050 ac_res="none required"
6051 else
6052 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006053 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006054 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006055 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006056 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006057fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006058rm -f core conftest.err conftest.$ac_objext \
6059 conftest$ac_exeext
6060 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006061 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006062fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006063done
Matthias Kloseb9621712010-04-24 17:59:49 +00006064if test "${ac_cv_search_opendir+set}" = set; then :
6065
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006066else
6067 ac_cv_search_opendir=no
6068fi
6069rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006070LIBS=$ac_func_search_save_LIBS
6071fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6073$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006074ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006075if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006076 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006077
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006078fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006079
Michael W. Hudson54241132001-12-07 15:38:26 +00006080else
Matthias Kloseb9621712010-04-24 17:59:49 +00006081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6082$as_echo_n "checking for library containing opendir... " >&6; }
6083if test "${ac_cv_search_opendir+set}" = set; then :
6084 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006085else
6086 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006088/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006089
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006090/* Override any GCC internal prototype to avoid an error.
6091 Use char because int might match the return type of a GCC
6092 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006093#ifdef __cplusplus
6094extern "C"
6095#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006096char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006097int
6098main ()
6099{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006100return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006101 ;
6102 return 0;
6103}
6104_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006105for ac_lib in '' x; do
6106 if test -z "$ac_lib"; then
6107 ac_res="none required"
6108 else
6109 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006110 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006111 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006112 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006113 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006115rm -f core conftest.err conftest.$ac_objext \
6116 conftest$ac_exeext
6117 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006118 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006119fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006120done
Matthias Kloseb9621712010-04-24 17:59:49 +00006121if test "${ac_cv_search_opendir+set}" = set; then :
6122
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006123else
6124 ac_cv_search_opendir=no
6125fi
6126rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006127LIBS=$ac_func_search_save_LIBS
6128fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6130$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006131ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006132if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006133 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006134
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006135fi
6136
6137fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006138
Matthias Kloseb9621712010-04-24 17:59:49 +00006139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6140$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6141if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6142 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006143else
Matthias Kloseb9621712010-04-24 17:59:49 +00006144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006145/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006146#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006147int
6148main ()
6149{
6150return makedev(0, 0);
6151 ;
6152 return 0;
6153}
6154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006155if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006156 ac_cv_header_sys_types_h_makedev=yes
6157else
Matthias Kloseb9621712010-04-24 17:59:49 +00006158 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006159fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006160rm -f core conftest.err conftest.$ac_objext \
6161 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006162
6163fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6165$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006166
6167if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006168ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6169if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006170
Matthias Kloseb9621712010-04-24 17:59:49 +00006171$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172
6173fi
6174
6175
6176
6177 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006178 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6179if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006180
Matthias Kloseb9621712010-04-24 17:59:49 +00006181$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006182
6183fi
6184
6185
6186 fi
6187fi
6188
Michael W. Hudson54241132001-12-07 15:38:26 +00006189
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006190# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006191for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006192do :
6193 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006194#ifdef HAVE_CURSES_H
6195#include <curses.h>
6196#endif
6197
Matthias Kloseb9621712010-04-24 17:59:49 +00006198"
6199if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006200 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006201#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006202_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006203
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006204fi
6205
6206done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006207
6208
Martin v. Löwis11017b12006-01-14 18:12:57 +00006209# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006210for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006211do :
6212 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 +00006213#ifdef HAVE_ASM_TYPES_H
6214#include <asm/types.h>
6215#endif
6216#ifdef HAVE_SYS_SOCKET_H
6217#include <sys/socket.h>
6218#endif
6219
Matthias Kloseb9621712010-04-24 17:59:49 +00006220"
6221if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006222 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006223#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006224_ACEOF
6225
6226fi
6227
6228done
6229
6230
Guido van Rossum627b2d71993-12-24 10:39:16 +00006231# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006232was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6234$as_echo_n "checking for clock_t in time.h... " >&6; }
6235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006236/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006237#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006238
6239_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006240if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006241 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006242 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006243else
Martin v. Löwis11437992002-04-12 09:54:03 +00006244
6245
Matthias Kloseb9621712010-04-24 17:59:49 +00006246$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006247
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006248
Guido van Rossum627b2d71993-12-24 10:39:16 +00006249fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006250rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006251
Matthias Kloseb9621712010-04-24 17:59:49 +00006252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6253$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006254
Neal Norwitz11690112002-07-30 01:08:28 +00006255# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6257$as_echo_n "checking for makedev... " >&6; }
6258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006259/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006260#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006261int
6262main ()
6263{
6264 makedev(0, 0)
6265 ;
6266 return 0;
6267}
6268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006269if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006270 ac_cv_has_makedev=yes
6271else
Matthias Kloseb9621712010-04-24 17:59:49 +00006272 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006273fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006274rm -f core conftest.err conftest.$ac_objext \
6275 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006276if test "$ac_cv_has_makedev" = "no"; then
6277 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006279/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006280
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006281#define _OSF_SOURCE 1
6282#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006283
Neal Norwitz11690112002-07-30 01:08:28 +00006284int
6285main ()
6286{
6287 makedev(0, 0)
6288 ;
6289 return 0;
6290}
6291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006292if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006293 ac_cv_has_makedev=yes
6294else
Matthias Kloseb9621712010-04-24 17:59:49 +00006295 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006296fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006297rm -f core conftest.err conftest.$ac_objext \
6298 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006299 if test "$ac_cv_has_makedev" = "yes"; then
6300
Matthias Kloseb9621712010-04-24 17:59:49 +00006301$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006302
6303 fi
6304fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6306$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006307if test "$ac_cv_has_makedev" = "yes"; then
6308
Matthias Kloseb9621712010-04-24 17:59:49 +00006309$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006310
6311fi
6312
Martin v. Löwis399a6892002-10-04 10:22:02 +00006313# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6314# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6315# defined, but the compiler does not support pragma redefine_extname,
6316# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6317# structures (such as rlimit64) without declaring them. As a
6318# work-around, disable LFS on such configurations
6319
6320use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6322$as_echo_n "checking Solaris LFS bug... " >&6; }
6323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006324/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006325
6326#define _LARGEFILE_SOURCE 1
6327#define _FILE_OFFSET_BITS 64
6328#include <sys/resource.h>
6329
Martin v. Löwis399a6892002-10-04 10:22:02 +00006330int
6331main ()
6332{
6333struct rlimit foo;
6334 ;
6335 return 0;
6336}
6337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006338if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006339 sol_lfs_bug=no
6340else
Matthias Kloseb9621712010-04-24 17:59:49 +00006341 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6345$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006346if test "$sol_lfs_bug" = "yes"; then
6347 use_lfs=no
6348fi
6349
6350if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006351# Two defines needed to enable largefile support on various platforms
6352# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006353
Matthias Kloseb9621712010-04-24 17:59:49 +00006354$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006355
6356
Matthias Kloseb9621712010-04-24 17:59:49 +00006357$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006358
Martin v. Löwis399a6892002-10-04 10:22:02 +00006359fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006360
Guido van Rossum84e7b241996-08-19 21:59:00 +00006361# Add some code to confdefs.h so that the test for off_t works on SCO
6362cat >> confdefs.h <<\EOF
6363#if defined(SCO_DS)
6364#undef _OFF_T
6365#endif
6366EOF
6367
Guido van Rossumef2255b2000-03-10 22:30:29 +00006368# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006369ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6370if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006371
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006372else
Martin v. Löwis11437992002-04-12 09:54:03 +00006373
6374cat >>confdefs.h <<_ACEOF
6375#define mode_t int
6376_ACEOF
6377
6378fi
6379
Matthias Kloseb9621712010-04-24 17:59:49 +00006380ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6381if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006382
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006383else
Martin v. Löwis11437992002-04-12 09:54:03 +00006384
6385cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006386#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006387_ACEOF
6388
6389fi
6390
Matthias Kloseb9621712010-04-24 17:59:49 +00006391ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6392if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006393
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006394else
Martin v. Löwis11437992002-04-12 09:54:03 +00006395
6396cat >>confdefs.h <<_ACEOF
6397#define pid_t int
6398_ACEOF
6399
6400fi
6401
Matthias Kloseb9621712010-04-24 17:59:49 +00006402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
6403$as_echo_n "checking return type of signal handlers... " >&6; }
6404if test "${ac_cv_type_signal+set}" = set; then :
6405 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006406else
Matthias Kloseb9621712010-04-24 17:59:49 +00006407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006408/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006409#include <sys/types.h>
6410#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006411
Martin v. Löwis11437992002-04-12 09:54:03 +00006412int
6413main ()
6414{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006415return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006416 ;
6417 return 0;
6418}
6419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006420if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006421 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006422else
Matthias Kloseb9621712010-04-24 17:59:49 +00006423 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006426fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
6428$as_echo "$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006429
Martin v. Löwis11437992002-04-12 09:54:03 +00006430cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006431#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006432_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006433
Michael W. Hudson54241132001-12-07 15:38:26 +00006434
Matthias Kloseb9621712010-04-24 17:59:49 +00006435ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6436if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006437
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006438else
Martin v. Löwis11437992002-04-12 09:54:03 +00006439
6440cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006441#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006442_ACEOF
6443
6444fi
6445
Matthias Kloseb9621712010-04-24 17:59:49 +00006446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6447$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6448if test "${ac_cv_type_uid_t+set}" = set; then :
6449 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006450else
Matthias Kloseb9621712010-04-24 17:59:49 +00006451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006452/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006453#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006454
6455_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006456if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006457 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006458 ac_cv_type_uid_t=yes
6459else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006460 ac_cv_type_uid_t=no
6461fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006462rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006463
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006464fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6466$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006467if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006468
Matthias Kloseb9621712010-04-24 17:59:49 +00006469$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006470
6471
Matthias Kloseb9621712010-04-24 17:59:49 +00006472$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006473
6474fi
6475
Matthias Kloseb9621712010-04-24 17:59:49 +00006476ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6477case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006478 no|yes) ;; #(
6479 *)
6480
Matthias Kloseb9621712010-04-24 17:59:49 +00006481$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006482
6483
6484cat >>confdefs.h <<_ACEOF
6485#define uint32_t $ac_cv_c_uint32_t
6486_ACEOF
6487;;
6488 esac
6489
Matthias Kloseb9621712010-04-24 17:59:49 +00006490ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6491case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006492 no|yes) ;; #(
6493 *)
6494
Matthias Kloseb9621712010-04-24 17:59:49 +00006495$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006496
6497
6498cat >>confdefs.h <<_ACEOF
6499#define uint64_t $ac_cv_c_uint64_t
6500_ACEOF
6501;;
6502 esac
6503
Matthias Kloseb9621712010-04-24 17:59:49 +00006504ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6505case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006506 no|yes) ;; #(
6507 *)
6508
6509cat >>confdefs.h <<_ACEOF
6510#define int32_t $ac_cv_c_int32_t
6511_ACEOF
6512;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006513esac
6514
Matthias Kloseb9621712010-04-24 17:59:49 +00006515ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6516case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006517 no|yes) ;; #(
6518 *)
6519
6520cat >>confdefs.h <<_ACEOF
6521#define int64_t $ac_cv_c_int64_t
6522_ACEOF
6523;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006524esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006525
Matthias Kloseb9621712010-04-24 17:59:49 +00006526ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6527if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006528
Matthias Kloseb9621712010-04-24 17:59:49 +00006529$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006530
6531fi
6532
Jack Jansendd19cf82001-12-06 22:36:17 +00006533
Michael W. Hudson54241132001-12-07 15:38:26 +00006534# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006535# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006536# The cast to long int works around a bug in the HP C Compiler
6537# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6538# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6539# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6541$as_echo_n "checking size of int... " >&6; }
6542if test "${ac_cv_sizeof_int+set}" = set; then :
6543 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006544else
Matthias Kloseb9621712010-04-24 17:59:49 +00006545 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 +00006546
Martin v. Löwis11437992002-04-12 09:54:03 +00006547else
Matthias Kloseb9621712010-04-24 17:59:49 +00006548 if test "$ac_cv_type_int" = yes; then
6549 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6550$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6551{ as_fn_set_status 77
6552as_fn_error "cannot compute sizeof (int)
6553See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006554 else
6555 ac_cv_sizeof_int=0
6556 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006558
Martin v. Löwis11437992002-04-12 09:54:03 +00006559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6561$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006562
6563
6564
Martin v. Löwis11437992002-04-12 09:54:03 +00006565cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006566#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006567_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006568
6569
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006570# The cast to long int works around a bug in the HP C Compiler
6571# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6572# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6573# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6575$as_echo_n "checking size of long... " >&6; }
6576if test "${ac_cv_sizeof_long+set}" = set; then :
6577 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006578else
Matthias Kloseb9621712010-04-24 17:59:49 +00006579 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 +00006580
Martin v. Löwis11437992002-04-12 09:54:03 +00006581else
Matthias Kloseb9621712010-04-24 17:59:49 +00006582 if test "$ac_cv_type_long" = yes; then
6583 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6584$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6585{ as_fn_set_status 77
6586as_fn_error "cannot compute sizeof (long)
6587See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006588 else
6589 ac_cv_sizeof_long=0
6590 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006592
Martin v. Löwis11437992002-04-12 09:54:03 +00006593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6595$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006596
6597
6598
Martin v. Löwis11437992002-04-12 09:54:03 +00006599cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006600#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006601_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006602
6603
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006604# The cast to long int works around a bug in the HP C Compiler
6605# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6606# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6607# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6609$as_echo_n "checking size of void *... " >&6; }
6610if test "${ac_cv_sizeof_void_p+set}" = set; then :
6611 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006612else
Matthias Kloseb9621712010-04-24 17:59:49 +00006613 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 +00006614
Martin v. Löwis11437992002-04-12 09:54:03 +00006615else
Matthias Kloseb9621712010-04-24 17:59:49 +00006616 if test "$ac_cv_type_void_p" = yes; then
6617 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6618$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6619{ as_fn_set_status 77
6620as_fn_error "cannot compute sizeof (void *)
6621See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006622 else
6623 ac_cv_sizeof_void_p=0
6624 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006626
Martin v. Löwis11437992002-04-12 09:54:03 +00006627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6629$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006630
6631
6632
Martin v. Löwis11437992002-04-12 09:54:03 +00006633cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006634#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006635_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006636
6637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006638# The cast to long int works around a bug in the HP C Compiler
6639# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6640# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6641# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6643$as_echo_n "checking size of short... " >&6; }
6644if test "${ac_cv_sizeof_short+set}" = set; then :
6645 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006646else
Matthias Kloseb9621712010-04-24 17:59:49 +00006647 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 +00006648
Martin v. Löwis11437992002-04-12 09:54:03 +00006649else
Matthias Kloseb9621712010-04-24 17:59:49 +00006650 if test "$ac_cv_type_short" = yes; then
6651 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6652$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6653{ as_fn_set_status 77
6654as_fn_error "cannot compute sizeof (short)
6655See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006656 else
6657 ac_cv_sizeof_short=0
6658 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006660
Martin v. Löwis11437992002-04-12 09:54:03 +00006661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6663$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006664
6665
6666
Martin v. Löwis11437992002-04-12 09:54:03 +00006667cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006668#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006669_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006670
6671
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006672# The cast to long int works around a bug in the HP C Compiler
6673# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6674# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6675# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6677$as_echo_n "checking size of float... " >&6; }
6678if test "${ac_cv_sizeof_float+set}" = set; then :
6679 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006680else
Matthias Kloseb9621712010-04-24 17:59:49 +00006681 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 +00006682
Martin v. Löwis11437992002-04-12 09:54:03 +00006683else
Matthias Kloseb9621712010-04-24 17:59:49 +00006684 if test "$ac_cv_type_float" = yes; then
6685 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6686$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6687{ as_fn_set_status 77
6688as_fn_error "cannot compute sizeof (float)
6689See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006690 else
6691 ac_cv_sizeof_float=0
6692 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006694
Martin v. Löwis11437992002-04-12 09:54:03 +00006695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6697$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006698
6699
6700
Martin v. Löwis11437992002-04-12 09:54:03 +00006701cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006702#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006703_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006704
6705
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006706# The cast to long int works around a bug in the HP C Compiler
6707# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6708# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6709# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6711$as_echo_n "checking size of double... " >&6; }
6712if test "${ac_cv_sizeof_double+set}" = set; then :
6713 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006714else
Matthias Kloseb9621712010-04-24 17:59:49 +00006715 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 +00006716
Martin v. Löwis11437992002-04-12 09:54:03 +00006717else
Matthias Kloseb9621712010-04-24 17:59:49 +00006718 if test "$ac_cv_type_double" = yes; then
6719 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6721{ as_fn_set_status 77
6722as_fn_error "cannot compute sizeof (double)
6723See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006724 else
6725 ac_cv_sizeof_double=0
6726 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006728
Martin v. Löwis11437992002-04-12 09:54:03 +00006729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6731$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006732
6733
6734
Martin v. Löwis11437992002-04-12 09:54:03 +00006735cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006736#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006737_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006738
6739
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006740# The cast to long int works around a bug in the HP C Compiler
6741# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6742# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6743# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6745$as_echo_n "checking size of fpos_t... " >&6; }
6746if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6747 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006748else
Matthias Kloseb9621712010-04-24 17:59:49 +00006749 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 +00006750
Martin v. Löwis11437992002-04-12 09:54:03 +00006751else
Matthias Kloseb9621712010-04-24 17:59:49 +00006752 if test "$ac_cv_type_fpos_t" = yes; then
6753 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6754$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6755{ as_fn_set_status 77
6756as_fn_error "cannot compute sizeof (fpos_t)
6757See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006758 else
6759 ac_cv_sizeof_fpos_t=0
6760 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006762
Martin v. Löwis11437992002-04-12 09:54:03 +00006763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6765$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006766
6767
6768
Martin v. Löwis11437992002-04-12 09:54:03 +00006769cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006770#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006771_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006772
Michael W. Hudson54241132001-12-07 15:38:26 +00006773
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006774# The cast to long int works around a bug in the HP C Compiler
6775# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6776# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6777# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6779$as_echo_n "checking size of size_t... " >&6; }
6780if test "${ac_cv_sizeof_size_t+set}" = set; then :
6781 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006782else
Matthias Kloseb9621712010-04-24 17:59:49 +00006783 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 +00006784
Martin v. Löwis18e16552006-02-15 17:27:45 +00006785else
Matthias Kloseb9621712010-04-24 17:59:49 +00006786 if test "$ac_cv_type_size_t" = yes; then
6787 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6788$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6789{ as_fn_set_status 77
6790as_fn_error "cannot compute sizeof (size_t)
6791See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006792 else
6793 ac_cv_sizeof_size_t=0
6794 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006796
Martin v. Löwis18e16552006-02-15 17:27:45 +00006797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6799$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006800
6801
6802
Martin v. Löwis18e16552006-02-15 17:27:45 +00006803cat >>confdefs.h <<_ACEOF
6804#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6805_ACEOF
6806
6807
Christian Heimes400adb02008-02-01 08:12:03 +00006808# The cast to long int works around a bug in the HP C Compiler
6809# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6810# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6811# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6813$as_echo_n "checking size of pid_t... " >&6; }
6814if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6815 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006816else
Matthias Kloseb9621712010-04-24 17:59:49 +00006817 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 +00006818
Christian Heimes400adb02008-02-01 08:12:03 +00006819else
Matthias Kloseb9621712010-04-24 17:59:49 +00006820 if test "$ac_cv_type_pid_t" = yes; then
6821 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6822$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6823{ as_fn_set_status 77
6824as_fn_error "cannot compute sizeof (pid_t)
6825See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006826 else
6827 ac_cv_sizeof_pid_t=0
6828 fi
6829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006830
Christian Heimes400adb02008-02-01 08:12:03 +00006831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6833$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006834
6835
6836
6837cat >>confdefs.h <<_ACEOF
6838#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6839_ACEOF
6840
6841
Michael W. Hudson54241132001-12-07 15:38:26 +00006842
Matthias Kloseb9621712010-04-24 17:59:49 +00006843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6844$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006845have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006847/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006848
Martin v. Löwis11437992002-04-12 09:54:03 +00006849int
6850main ()
6851{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006852long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006853 ;
6854 return 0;
6855}
6856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006857if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006858
6859
Matthias Kloseb9621712010-04-24 17:59:49 +00006860$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006861
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006862 have_long_long=yes
6863
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6867$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006868if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006869# The cast to long int works around a bug in the HP C Compiler
6870# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6871# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6872# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6874$as_echo_n "checking size of long long... " >&6; }
6875if test "${ac_cv_sizeof_long_long+set}" = set; then :
6876 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006877else
Matthias Kloseb9621712010-04-24 17:59:49 +00006878 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 +00006879
Martin v. Löwis11437992002-04-12 09:54:03 +00006880else
Matthias Kloseb9621712010-04-24 17:59:49 +00006881 if test "$ac_cv_type_long_long" = yes; then
6882 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6883$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6884{ as_fn_set_status 77
6885as_fn_error "cannot compute sizeof (long long)
6886See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006887 else
6888 ac_cv_sizeof_long_long=0
6889 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006891
Martin v. Löwis11437992002-04-12 09:54:03 +00006892fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6894$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006895
6896
6897
Martin v. Löwis11437992002-04-12 09:54:03 +00006898cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006899#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006900_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006901
Michael W. Hudson54241132001-12-07 15:38:26 +00006902
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006903fi
6904
Matthias Kloseb9621712010-04-24 17:59:49 +00006905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6906$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006907have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006909/* end confdefs.h. */
6910
6911int
6912main ()
6913{
6914long double x; x = (long double)0;
6915 ;
6916 return 0;
6917}
6918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006919if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006920
6921
Matthias Kloseb9621712010-04-24 17:59:49 +00006922$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006923
6924 have_long_double=yes
6925
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006926fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6929$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006930if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006931# The cast to long int works around a bug in the HP C Compiler
6932# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6933# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6934# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6936$as_echo_n "checking size of long double... " >&6; }
6937if test "${ac_cv_sizeof_long_double+set}" = set; then :
6938 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006939else
Matthias Kloseb9621712010-04-24 17:59:49 +00006940 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 +00006941
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006942else
Matthias Kloseb9621712010-04-24 17:59:49 +00006943 if test "$ac_cv_type_long_double" = yes; then
6944 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6945$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6946{ as_fn_set_status 77
6947as_fn_error "cannot compute sizeof (long double)
6948See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006949 else
6950 ac_cv_sizeof_long_double=0
6951 fi
6952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006953
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6956$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006957
6958
6959
6960cat >>confdefs.h <<_ACEOF
6961#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6962_ACEOF
6963
6964
6965fi
6966
6967
Matthias Kloseb9621712010-04-24 17:59:49 +00006968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6969$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006970have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00006972/* end confdefs.h. */
6973
6974int
6975main ()
6976{
6977_Bool x; x = (_Bool)0;
6978 ;
6979 return 0;
6980}
6981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006982if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00006983
6984
Matthias Kloseb9621712010-04-24 17:59:49 +00006985$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00006986
6987 have_c99_bool=yes
6988
Thomas Woutersb2137042007-02-01 18:02:27 +00006989fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
6992$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006993if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006994# The cast to long int works around a bug in the HP C Compiler
6995# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6996# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6997# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
6999$as_echo_n "checking size of _Bool... " >&6; }
7000if test "${ac_cv_sizeof__Bool+set}" = set; then :
7001 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007002else
Matthias Kloseb9621712010-04-24 17:59:49 +00007003 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 +00007004
Thomas Woutersb2137042007-02-01 18:02:27 +00007005else
Matthias Kloseb9621712010-04-24 17:59:49 +00007006 if test "$ac_cv_type__Bool" = yes; then
7007 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7008$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7009{ as_fn_set_status 77
7010as_fn_error "cannot compute sizeof (_Bool)
7011See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007012 else
7013 ac_cv_sizeof__Bool=0
7014 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007015fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007016
Thomas Woutersb2137042007-02-01 18:02:27 +00007017fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7019$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007020
7021
7022
Thomas Woutersb2137042007-02-01 18:02:27 +00007023cat >>confdefs.h <<_ACEOF
7024#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7025_ACEOF
7026
7027
7028fi
7029
Matthias Kloseb9621712010-04-24 17:59:49 +00007030ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007031 #include <stdint.h>
7032 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007033"
7034if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007035
7036cat >>confdefs.h <<_ACEOF
7037#define HAVE_UINTPTR_T 1
7038_ACEOF
7039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007040# The cast to long int works around a bug in the HP C Compiler
7041# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7042# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7043# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7045$as_echo_n "checking size of uintptr_t... " >&6; }
7046if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7047 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007048else
Matthias Kloseb9621712010-04-24 17:59:49 +00007049 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 +00007050
Martin v. Löwis11437992002-04-12 09:54:03 +00007051else
Matthias Kloseb9621712010-04-24 17:59:49 +00007052 if test "$ac_cv_type_uintptr_t" = yes; then
7053 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7054$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7055{ as_fn_set_status 77
7056as_fn_error "cannot compute sizeof (uintptr_t)
7057See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007058 else
7059 ac_cv_sizeof_uintptr_t=0
7060 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007061fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007062
Martin v. Löwis11437992002-04-12 09:54:03 +00007063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7065$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007066
7067
7068
Martin v. Löwis11437992002-04-12 09:54:03 +00007069cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007070#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007071_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007072
Michael W. Hudson54241132001-12-07 15:38:26 +00007073
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007074fi
7075
Thomas Wouters89f507f2006-12-13 04:49:30 +00007076
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007077# The cast to long int works around a bug in the HP C Compiler
7078# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7079# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7080# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7082$as_echo_n "checking size of off_t... " >&6; }
7083if test "${ac_cv_sizeof_off_t+set}" = set; then :
7084 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007085else
Matthias Kloseb9621712010-04-24 17:59:49 +00007086 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007087#ifdef HAVE_SYS_TYPES_H
7088#include <sys/types.h>
7089#endif
7090
Matthias Kloseb9621712010-04-24 17:59:49 +00007091"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007092
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007093else
Matthias Kloseb9621712010-04-24 17:59:49 +00007094 if test "$ac_cv_type_off_t" = yes; then
7095 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7097{ as_fn_set_status 77
7098as_fn_error "cannot compute sizeof (off_t)
7099See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007100 else
7101 ac_cv_sizeof_off_t=0
7102 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007104
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007105fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7107$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007108
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007109
7110
Martin v. Löwis11437992002-04-12 09:54:03 +00007111cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007112#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007113_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007114
Michael W. Hudson54241132001-12-07 15:38:26 +00007115
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007116
Matthias Kloseb9621712010-04-24 17:59:49 +00007117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7118$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007119if test "$have_long_long" = yes
7120then
7121if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007122 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007123
Matthias Kloseb9621712010-04-24 17:59:49 +00007124$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007125
Matthias Kloseb9621712010-04-24 17:59:49 +00007126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7127$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007128else
Matthias Kloseb9621712010-04-24 17:59:49 +00007129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7130$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007131fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007132else
Matthias Kloseb9621712010-04-24 17:59:49 +00007133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7134$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007135fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007136
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007137# The cast to long int works around a bug in the HP C Compiler
7138# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7139# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7140# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7142$as_echo_n "checking size of time_t... " >&6; }
7143if test "${ac_cv_sizeof_time_t+set}" = set; then :
7144 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007145else
Matthias Kloseb9621712010-04-24 17:59:49 +00007146 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007147#ifdef HAVE_SYS_TYPES_H
7148#include <sys/types.h>
7149#endif
7150#ifdef HAVE_TIME_H
7151#include <time.h>
7152#endif
7153
Matthias Kloseb9621712010-04-24 17:59:49 +00007154"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007155
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007156else
Matthias Kloseb9621712010-04-24 17:59:49 +00007157 if test "$ac_cv_type_time_t" = yes; then
7158 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7159$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7160{ as_fn_set_status 77
7161as_fn_error "cannot compute sizeof (time_t)
7162See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007163 else
7164 ac_cv_sizeof_time_t=0
7165 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007166fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007167
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7170$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007171
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007172
7173
Martin v. Löwis11437992002-04-12 09:54:03 +00007174cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007175#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007176_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007177
Michael W. Hudson54241132001-12-07 15:38:26 +00007178
7179
Trent Mick635f6fb2000-08-23 21:33:05 +00007180# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007181ac_save_cc="$CC"
7182if test "$ac_cv_kpthread" = "yes"
7183then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007184elif test "$ac_cv_kthread" = "yes"
7185then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007186elif test "$ac_cv_pthread" = "yes"
7187then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007188fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007189
Matthias Kloseb9621712010-04-24 17:59:49 +00007190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7191$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007192have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007194/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00007195#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007196int
7197main ()
7198{
Guido van Rossum12580492000-09-24 16:47:19 +00007199pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007200 ;
7201 return 0;
7202}
7203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007204if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007205 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7209$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007210if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007211 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007212# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7213# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7214# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7216$as_echo_n "checking size of pthread_t... " >&6; }
7217if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7218 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007219else
Matthias Kloseb9621712010-04-24 17:59:49 +00007220 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007221#ifdef HAVE_PTHREAD_H
7222#include <pthread.h>
7223#endif
7224
Matthias Kloseb9621712010-04-24 17:59:49 +00007225"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007226
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007227else
Matthias Kloseb9621712010-04-24 17:59:49 +00007228 if test "$ac_cv_type_pthread_t" = yes; then
7229 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7230$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7231{ as_fn_set_status 77
7232as_fn_error "cannot compute sizeof (pthread_t)
7233See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007234 else
7235 ac_cv_sizeof_pthread_t=0
7236 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007238
Trent Mick635f6fb2000-08-23 21:33:05 +00007239fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7241$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007242
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007243
7244
Martin v. Löwis11437992002-04-12 09:54:03 +00007245cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007246#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007247_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007248
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007249
Trent Mick635f6fb2000-08-23 21:33:05 +00007250fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007251CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007252
Michael W. Hudson54241132001-12-07 15:38:26 +00007253
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007254case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007255 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007256 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7257 ;;
7258 Darwin/*)
7259 OTHER_LIBTOOL_OPT=""
7260 ;;
7261esac
7262
7263
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007264ARCH_RUN_32BIT=""
7265
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007266case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007267 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007268 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7269 if test "${enable_universalsdk}"; then
7270 :
7271 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007272 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007273 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007274 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007275 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007276 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007277 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007278 if test ${gcc_version} '<' 4.0
7279 then
7280 LIBTOOL_CRUFT="-lcc_dynamic"
7281 else
7282 LIBTOOL_CRUFT=""
7283 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007284 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007285 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007286else
Matthias Kloseb9621712010-04-24 17:59:49 +00007287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007288/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007289
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007290 #include <unistd.h>
7291 int main(int argc, char*argv[])
7292 {
7293 if (sizeof(long) == 4) {
7294 return 0;
7295 } else {
7296 return 1;
7297 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007298 }
7299
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007301if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007302 ac_osx_32bit=yes
7303else
Matthias Kloseb9621712010-04-24 17:59:49 +00007304 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007305fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007306rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7307 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007308fi
7309
7310
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007311 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007312 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007313 i386)
7314 MACOSX_DEFAULT_ARCH="i386"
7315 ;;
7316 ppc)
7317 MACOSX_DEFAULT_ARCH="ppc"
7318 ;;
7319 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007320 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007321 ;;
7322 esac
7323 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007324 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007325 i386)
7326 MACOSX_DEFAULT_ARCH="x86_64"
7327 ;;
7328 ppc)
7329 MACOSX_DEFAULT_ARCH="ppc64"
7330 ;;
7331 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007332 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007333 ;;
7334 esac
7335
7336 #ARCH_RUN_32BIT="true"
7337 fi
7338
7339 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007340 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007341 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007342esac
7343
Matthias Kloseb9621712010-04-24 17:59:49 +00007344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7345$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007346if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007347then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007348 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007349 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007350 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007351
Matthias Kloseb9621712010-04-24 17:59:49 +00007352$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007353
Matthias Kloseb9621712010-04-24 17:59:49 +00007354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7355$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007356 if test $enable_shared = "yes"
7357 then
Matthias Kloseb9621712010-04-24 17:59:49 +00007358 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 +00007359 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007360else
Matthias Kloseb9621712010-04-24 17:59:49 +00007361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7362$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007363fi
7364
Matthias Kloseb9621712010-04-24 17:59:49 +00007365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7366$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007367case $ac_sys_system/$ac_sys_release in
7368 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007369
Matthias Kloseb9621712010-04-24 17:59:49 +00007370$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007371
Matthias Kloseb9621712010-04-24 17:59:49 +00007372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7373$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007374 ;;
7375 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7377$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007378 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007379esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007380
Guido van Rossum0a516c91994-09-12 10:58:40 +00007381# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007382
Michael W. Hudson54241132001-12-07 15:38:26 +00007383
7384
7385
7386
Benjamin Peterson99f03762010-04-11 22:15:28 +00007387
Guido van Rossum0a516c91994-09-12 10:58:40 +00007388# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007389# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Kloseb9621712010-04-24 17:59:49 +00007390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7391$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007392if test -z "$SO"
7393then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007394 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +00007395 hp*|HP*)
7396 case `uname -m` in
7397 ia64) SO=.so;;
7398 *) SO=.sl;;
7399 esac
7400 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007401 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007402 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007403 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007404else
7405 # this might also be a termcap variable, see #610332
7406 echo
7407 echo '====================================================================='
7408 echo '+ +'
7409 echo '+ WARNING: You have set SO in your environment. +'
7410 echo '+ Do you really mean to change the extension for shared libraries? +'
7411 echo '+ Continuing in 10 seconds to let you to ponder. +'
7412 echo '+ +'
7413 echo '====================================================================='
7414 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7417$as_echo "$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00007418
Georg Brandlb1441c72009-01-03 22:33:39 +00007419
Thomas Wouters477c8d52006-05-27 19:21:47 +00007420cat >>confdefs.h <<_ACEOF
7421#define SHLIB_EXT "$SO"
7422_ACEOF
7423
Guido van Rossum0a516c91994-09-12 10:58:40 +00007424# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007425# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007426# (Shared libraries in this instance are shared modules to be loaded into
7427# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7429$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007430if test -z "$LDSHARED"
7431then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007432 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007433 AIX*)
7434 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007435 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007436 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007437 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007438 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007439 SunOS/5*)
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='$(CC) -G'
7445 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007446 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007447 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007448 if test "$GCC" = "yes" ; then
7449 LDSHARED='$(CC) -shared'
7450 LDCXXSHARED='$(CXX) -shared'
7451 else
7452 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007453 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007454 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007455 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00007456 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007457 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007458 if test "$enable_framework" ; then
7459 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007460 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7461 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007462 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007463 else
7464 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007465 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007466 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007467 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007468 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +00007469 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007470 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007471 if test "$enable_framework" ; then
7472 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007473 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7474 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007475 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007476 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007477 # No framework, use the Python app as bundle-loader
7478 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007479 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007480 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007481 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007482 Darwin/*)
7483 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7484 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007485
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007486 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007487 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007488 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007489 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007490 fi
Jack Jansen6b08a402004-06-03 12:41:45 +00007491 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007492 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007493 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007494 else
7495 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007496 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007497 if test "$enable_framework" ; then
7498 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007499 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7500 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007501 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007502 else
7503 # No framework, use the Python app as bundle-loader
7504 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7505 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007506 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007507 fi
7508 fi
7509 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007510 Linux*|GNU*|QNX*)
7511 LDSHARED='$(CC) -shared'
7512 LDCXXSHARED='$(CXX) -shared';;
7513 BSD/OS*/4*)
7514 LDSHARED="gcc -shared"
7515 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007516 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007517 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007518 then
Benjamin Petersonab0a7522010-03-14 15:18:25 +00007519 LDSHARED='$(CC) -shared ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007520 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007521 else
7522 LDSHARED="ld -Bshareable ${LDFLAGS}"
7523 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007524 OpenBSD*)
7525 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7526 then
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 else
7530 case `uname -r` in
7531 [01].* | 2.[0-7] | 2.[0-7].*)
7532 LDSHARED="ld -Bshareable ${LDFLAGS}"
7533 ;;
7534 *)
7535 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007536 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007537 ;;
7538 esac
7539 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007540 NetBSD*|DragonFly*)
7541 LDSHARED="cc -shared ${LDFLAGS}"
7542 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007543 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007544 if test "$GCC" = "yes" ; then
7545 LDSHARED='$(CC) -shared'
7546 LDCXXSHARED='$(CXX) -shared'
7547 else
7548 LDSHARED='$(CC) -G'
7549 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007550 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007551 SCO_SV*)
7552 LDSHARED='$(CC) -Wl,-G,-Bexport'
7553 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7554 CYGWIN*)
7555 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7556 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007557 *) LDSHARED="ld";;
7558 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7561$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007562LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007563BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007564# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007565# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7567$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007568if test -z "$CCSHARED"
7569then
Guido van Rossum07397971997-04-29 21:49:50 +00007570 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007571 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007572 then CCSHARED="-fPIC";
7573 elif test `uname -p` = sparc;
7574 then CCSHARED="-xcode=pic32";
7575 else CCSHARED="-Kpic";
7576 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007577 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007578 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007579 else CCSHARED="+z";
7580 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007581 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007582 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007583 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007584 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007585 if test "$GCC" = "yes"
7586 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007587 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007588 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007589 SCO_SV*)
7590 if test "$GCC" = "yes"
7591 then CCSHARED="-fPIC"
7592 else CCSHARED="-Kpic -belf"
7593 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007594 IRIX*/6*) case $CC in
7595 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007596 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007597 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007598 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7601$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007602# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007603# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7605$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007606if test -z "$LINKFORSHARED"
7607then
Guido van Rossum07397971997-04-29 21:49:50 +00007608 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007609 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007610 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007611 LINKFORSHARED="-Wl,-E -Wl,+s";;
7612# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007613 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007614 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007615 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007616 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007617 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007618 if test "$enable_framework"
7619 then
Jack Jansenda49e192005-01-07 13:08:22 +00007620 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007621 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007622 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007623 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007624 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007625 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007626 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007627 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7628 then
7629 LINKFORSHARED="-Wl,--export-dynamic"
7630 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007631 SunOS/5*) case $CC in
7632 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007633 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007634 then
7635 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007636 fi;;
7637 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007638 CYGWIN*)
7639 if test $enable_shared = "no"
7640 then
7641 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7642 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007643 QNX*)
7644 # -Wl,-E causes the symbols to be added to the dynamic
7645 # symbol table so that they can be found when a module
7646 # is loaded. -N 2048K causes the stack size to be set
7647 # to 2048 kilobytes so that the stack doesn't overflow
7648 # when running test_compile.py.
7649 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007650 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7653$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007654
Michael W. Hudson54241132001-12-07 15:38:26 +00007655
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007656
Matthias Kloseb9621712010-04-24 17:59:49 +00007657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7658$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007659if test ! "$LIBRARY" = "$LDLIBRARY"
7660then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007661 case $ac_sys_system in
7662 CYGWIN*)
7663 # Cygwin needs CCSHARED when building extension DLLs
7664 # but not when building the interpreter DLL.
7665 CFLAGSFORSHARED='';;
7666 *)
7667 CFLAGSFORSHARED='$(CCSHARED)'
7668 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7671$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007672
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007673# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7674# library (with --enable-shared).
7675# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007676# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7677# if it is not required, since it creates a dependency of the shared library
7678# to LIBS. This, in turn, means that applications linking the shared libpython
7679# don't need to link LIBS explicitly. The default should be only changed
7680# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007681
Matthias Kloseb9621712010-04-24 17:59:49 +00007682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7683$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007684case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007685 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007686 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007687esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7689$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007690
7691
Guido van Rossum627b2d71993-12-24 10:39:16 +00007692# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7694$as_echo_n "checking for dlopen in -ldl... " >&6; }
7695if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7696 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007697else
Martin v. Löwis11437992002-04-12 09:54:03 +00007698 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007699LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007701/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007703/* Override any GCC internal prototype to avoid an error.
7704 Use char because int might match the return type of a GCC
7705 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007706#ifdef __cplusplus
7707extern "C"
7708#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007709char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007710int
7711main ()
7712{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007713return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007714 ;
7715 return 0;
7716}
7717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007718if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007719 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007720else
Matthias Kloseb9621712010-04-24 17:59:49 +00007721 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007723rm -f core conftest.err conftest.$ac_objext \
7724 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007725LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7728$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7729if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007730 cat >>confdefs.h <<_ACEOF
7731#define HAVE_LIBDL 1
7732_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007733
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007734 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007735
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007736fi
7737 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7739$as_echo_n "checking for shl_load in -ldld... " >&6; }
7740if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7741 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007742else
Martin v. Löwis11437992002-04-12 09:54:03 +00007743 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007744LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007747
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007748/* Override any GCC internal prototype to avoid an error.
7749 Use char because int might match the return type of a GCC
7750 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007751#ifdef __cplusplus
7752extern "C"
7753#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007754char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007755int
7756main ()
7757{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007758return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007759 ;
7760 return 0;
7761}
7762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007763if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007764 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007765else
Matthias Kloseb9621712010-04-24 17:59:49 +00007766 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007768rm -f core conftest.err conftest.$ac_objext \
7769 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007770LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7773$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7774if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007775 cat >>confdefs.h <<_ACEOF
7776#define HAVE_LIBDLD 1
7777_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007778
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007779 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007780
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007781fi
7782 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007783
Georg Brandlb1441c72009-01-03 22:33:39 +00007784# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007785if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7787$as_echo_n "checking for library containing sem_init... " >&6; }
7788if test "${ac_cv_search_sem_init+set}" = set; then :
7789 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007790else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007791 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007793/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007795/* Override any GCC internal prototype to avoid an error.
7796 Use char because int might match the return type of a GCC
7797 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007798#ifdef __cplusplus
7799extern "C"
7800#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007801char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007802int
7803main ()
7804{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007805return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007806 ;
7807 return 0;
7808}
7809_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007810for ac_lib in '' pthread rt posix4; do
7811 if test -z "$ac_lib"; then
7812 ac_res="none required"
7813 else
7814 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007815 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007816 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007817 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007820rm -f core conftest.err conftest.$ac_objext \
7821 conftest$ac_exeext
7822 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007823 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007825done
Matthias Kloseb9621712010-04-24 17:59:49 +00007826if test "${ac_cv_search_sem_init+set}" = set; then :
7827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007828else
7829 ac_cv_search_sem_init=no
7830fi
7831rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007832LIBS=$ac_func_search_save_LIBS
7833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7835$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007836ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007837if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007838 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007839
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007840fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007841 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007842 # posix4 on Solaris 2.6
7843 # pthread (first!) on Linux
7844fi
7845
Martin v. Löwis19d17342003-06-14 21:03:05 +00007846# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7848$as_echo_n "checking for textdomain in -lintl... " >&6; }
7849if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
7850 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007851else
7852 ac_check_lib_save_LIBS=$LIBS
7853LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007855/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007857/* Override any GCC internal prototype to avoid an error.
7858 Use char because int might match the return type of a GCC
7859 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007860#ifdef __cplusplus
7861extern "C"
7862#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007863char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007864int
7865main ()
7866{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007868 ;
7869 return 0;
7870}
7871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007872if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007873 ac_cv_lib_intl_textdomain=yes
7874else
Matthias Kloseb9621712010-04-24 17:59:49 +00007875 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007877rm -f core conftest.err conftest.$ac_objext \
7878 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007879LIBS=$ac_check_lib_save_LIBS
7880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7882$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
7883if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007884
Matthias Kloseb9621712010-04-24 17:59:49 +00007885$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007886
Brett Cannonc6d936e2009-06-07 20:09:53 +00007887 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007888fi
7889
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007890
7891# checks for system dependent C++ extensions support
7892case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007893 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7894$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007896/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007897#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007898int
7899main ()
7900{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007901loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007902 ;
7903 return 0;
7904}
7905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007906if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007907
Matthias Kloseb9621712010-04-24 17:59:49 +00007908$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007909
Matthias Kloseb9621712010-04-24 17:59:49 +00007910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7911$as_echo "yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007912else
Matthias Kloseb9621712010-04-24 17:59:49 +00007913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7914$as_echo "no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007916rm -f core conftest.err conftest.$ac_objext \
7917 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007918 *) ;;
7919esac
7920
Guido van Rossum70c7f481998-03-26 18:44:10 +00007921# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7923$as_echo_n "checking for t_open in -lnsl... " >&6; }
7924if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
7925 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007926else
Martin v. Löwis11437992002-04-12 09:54:03 +00007927 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007928LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007931
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007932/* Override any GCC internal prototype to avoid an error.
7933 Use char because int might match the return type of a GCC
7934 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007935#ifdef __cplusplus
7936extern "C"
7937#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007938char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007939int
7940main ()
7941{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007942return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007943 ;
7944 return 0;
7945}
7946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007947if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007948 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007949else
Matthias Kloseb9621712010-04-24 17:59:49 +00007950 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007952rm -f core conftest.err conftest.$ac_objext \
7953 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007954LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007955fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
7957$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
7958if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007959 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007960fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00007961 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00007962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7963$as_echo_n "checking for socket in -lsocket... " >&6; }
7964if test "${ac_cv_lib_socket_socket+set}" = set; then :
7965 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007966else
Martin v. Löwis11437992002-04-12 09:54:03 +00007967 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007968LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007971
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007972/* Override any GCC internal prototype to avoid an error.
7973 Use char because int might match the return type of a GCC
7974 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007975#ifdef __cplusplus
7976extern "C"
7977#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007978char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007979int
7980main ()
7981{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007982return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007983 ;
7984 return 0;
7985}
7986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007987if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007988 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007989else
Matthias Kloseb9621712010-04-24 17:59:49 +00007990 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007992rm -f core conftest.err conftest.$ac_objext \
7993 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007994LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
7997$as_echo "$ac_cv_lib_socket_socket" >&6; }
7998if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00007999 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008000fi
8001 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008002
Matthias Kloseb9621712010-04-24 17:59:49 +00008003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8004$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008006# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008007if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008008 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8010$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008011LIBS="$withval $LIBS"
8012
8013else
Matthias Kloseb9621712010-04-24 17:59:49 +00008014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8015$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008016fi
8017
Guido van Rossum7f43da71994-08-01 12:15:30 +00008018
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008019if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008020 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8021set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8023$as_echo_n "checking for $ac_word... " >&6; }
8024if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8025 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008026else
8027 case $PKG_CONFIG in
8028 [\\/]* | ?:[\\/]*)
8029 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8030 ;;
8031 *)
8032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8033for as_dir in $PATH
8034do
8035 IFS=$as_save_IFS
8036 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008037 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008038 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8039 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008040 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008041 break 2
8042 fi
8043done
Matthias Kloseb9621712010-04-24 17:59:49 +00008044 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008045IFS=$as_save_IFS
8046
8047 ;;
8048esac
8049fi
8050PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8051if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8053$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008054else
Matthias Kloseb9621712010-04-24 17:59:49 +00008055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8056$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008057fi
8058
8059
8060fi
8061if test -z "$ac_cv_path_PKG_CONFIG"; then
8062 ac_pt_PKG_CONFIG=$PKG_CONFIG
8063 # Extract the first word of "pkg-config", so it can be a program name with args.
8064set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8066$as_echo_n "checking for $ac_word... " >&6; }
8067if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8068 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008069else
8070 case $ac_pt_PKG_CONFIG in
8071 [\\/]* | ?:[\\/]*)
8072 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8073 ;;
8074 *)
8075 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8076for as_dir in $PATH
8077do
8078 IFS=$as_save_IFS
8079 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008080 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008081 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8082 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008083 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008084 break 2
8085 fi
8086done
Matthias Kloseb9621712010-04-24 17:59:49 +00008087 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008088IFS=$as_save_IFS
8089
8090 ;;
8091esac
8092fi
8093ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8094if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8096$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008097else
Matthias Kloseb9621712010-04-24 17:59:49 +00008098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8099$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008100fi
8101
8102 if test "x$ac_pt_PKG_CONFIG" = x; then
8103 PKG_CONFIG=""
8104 else
8105 case $cross_compiling:$ac_tool_warned in
8106yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008107{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8108$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008109ac_tool_warned=yes ;;
8110esac
8111 PKG_CONFIG=$ac_pt_PKG_CONFIG
8112 fi
8113else
8114 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8115fi
8116
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008117
8118# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8120$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008121
8122# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008123if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008124 withval=$with_system_expat;
8125fi
8126
8127
Matthias Kloseb9621712010-04-24 17:59:49 +00008128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8129$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008130
8131# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8133$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008134
8135# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008136if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008137 withval=$with_system_ffi;
8138fi
8139
8140
8141if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008142 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8143else
8144 LIBFFI_INCLUDEDIR=""
8145fi
8146
8147
Matthias Kloseb9621712010-04-24 17:59:49 +00008148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8149$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008150
Matthias Klose55708cc2009-04-30 08:06:49 +00008151# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8153$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008154
8155# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008156if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008157 withval=$with_dbmliborder;
8158if test x$with_dbmliborder = xyes
8159then
Matthias Kloseb9621712010-04-24 17:59:49 +00008160as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008161else
8162 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8163 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8164 then
Matthias Kloseb9621712010-04-24 17:59:49 +00008165 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008166 fi
8167 done
8168fi
8169fi
8170
Matthias Kloseb9621712010-04-24 17:59:49 +00008171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8172$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008173
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008174# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008175
8176
Matthias Kloseb9621712010-04-24 17:59:49 +00008177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8178$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008179
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008180# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008181if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008182 withval=$with_signal_module;
8183fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008184
8185
8186if test -z "$with_signal_module"
8187then with_signal_module="yes"
8188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8190$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008191
8192if test "${with_signal_module}" = "yes"; then
8193 USE_SIGNAL_MODULE=""
8194 SIGNAL_OBJS=""
8195else
8196 USE_SIGNAL_MODULE="#"
8197 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8198fi
8199
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008200# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008201
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008202USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008203
Matthias Kloseb9621712010-04-24 17:59:49 +00008204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8205$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008206
Guido van Rossumec2f0731997-01-22 20:54:01 +00008207
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008208# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008209if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008210 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8212$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008213LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008214if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008215 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008216fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008217else
Matthias Kloseb9621712010-04-24 17:59:49 +00008218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8219$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008220fi
8221
Martin v. Löwis11437992002-04-12 09:54:03 +00008222
8223# Templates for things AC_DEFINEd more than once.
8224# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008225
8226
Martin v. Löwis11437992002-04-12 09:54:03 +00008227
8228
Matthias Kloseb9621712010-04-24 17:59:49 +00008229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8230$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008231
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008232# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008233if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008234 withval=$with_threads;
8235fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008236
8237
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008238# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008239
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008240# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008241if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008242 withval=$with_thread; with_threads=$with_thread
8243fi
8244
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008245
8246if test -z "$with_threads"
8247then with_threads="yes"
8248fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8250$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008251
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008252
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008253if test "$with_threads" = "no"
8254then
8255 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008256elif test "$ac_cv_pthread_is_default" = yes
8257then
Matthias Kloseb9621712010-04-24 17:59:49 +00008258 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008259
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008260 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008261 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008262
8263 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008264 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008265elif test "$ac_cv_kpthread" = "yes"
8266then
8267 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008268 if test "$ac_cv_cxx_thread" = "yes"; then
8269 CXX="$CXX -Kpthread"
8270 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008271 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008272
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008273 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008274 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008275elif test "$ac_cv_kthread" = "yes"
8276then
8277 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008278 if test "$ac_cv_cxx_thread" = "yes"; then
8279 CXX="$CXX -Kthread"
8280 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008281 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008282
8283 posix_threads=yes
8284 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008285elif test "$ac_cv_pthread" = "yes"
8286then
8287 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008288 if test "$ac_cv_cxx_thread" = "yes"; then
8289 CXX="$CXX -pthread"
8290 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008291 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008292
8293 posix_threads=yes
8294 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008295else
8296 if test ! -z "$with_threads" -a -d "$with_threads"
8297 then LDFLAGS="$LDFLAGS -L$with_threads"
8298 fi
8299 if test ! -z "$withval" -a -d "$withval"
8300 then LDFLAGS="$LDFLAGS -L$withval"
8301 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008302
8303 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008304 # define _POSIX_THREADS in unistd.h. Some apparently don't
8305 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8307$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008309/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008310
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008311#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008312#ifdef _POSIX_THREADS
8313yes
8314#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008315
8316_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008317if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008318 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008319 unistd_defines_pthreads=yes
8320else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008321 unistd_defines_pthreads=no
8322fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008323rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008324
Matthias Kloseb9621712010-04-24 17:59:49 +00008325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8326$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008327
Matthias Kloseb9621712010-04-24 17:59:49 +00008328 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008329
Matthias Kloseb9621712010-04-24 17:59:49 +00008330 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8331if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8332 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008333
Matthias Kloseb9621712010-04-24 17:59:49 +00008334 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008335
Martin v. Löwis11437992002-04-12 09:54:03 +00008336
Matthias Kloseb9621712010-04-24 17:59:49 +00008337$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008338
8339 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008340 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008341else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008342
Matthias Kloseb9621712010-04-24 17:59:49 +00008343 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8344if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8345 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008346
Matthias Kloseb9621712010-04-24 17:59:49 +00008347 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008348
Martin v. Löwis11437992002-04-12 09:54:03 +00008349
Matthias Kloseb9621712010-04-24 17:59:49 +00008350$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008351
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008352 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008353else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008354
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008355 # Just looking for pthread_create in libpthread is not enough:
8356 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8357 # So we really have to include pthread.h, and then link.
8358 _libs=$LIBS
8359 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8361$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008363/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008364#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008365
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008366void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008367int
8368main ()
8369{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008370
8371pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008372 ;
8373 return 0;
8374}
8375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008376if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008377
Matthias Kloseb9621712010-04-24 17:59:49 +00008378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8379$as_echo "yes" >&6; }
8380 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008381
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008382 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008383 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008384else
Martin v. Löwis11437992002-04-12 09:54:03 +00008385
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008386 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008387 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8388if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8389 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008390
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008391 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008392 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008393else
Guido van Rossumad678af1998-10-02 14:42:15 +00008394
Matthias Kloseb9621712010-04-24 17:59:49 +00008395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8396$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8397if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8398 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008399else
Martin v. Löwis11437992002-04-12 09:54:03 +00008400 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008401LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008403/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008404
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008405/* Override any GCC internal prototype to avoid an error.
8406 Use char because int might match the return type of a GCC
8407 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008408#ifdef __cplusplus
8409extern "C"
8410#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008411char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008412int
8413main ()
8414{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008415return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008416 ;
8417 return 0;
8418}
8419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008420if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008421 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008422else
Matthias Kloseb9621712010-04-24 17:59:49 +00008423 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008424fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008425rm -f core conftest.err conftest.$ac_objext \
8426 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008427LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008428fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8430$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8431if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8432 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008433
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008434 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008435 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008436 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008437else
Greg Steinadf63d62000-07-05 10:38:09 +00008438
Matthias Kloseb9621712010-04-24 17:59:49 +00008439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8440$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8441if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8442 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008443else
Martin v. Löwis11437992002-04-12 09:54:03 +00008444 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008445LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008447/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008448
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008449/* Override any GCC internal prototype to avoid an error.
8450 Use char because int might match the return type of a GCC
8451 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008452#ifdef __cplusplus
8453extern "C"
8454#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008455char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008456int
8457main ()
8458{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008459return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008460 ;
8461 return 0;
8462}
8463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008464if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008465 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008466else
Matthias Kloseb9621712010-04-24 17:59:49 +00008467 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008468fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008469rm -f core conftest.err conftest.$ac_objext \
8470 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008471LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8474$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8475if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8476 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008477
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008478 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008479 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008480 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008481else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008482
Matthias Kloseb9621712010-04-24 17:59:49 +00008483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8484$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8485if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8486 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008487else
Martin v. Löwis11437992002-04-12 09:54:03 +00008488 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008489LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008491/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008492
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008493/* Override any GCC internal prototype to avoid an error.
8494 Use char because int might match the return type of a GCC
8495 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008496#ifdef __cplusplus
8497extern "C"
8498#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008499char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008500int
8501main ()
8502{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008504 ;
8505 return 0;
8506}
8507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008508if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008509 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008510else
Matthias Kloseb9621712010-04-24 17:59:49 +00008511 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008513rm -f core conftest.err conftest.$ac_objext \
8514 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008515LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008516fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8518$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8519if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8520 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008521
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008522 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008523 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008524 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008525else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008526
Matthias Kloseb9621712010-04-24 17:59:49 +00008527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8528$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8529if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8530 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008531else
Martin v. Löwis11437992002-04-12 09:54:03 +00008532 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008533LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008535/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008536
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008537/* Override any GCC internal prototype to avoid an error.
8538 Use char because int might match the return type of a GCC
8539 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008540#ifdef __cplusplus
8541extern "C"
8542#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008543char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008544int
8545main ()
8546{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008547return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008548 ;
8549 return 0;
8550}
8551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008552if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008553 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008554else
Matthias Kloseb9621712010-04-24 17:59:49 +00008555 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008556fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008557rm -f core conftest.err conftest.$ac_objext \
8558 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008559LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008560fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8562$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8563if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8564 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008565
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008566 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008567 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008568 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008569else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008570
Martin v. Löwis130fb172001-07-19 11:00:41 +00008571 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008572fi
8573
Guido van Rossum627b2d71993-12-24 10:39:16 +00008574
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008575fi
8576
Guido van Rossum0be3e491997-05-22 20:33:33 +00008577fi
8578
Guido van Rossum49545951997-12-02 19:28:29 +00008579fi
8580
Guido van Rossumb93a8621998-05-07 13:27:32 +00008581fi
8582
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008584rm -f core conftest.err conftest.$ac_objext \
8585 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008586fi
8587
Martin v. Löwis11437992002-04-12 09:54:03 +00008588
8589fi
8590
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008591
Michael W. Hudson54241132001-12-07 15:38:26 +00008592
Matthias Kloseb9621712010-04-24 17:59:49 +00008593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8594$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8595if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8596 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008597else
Martin v. Löwis11437992002-04-12 09:54:03 +00008598 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008599LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008601/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008603/* Override any GCC internal prototype to avoid an error.
8604 Use char because int might match the return type of a GCC
8605 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008606#ifdef __cplusplus
8607extern "C"
8608#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008609char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008610int
8611main ()
8612{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008613return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008614 ;
8615 return 0;
8616}
8617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008618if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008619 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008620else
Matthias Kloseb9621712010-04-24 17:59:49 +00008621 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008622fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008623rm -f core conftest.err conftest.$ac_objext \
8624 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008625LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008626fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8628$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8629if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8630 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008631
Martin v. Löwis130fb172001-07-19 11:00:41 +00008632 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008633 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008634 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008635fi
8636
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008637
Neal Norwitza978ab02002-11-02 16:58:05 +00008638 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8640$as_echo_n "checking for thr_create in -lthread... " >&6; }
8641if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8642 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008643else
Martin v. Löwis11437992002-04-12 09:54:03 +00008644 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008645LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008648
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008649/* Override any GCC internal prototype to avoid an error.
8650 Use char because int might match the return type of a GCC
8651 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008652#ifdef __cplusplus
8653extern "C"
8654#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008655char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008656int
8657main ()
8658{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008659return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008660 ;
8661 return 0;
8662}
8663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008664if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008665 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008666else
Matthias Kloseb9621712010-04-24 17:59:49 +00008667 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008669rm -f core conftest.err conftest.$ac_objext \
8670 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008671LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8674$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8675if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8676 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008677
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008678 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008679 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008680 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008681fi
8682
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008683 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008684
Martin v. Löwis130fb172001-07-19 11:00:41 +00008685 if test "$USE_THREAD_MODULE" != "#"
8686 then
8687 # If the above checks didn't disable threads, (at least) OSF1
8688 # needs this '-threads' argument during linking.
8689 case $ac_sys_system in
8690 OSF1) LDLAST=-threads;;
8691 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008692 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008693fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008694
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008695if test "$posix_threads" = "yes"; then
8696 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008697
Matthias Kloseb9621712010-04-24 17:59:49 +00008698$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008699
8700 fi
8701
8702 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8703 case $ac_sys_system/$ac_sys_release in
8704 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008705$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008706
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008707 ;;
8708 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008709$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008710
8711 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008712 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008713$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008714
8715 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008716 esac
8717
Matthias Kloseb9621712010-04-24 17:59:49 +00008718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8719$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8720 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8721 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008722else
Matthias Kloseb9621712010-04-24 17:59:49 +00008723 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008724 ac_cv_pthread_system_supported=no
8725else
Matthias Kloseb9621712010-04-24 17:59:49 +00008726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008727/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008728#include <pthread.h>
8729 void *foo(void *parm) {
8730 return NULL;
8731 }
8732 main() {
8733 pthread_attr_t attr;
8734 pthread_t id;
8735 if (pthread_attr_init(&attr)) exit(-1);
8736 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8737 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8738 exit(0);
8739 }
8740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008741if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008742 ac_cv_pthread_system_supported=yes
8743else
Matthias Kloseb9621712010-04-24 17:59:49 +00008744 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008746rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8747 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008748fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008750
Guido van Rossum627b2d71993-12-24 10:39:16 +00008751fi
8752
Matthias Kloseb9621712010-04-24 17:59:49 +00008753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8754$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008755 if test "$ac_cv_pthread_system_supported" = "yes"; then
8756
Matthias Kloseb9621712010-04-24 17:59:49 +00008757$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008758
8759 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 for ac_func in pthread_sigmask
8761do :
8762 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8763if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008764 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008765#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008766_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008767 case $ac_sys_system in
8768 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008769
Matthias Kloseb9621712010-04-24 17:59:49 +00008770$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008771
8772 ;;
8773 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008774fi
8775done
8776
8777fi
8778
8779
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008780# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008781
Matthias Kloseb9621712010-04-24 17:59:49 +00008782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8783$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008784# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008785if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008786 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008787 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8789$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008790 ipv6=no
8791 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008792 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8793$as_echo "yes" >&6; }
8794 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008795
8796 ipv6=yes
8797 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008798 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008799else
Martin v. Löwis11437992002-04-12 09:54:03 +00008800
Matthias Kloseb9621712010-04-24 17:59:49 +00008801 if test "$cross_compiling" = yes; then :
8802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8803$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008804 ipv6=no
8805
8806else
Matthias Kloseb9621712010-04-24 17:59:49 +00008807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008808/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008809 /* AF_INET6 available check */
8810#include <sys/types.h>
8811#include <sys/socket.h>
8812main()
8813{
8814 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8815 exit(1);
8816 else
8817 exit(0);
8818}
8819
Martin v. Löwis11437992002-04-12 09:54:03 +00008820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008821if ac_fn_c_try_run "$LINENO"; then :
8822 { $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
8825else
Matthias Kloseb9621712010-04-24 17:59:49 +00008826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8827$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008828 ipv6=no
8829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008830rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8831 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008832fi
8833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008834
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008835if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8837$as_echo_n "checking if RFC2553 API is available... " >&6; }
8838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008839/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008840#include <sys/types.h>
8841#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008842int
8843main ()
8844{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008845struct sockaddr_in6 x;
8846x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008847 ;
8848 return 0;
8849}
8850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008851if ac_fn_c_try_compile "$LINENO"; then :
8852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8853$as_echo "yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008854 ipv6=yes
8855else
Matthias Kloseb9621712010-04-24 17:59:49 +00008856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8857$as_echo "no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008858 ipv6=no
8859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008861fi
8862
8863if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008864 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008865
8866fi
8867
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008868fi
8869
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008870
8871ipv6type=unknown
8872ipv6lib=none
8873ipv6trylibc=no
8874
8875if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8877$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008878 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8879 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008880 case $i in
8881 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008883/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008884
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008885#include <netinet/in.h>
8886#ifdef IPV6_INRIA_VERSION
8887yes
8888#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008889_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008890if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008891 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008892 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008893fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008894rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008895
8896 ;;
8897 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008899/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008900
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008901#include <netinet/in.h>
8902#ifdef __KAME__
8903yes
8904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008905_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008908 ipv6type=$i;
8909 ipv6lib=inet6
8910 ipv6libdir=/usr/local/v6/lib
8911 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008912fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008913rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008914
8915 ;;
8916 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008918/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008919
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008920#include <features.h>
8921#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8922yes
8923#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008924_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008925if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008926 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008927 ipv6type=$i;
8928 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008929fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008930rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008931
8932 ;;
8933 linux-inet6)
8934 if test -d /usr/inet6; then
8935 ipv6type=$i
8936 ipv6lib=inet6
8937 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008938 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008939 fi
8940 ;;
8941 solaris)
8942 if test -f /etc/netconfig; then
8943 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
8944 ipv6type=$i
8945 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008946 fi
8947 fi
8948 ;;
8949 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00008950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008951/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008952
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008953#include <sys/param.h>
8954#ifdef _TOSHIBA_INET6
8955yes
8956#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008957_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008958if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008960 ipv6type=$i;
8961 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008962 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008963fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008964rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008965
8966 ;;
8967 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00008968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008969/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008970
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008971#include </usr/local/v6/include/sys/v6config.h>
8972#ifdef __V6D__
8973yes
8974#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008975_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008976if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008977 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008978 ipv6type=$i;
8979 ipv6lib=v6;
8980 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00008981 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008982fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008983rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008984
8985 ;;
8986 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00008987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008988/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008989
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008990#include <sys/param.h>
8991#ifdef _ZETA_MINAMI_INET6
8992yes
8993#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008994_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008996 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008997 ipv6type=$i;
8998 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008999 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009000fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009001rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009002
9003 ;;
9004 esac
9005 if test "$ipv6type" != "unknown"; then
9006 break
9007 fi
9008 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9010$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009011fi
9012
9013if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9014 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9015 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9016 echo "using lib$ipv6lib"
9017 else
9018 if test $ipv6trylibc = "yes"; then
9019 echo "using libc"
9020 else
9021 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9022 echo "You need to fetch lib$ipv6lib.a from appropriate"
9023 echo 'ipv6 kit and compile beforehand.'
9024 exit 1
9025 fi
9026 fi
9027fi
9028
Matthias Kloseb9621712010-04-24 17:59:49 +00009029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9030$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009032/* end confdefs.h. */
9033#include <Carbon/Carbon.h>
9034int
9035main ()
9036{
9037FSIORefNum fRef = 0
9038 ;
9039 return 0;
9040}
9041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009042if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009043
Matthias Kloseb9621712010-04-24 17:59:49 +00009044$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009045
Matthias Kloseb9621712010-04-24 17:59:49 +00009046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9047$as_echo "yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009048else
Matthias Kloseb9621712010-04-24 17:59:49 +00009049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9050$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009051
9052fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9054
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009055# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9057$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009059# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009060if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009061 withval=$with_doc_strings;
9062fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009063
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009064
9065if test -z "$with_doc_strings"
9066then with_doc_strings="yes"
9067fi
9068if test "$with_doc_strings" != "no"
9069then
9070
Matthias Kloseb9621712010-04-24 17:59:49 +00009071$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009072
9073fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9075$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009076
Neil Schemenauera35c6882001-02-27 04:45:05 +00009077# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9079$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009080
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009081# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009082if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009083 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009084if test "$withval" != no
9085then
9086
Matthias Kloseb9621712010-04-24 17:59:49 +00009087$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009088
Matthias Kloseb9621712010-04-24 17:59:49 +00009089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9090$as_echo "yes" >&6; }
9091else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9092$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009093fi
9094else
Matthias Kloseb9621712010-04-24 17:59:49 +00009095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9096$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009097fi
9098
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009099
9100# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9102$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009104# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009105if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009106 withval=$with_pymalloc;
9107fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009108
Neil Schemenauera35c6882001-02-27 04:45:05 +00009109
Neil Schemenauer16c22972002-03-22 15:34:49 +00009110if test -z "$with_pymalloc"
9111then with_pymalloc="yes"
9112fi
9113if test "$with_pymalloc" != "no"
9114then
Martin v. Löwis11437992002-04-12 09:54:03 +00009115
Matthias Kloseb9621712010-04-24 17:59:49 +00009116$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009117
9118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9120$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009121
Benjamin Peterson05159c42009-12-03 03:01:27 +00009122# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9124$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009125
9126# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009127if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009128 withval=$with_valgrind;
9129else
9130 with_valgrind=no
9131fi
9132
Matthias Kloseb9621712010-04-24 17:59:49 +00009133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9134$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009135if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009136 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9137if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009138
Matthias Kloseb9621712010-04-24 17:59:49 +00009139$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009140
9141else
Matthias Kloseb9621712010-04-24 17:59:49 +00009142 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009143
9144fi
9145
9146
9147fi
9148
Barry Warsawef82cd72000-06-30 16:21:01 +00009149# Check for --with-wctype-functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9151$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009152
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009153# Check whether --with-wctype-functions was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009154if test "${with_wctype_functions+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009155 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009156if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009157then
9158
Matthias Kloseb9621712010-04-24 17:59:49 +00009159$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009160
Matthias Kloseb9621712010-04-24 17:59:49 +00009161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9162$as_echo "yes" >&6; }
9163else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9164$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009165fi
9166else
Matthias Kloseb9621712010-04-24 17:59:49 +00009167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9168$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009169fi
9170
Barry Warsawef82cd72000-06-30 16:21:01 +00009171
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009172# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009173
Guido van Rossum98935bf2001-09-05 19:13:16 +00009174DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009175
Guido van Rossume97ee181999-12-20 21:27:22 +00009176# the dlopen() function means we might want to use dynload_shlib.o. some
9177# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009178for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009179do :
9180 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9181if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009182 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009183#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009184_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009185
Guido van Rossume97ee181999-12-20 21:27:22 +00009186fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009187done
Guido van Rossume97ee181999-12-20 21:27:22 +00009188
Michael W. Hudson54241132001-12-07 15:38:26 +00009189
Guido van Rossume97ee181999-12-20 21:27:22 +00009190# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9191# loading of modules.
9192
Matthias Kloseb9621712010-04-24 17:59:49 +00009193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9194$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009195if test -z "$DYNLOADFILE"
9196then
9197 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009198 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9199 if test "$ac_cv_func_dlopen" = yes
9200 then DYNLOADFILE="dynload_shlib.o"
9201 else DYNLOADFILE="dynload_aix.o"
9202 fi
9203 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009204 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009205 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9206 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009207 *)
9208 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9209 # out any dynamic loading
9210 if test "$ac_cv_func_dlopen" = yes
9211 then DYNLOADFILE="dynload_shlib.o"
9212 else DYNLOADFILE="dynload_stub.o"
9213 fi
9214 ;;
9215 esac
9216fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9218$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009219if test "$DYNLOADFILE" != "dynload_stub.o"
9220then
Martin v. Löwis11437992002-04-12 09:54:03 +00009221
Matthias Kloseb9621712010-04-24 17:59:49 +00009222$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009223
9224fi
9225
Neil Schemenauer4e425612001-06-19 15:44:15 +00009226# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9227
Michael W. Hudson54241132001-12-07 15:38:26 +00009228
Matthias Kloseb9621712010-04-24 17:59:49 +00009229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9230$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009231if test -z "$MACHDEP_OBJS"
9232then
Jack Jansene578a632001-08-15 01:27:14 +00009233 MACHDEP_OBJS=$extra_machdep_objs
9234else
9235 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009236fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9238$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009239
Guido van Rossum627b2d71993-12-24 10:39:16 +00009240# checks for library functions
Martin v. Löwis823725e2008-03-24 13:39:54 +00009241for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9242 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009243 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009244 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009245 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009246 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009247 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009248 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9249 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009250 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
9251 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009252 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009253 truncate uname unsetenv utimes waitpid wait3 wait4 \
9254 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009255do :
9256 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9257ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9258eval as_val=\$$as_ac_var
9259 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009260 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009261#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009262_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009263
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009264fi
9265done
9266
Michael W. Hudson54241132001-12-07 15:38:26 +00009267
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009268# For some functions, having a definition is not sufficient, since
9269# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9271$as_echo_n "checking for chroot... " >&6; }
9272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009273/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009274#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009275int
9276main ()
9277{
9278void *x=chroot
9279 ;
9280 return 0;
9281}
9282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009283if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009284
Matthias Kloseb9621712010-04-24 17:59:49 +00009285$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009286
Matthias Kloseb9621712010-04-24 17:59:49 +00009287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9288$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009289else
Matthias Kloseb9621712010-04-24 17:59:49 +00009290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9291$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009292
9293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9296$as_echo_n "checking for link... " >&6; }
9297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009298/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009299#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009300int
9301main ()
9302{
9303void *x=link
9304 ;
9305 return 0;
9306}
9307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009308if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009309
Matthias Kloseb9621712010-04-24 17:59:49 +00009310$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009311
Matthias Kloseb9621712010-04-24 17:59:49 +00009312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9313$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009314else
Matthias Kloseb9621712010-04-24 17:59:49 +00009315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9316$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009317
9318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9321$as_echo_n "checking for symlink... " >&6; }
9322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009323/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009324#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009325int
9326main ()
9327{
9328void *x=symlink
9329 ;
9330 return 0;
9331}
9332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009333if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009334
Matthias Kloseb9621712010-04-24 17:59:49 +00009335$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009336
Matthias Kloseb9621712010-04-24 17:59:49 +00009337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9338$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009339else
Matthias Kloseb9621712010-04-24 17:59:49 +00009340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9341$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009342
9343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9346$as_echo_n "checking for fchdir... " >&6; }
9347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009348/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009349#include <unistd.h>
9350int
9351main ()
9352{
9353void *x=fchdir
9354 ;
9355 return 0;
9356}
9357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009358if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009359
Matthias Kloseb9621712010-04-24 17:59:49 +00009360$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009361
Matthias Kloseb9621712010-04-24 17:59:49 +00009362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9363$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009364else
Matthias Kloseb9621712010-04-24 17:59:49 +00009365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9366$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009367
9368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9371$as_echo_n "checking for fsync... " >&6; }
9372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009373/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009374#include <unistd.h>
9375int
9376main ()
9377{
9378void *x=fsync
9379 ;
9380 return 0;
9381}
9382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009383if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009384
Matthias Kloseb9621712010-04-24 17:59:49 +00009385$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009386
Matthias Kloseb9621712010-04-24 17:59:49 +00009387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9388$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009389else
Matthias Kloseb9621712010-04-24 17:59:49 +00009390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9391$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009392
9393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9396$as_echo_n "checking for fdatasync... " >&6; }
9397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009398/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009399#include <unistd.h>
9400int
9401main ()
9402{
9403void *x=fdatasync
9404 ;
9405 return 0;
9406}
9407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009408if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009409
Matthias Kloseb9621712010-04-24 17:59:49 +00009410$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009411
Matthias Kloseb9621712010-04-24 17:59:49 +00009412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9413$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009414else
Matthias Kloseb9621712010-04-24 17:59:49 +00009415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9416$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009417
9418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9421$as_echo_n "checking for epoll... " >&6; }
9422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009423/* end confdefs.h. */
9424#include <sys/epoll.h>
9425int
9426main ()
9427{
9428void *x=epoll_create
9429 ;
9430 return 0;
9431}
9432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009433if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009434
Matthias Kloseb9621712010-04-24 17:59:49 +00009435$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009436
Matthias Kloseb9621712010-04-24 17:59:49 +00009437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9438$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009439else
Matthias Kloseb9621712010-04-24 17:59:49 +00009440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9441$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009442
9443fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9446$as_echo_n "checking for kqueue... " >&6; }
9447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009448/* end confdefs.h. */
9449
9450#include <sys/types.h>
9451#include <sys/event.h>
9452
9453int
9454main ()
9455{
9456int x=kqueue()
9457 ;
9458 return 0;
9459}
9460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009461if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009462
Matthias Kloseb9621712010-04-24 17:59:49 +00009463$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009464
Matthias Kloseb9621712010-04-24 17:59:49 +00009465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9466$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009467else
Matthias Kloseb9621712010-04-24 17:59:49 +00009468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9469$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009470
9471fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009473# On some systems (eg. FreeBSD 5), we would find a definition of the
9474# functions ctermid_r, setgroups in the library, but no prototype
9475# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9476# address to avoid compiler warnings and potential miscompilations
9477# because of the missing prototypes.
9478
Matthias Kloseb9621712010-04-24 17:59:49 +00009479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9480$as_echo_n "checking for ctermid_r... " >&6; }
9481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009482/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009483
9484#include "confdefs.h"
9485#include <stdio.h>
9486
Martin v. Löwisd5843682002-11-21 20:41:28 +00009487int
9488main ()
9489{
9490void* p = ctermid_r
9491 ;
9492 return 0;
9493}
9494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009495if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009496
Matthias Kloseb9621712010-04-24 17:59:49 +00009497$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009498
Matthias Kloseb9621712010-04-24 17:59:49 +00009499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9500$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009501else
Matthias Kloseb9621712010-04-24 17:59:49 +00009502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9503$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009504
9505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9507
Matthias Kloseb9621712010-04-24 17:59:49 +00009508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
9509$as_echo_n "checking for flock... " >&6; }
9510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009511/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009512
9513#include "confdefs.h"
9514#include <sys/file.h>
9515
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009516int
9517main ()
9518{
9519void* p = flock
9520 ;
9521 return 0;
9522}
9523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009524if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009525
Matthias Kloseb9621712010-04-24 17:59:49 +00009526$as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009527
Matthias Kloseb9621712010-04-24 17:59:49 +00009528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9529$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009530else
Matthias Kloseb9621712010-04-24 17:59:49 +00009531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9532$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009533
9534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9536
Matthias Kloseb9621712010-04-24 17:59:49 +00009537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9538$as_echo_n "checking for getpagesize... " >&6; }
9539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009540/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009541
9542#include "confdefs.h"
9543#include <unistd.h>
9544
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009545int
9546main ()
9547{
9548void* p = getpagesize
9549 ;
9550 return 0;
9551}
9552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009553if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009554
Matthias Kloseb9621712010-04-24 17:59:49 +00009555$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009556
Matthias Kloseb9621712010-04-24 17:59:49 +00009557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9558$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009559else
Matthias Kloseb9621712010-04-24 17:59:49 +00009560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9561$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009562
9563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009565
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009566for ac_prog in true
9567do
9568 # Extract the first word of "$ac_prog", so it can be a program name with args.
9569set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9571$as_echo_n "checking for $ac_word... " >&6; }
9572if test "${ac_cv_prog_TRUE+set}" = set; then :
9573 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009574else
9575 if test -n "$TRUE"; then
9576 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9577else
9578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9579for as_dir in $PATH
9580do
9581 IFS=$as_save_IFS
9582 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009583 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009584 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 +00009585 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009586 $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 +00009587 break 2
9588 fi
9589done
Matthias Kloseb9621712010-04-24 17:59:49 +00009590 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009591IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009592
9593fi
9594fi
9595TRUE=$ac_cv_prog_TRUE
9596if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9598$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009599else
Matthias Kloseb9621712010-04-24 17:59:49 +00009600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9601$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009602fi
9603
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009604
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009605 test -n "$TRUE" && break
9606done
9607test -n "$TRUE" || TRUE="/bin/true"
9608
9609
Matthias Kloseb9621712010-04-24 17:59:49 +00009610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9611$as_echo_n "checking for inet_aton in -lc... " >&6; }
9612if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
9613 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009614else
9615 ac_check_lib_save_LIBS=$LIBS
9616LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009618/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009620/* Override any GCC internal prototype to avoid an error.
9621 Use char because int might match the return type of a GCC
9622 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009623#ifdef __cplusplus
9624extern "C"
9625#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009626char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009627int
9628main ()
9629{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009630return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009631 ;
9632 return 0;
9633}
9634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009635if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009636 ac_cv_lib_c_inet_aton=yes
9637else
Matthias Kloseb9621712010-04-24 17:59:49 +00009638 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009640rm -f core conftest.err conftest.$ac_objext \
9641 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009642LIBS=$ac_check_lib_save_LIBS
9643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9645$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
9646if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009647 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009648else
Matthias Kloseb9621712010-04-24 17:59:49 +00009649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9650$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
9651if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
9652 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009653else
9654 ac_check_lib_save_LIBS=$LIBS
9655LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009657/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009658
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009659/* Override any GCC internal prototype to avoid an error.
9660 Use char because int might match the return type of a GCC
9661 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009662#ifdef __cplusplus
9663extern "C"
9664#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009665char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009666int
9667main ()
9668{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009669return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009670 ;
9671 return 0;
9672}
9673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009674if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009675 ac_cv_lib_resolv_inet_aton=yes
9676else
Matthias Kloseb9621712010-04-24 17:59:49 +00009677 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009679rm -f core conftest.err conftest.$ac_objext \
9680 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009681LIBS=$ac_check_lib_save_LIBS
9682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9684$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
9685if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009686 cat >>confdefs.h <<_ACEOF
9687#define HAVE_LIBRESOLV 1
9688_ACEOF
9689
9690 LIBS="-lresolv $LIBS"
9691
9692fi
9693
9694
9695fi
9696
9697
Christian Heimesd0764e22007-12-04 15:00:33 +00009698# On Tru64, chflags seems to be present, but calling it will
9699# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9701$as_echo_n "checking for chflags... " >&6; }
9702if test "${ac_cv_have_chflags+set}" = set; then :
9703 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009704else
Matthias Kloseb9621712010-04-24 17:59:49 +00009705 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009706 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009707else
Matthias Kloseb9621712010-04-24 17:59:49 +00009708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009709/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009710[
Christian Heimesd0764e22007-12-04 15:00:33 +00009711#include <sys/stat.h>
9712#include <unistd.h>
9713int main(int argc, char*argv[])
9714{
9715 if(chflags(argv[0], 0) != 0)
9716 return 1;
9717 return 0;
9718}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009719]
Christian Heimesd0764e22007-12-04 15:00:33 +00009720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009721if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009722 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009723else
Matthias Kloseb9621712010-04-24 17:59:49 +00009724 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009725fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009726rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9727 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009728fi
9729
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009730
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9733$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009734if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009735 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
9736if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009737 ac_cv_have_chflags="yes"
9738else
9739 ac_cv_have_chflags="no"
9740fi
9741
9742fi
9743if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009744
Matthias Kloseb9621712010-04-24 17:59:49 +00009745$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009746
9747fi
9748
Matthias Kloseb9621712010-04-24 17:59:49 +00009749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9750$as_echo_n "checking for lchflags... " >&6; }
9751if test "${ac_cv_have_lchflags+set}" = set; then :
9752 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009753else
Matthias Kloseb9621712010-04-24 17:59:49 +00009754 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009755 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009756else
Matthias Kloseb9621712010-04-24 17:59:49 +00009757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009758/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009759[
Christian Heimesd0764e22007-12-04 15:00:33 +00009760#include <sys/stat.h>
9761#include <unistd.h>
9762int main(int argc, char*argv[])
9763{
9764 if(lchflags(argv[0], 0) != 0)
9765 return 1;
9766 return 0;
9767}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009768]
Christian Heimesd0764e22007-12-04 15:00:33 +00009769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009770if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009771 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009772else
Matthias Kloseb9621712010-04-24 17:59:49 +00009773 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009775rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9776 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009777fi
9778
9779
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9782$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009783if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009784 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
9785if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009786 ac_cv_have_lchflags="yes"
9787else
9788 ac_cv_have_lchflags="no"
9789fi
9790
9791fi
9792if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009793
Matthias Kloseb9621712010-04-24 17:59:49 +00009794$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009795
9796fi
9797
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009798case $ac_sys_system/$ac_sys_release in
9799Darwin/*)
9800 _CUR_CFLAGS="${CFLAGS}"
9801 _CUR_LDFLAGS="${LDFLAGS}"
9802 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9803 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9804 ;;
9805esac
9806
Matthias Kloseb9621712010-04-24 17:59:49 +00009807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9808$as_echo_n "checking for inflateCopy in -lz... " >&6; }
9809if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
9810 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009811else
9812 ac_check_lib_save_LIBS=$LIBS
9813LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009815/* end confdefs.h. */
9816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009817/* Override any GCC internal prototype to avoid an error.
9818 Use char because int might match the return type of a GCC
9819 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009820#ifdef __cplusplus
9821extern "C"
9822#endif
9823char inflateCopy ();
9824int
9825main ()
9826{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009827return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009828 ;
9829 return 0;
9830}
9831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009832if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009833 ac_cv_lib_z_inflateCopy=yes
9834else
Matthias Kloseb9621712010-04-24 17:59:49 +00009835 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009837rm -f core conftest.err conftest.$ac_objext \
9838 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009839LIBS=$ac_check_lib_save_LIBS
9840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9842$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
9843if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009844
Matthias Kloseb9621712010-04-24 17:59:49 +00009845$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009846
9847fi
9848
9849
9850case $ac_sys_system/$ac_sys_release in
9851Darwin/*)
9852 CFLAGS="${_CUR_CFLAGS}"
9853 LDFLAGS="${_CUR_LDFLAGS}"
9854 ;;
9855esac
9856
Matthias Kloseb9621712010-04-24 17:59:49 +00009857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9858$as_echo_n "checking for hstrerror... " >&6; }
9859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009860/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009861
9862#include "confdefs.h"
9863#include <netdb.h>
9864
Martin v. Löwise9416172003-05-03 10:12:45 +00009865int
9866main ()
9867{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009868void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009869 ;
9870 return 0;
9871}
9872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009873if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009874
Matthias Kloseb9621712010-04-24 17:59:49 +00009875$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009876
Matthias Kloseb9621712010-04-24 17:59:49 +00009877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9878$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009879else
Matthias Kloseb9621712010-04-24 17:59:49 +00009880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9881$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009882
9883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009884rm -f core conftest.err conftest.$ac_objext \
9885 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009886
Matthias Kloseb9621712010-04-24 17:59:49 +00009887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9888$as_echo_n "checking for inet_aton... " >&6; }
9889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009890/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009891
9892#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +00009893#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009894#include <sys/socket.h>
9895#include <netinet/in.h>
9896#include <arpa/inet.h>
9897
Martin v. Löwise9416172003-05-03 10:12:45 +00009898int
9899main ()
9900{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009901void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009902 ;
9903 return 0;
9904}
9905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009906if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009907
Matthias Kloseb9621712010-04-24 17:59:49 +00009908$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009909
Matthias Kloseb9621712010-04-24 17:59:49 +00009910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9911$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009912else
Matthias Kloseb9621712010-04-24 17:59:49 +00009913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9914$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009915
9916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009917rm -f core conftest.err conftest.$ac_objext \
9918 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009919
Matthias Kloseb9621712010-04-24 17:59:49 +00009920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
9921$as_echo_n "checking for inet_pton... " >&6; }
9922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009923/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009924
9925#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009926#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009927#include <sys/socket.h>
9928#include <netinet/in.h>
9929#include <arpa/inet.h>
9930
Martin v. Löwise9416172003-05-03 10:12:45 +00009931int
9932main ()
9933{
9934void* p = inet_pton
9935 ;
9936 return 0;
9937}
9938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009939if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009940
Matthias Kloseb9621712010-04-24 17:59:49 +00009941$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009942
Matthias Kloseb9621712010-04-24 17:59:49 +00009943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9944$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009945else
Matthias Kloseb9621712010-04-24 17:59:49 +00009946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9947$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009948
9949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +00009951
Martin v. Löwisd6640d42003-07-06 09:29:52 +00009952# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +00009953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
9954$as_echo_n "checking for setgroups... " >&6; }
9955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009956/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009957
9958#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009959#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +00009960#ifdef HAVE_GRP_H
9961#include <grp.h>
9962#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +00009963
Martin v. Löwisd5843682002-11-21 20:41:28 +00009964int
9965main ()
9966{
9967void* p = setgroups
9968 ;
9969 return 0;
9970}
9971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009972if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009973
Matthias Kloseb9621712010-04-24 17:59:49 +00009974$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009975
Matthias Kloseb9621712010-04-24 17:59:49 +00009976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9977$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009978else
Matthias Kloseb9621712010-04-24 17:59:49 +00009979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9980$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009981
9982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009984
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009985# check for openpty and forkpty
9986
9987for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009988do :
9989 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
9990if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009991 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009992#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009993_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009994
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009995else
Matthias Kloseb9621712010-04-24 17:59:49 +00009996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
9997$as_echo_n "checking for openpty in -lutil... " >&6; }
9998if test "${ac_cv_lib_util_openpty+set}" = set; then :
9999 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010000else
Martin v. Löwis11437992002-04-12 09:54:03 +000010001 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010002LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010005
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010006/* Override any GCC internal prototype to avoid an error.
10007 Use char because int might match the return type of a GCC
10008 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010009#ifdef __cplusplus
10010extern "C"
10011#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010012char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010013int
10014main ()
10015{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010016return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010017 ;
10018 return 0;
10019}
10020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010021if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010022 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010023else
Matthias Kloseb9621712010-04-24 17:59:49 +000010024 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010025fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010026rm -f core conftest.err conftest.$ac_objext \
10027 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010028LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010029fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10031$as_echo "$ac_cv_lib_util_openpty" >&6; }
10032if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10033 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010034 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010035else
Matthias Kloseb9621712010-04-24 17:59:49 +000010036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10037$as_echo_n "checking for openpty in -lbsd... " >&6; }
10038if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
10039 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010040else
10041 ac_check_lib_save_LIBS=$LIBS
10042LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010044/* end confdefs.h. */
10045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010046/* Override any GCC internal prototype to avoid an error.
10047 Use char because int might match the return type of a GCC
10048 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010049#ifdef __cplusplus
10050extern "C"
10051#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010052char openpty ();
10053int
10054main ()
10055{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010056return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010057 ;
10058 return 0;
10059}
10060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010061if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010062 ac_cv_lib_bsd_openpty=yes
10063else
Matthias Kloseb9621712010-04-24 17:59:49 +000010064 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010065fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010066rm -f core conftest.err conftest.$ac_objext \
10067 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010068LIBS=$ac_check_lib_save_LIBS
10069fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10071$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10072if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10073 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010074 LIBS="$LIBS -lbsd"
10075fi
10076
10077
10078fi
10079
Fred Drake8cef4cf2000-06-28 16:40:38 +000010080
10081fi
10082done
10083
10084for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010085do :
10086 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10087if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010088 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010089#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010090_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010091
Fred Drake8cef4cf2000-06-28 16:40:38 +000010092else
Matthias Kloseb9621712010-04-24 17:59:49 +000010093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10094$as_echo_n "checking for forkpty in -lutil... " >&6; }
10095if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10096 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010097else
Martin v. Löwis11437992002-04-12 09:54:03 +000010098 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010099LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010101/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010103/* Override any GCC internal prototype to avoid an error.
10104 Use char because int might match the return type of a GCC
10105 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010106#ifdef __cplusplus
10107extern "C"
10108#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010109char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010110int
10111main ()
10112{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010113return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010114 ;
10115 return 0;
10116}
10117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010118if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010119 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010120else
Matthias Kloseb9621712010-04-24 17:59:49 +000010121 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010122fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010123rm -f core conftest.err conftest.$ac_objext \
10124 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010125LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10128$as_echo "$ac_cv_lib_util_forkpty" >&6; }
10129if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10130 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010131 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010132else
Matthias Kloseb9621712010-04-24 17:59:49 +000010133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10134$as_echo_n "checking for forkpty in -lbsd... " >&6; }
10135if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10136 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010137else
10138 ac_check_lib_save_LIBS=$LIBS
10139LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010141/* end confdefs.h. */
10142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010143/* Override any GCC internal prototype to avoid an error.
10144 Use char because int might match the return type of a GCC
10145 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010146#ifdef __cplusplus
10147extern "C"
10148#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010149char forkpty ();
10150int
10151main ()
10152{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010153return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010154 ;
10155 return 0;
10156}
10157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010158if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010159 ac_cv_lib_bsd_forkpty=yes
10160else
Matthias Kloseb9621712010-04-24 17:59:49 +000010161 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010162fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010163rm -f core conftest.err conftest.$ac_objext \
10164 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010165LIBS=$ac_check_lib_save_LIBS
10166fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10168$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10169if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10170 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010171 LIBS="$LIBS -lbsd"
10172fi
10173
10174
10175fi
10176
Fred Drake8cef4cf2000-06-28 16:40:38 +000010177
10178fi
10179done
10180
Jack Jansendd19cf82001-12-06 22:36:17 +000010181
Christian Heimesb186d002008-03-18 15:15:01 +000010182# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010183for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010184do :
10185 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10186if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010187 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010188#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010189_ACEOF
10190
10191fi
10192done
10193
10194
Michael W. Hudson54241132001-12-07 15:38:26 +000010195# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010196for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010197do :
10198 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10199ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10200eval as_val=\$$as_ac_var
10201 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010202 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010203#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010204_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010205
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010206fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010207done
10208
Michael W. Hudson54241132001-12-07 15:38:26 +000010209
Christian Heimesb186d002008-03-18 15:15:01 +000010210for ac_func in dup2 getcwd strdup
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
Martin v. Löwis1142de32002-03-29 16:28:31 +000010219
Martin v. Löwis1142de32002-03-29 16:28:31 +000010220else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010221 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010222 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010223 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
10224 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010225esac
10226
Martin v. Löwis1142de32002-03-29 16:28:31 +000010227fi
10228done
10229
10230
10231for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010232do :
10233 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10234if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010236#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010239/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010240#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010241int
10242main ()
10243{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010244getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 ;
10246 return 0;
10247}
10248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010249if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010250
Matthias Kloseb9621712010-04-24 17:59:49 +000010251$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010253
Guido van Rossum627b2d71993-12-24 10:39:16 +000010254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010256
Guido van Rossum627b2d71993-12-24 10:39:16 +000010257fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010258done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010259
Jack Jansen150753c2003-03-29 22:07:47 +000010260for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010261do :
10262 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10263if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010264 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010265#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010268/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010269#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010270int
10271main ()
10272{
10273setpgrp(0,0);
10274 ;
10275 return 0;
10276}
10277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010278if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010279
Matthias Kloseb9621712010-04-24 17:59:49 +000010280$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010281
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010282
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010283fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010285
10286fi
10287done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010288
Thomas Wouters3a584202000-08-05 23:28:51 +000010289for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010290do :
10291 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10292if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010293 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010294#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010297/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010298#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010299int
10300main ()
10301{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010302gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010303 ;
10304 return 0;
10305}
10306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010307if ac_fn_c_try_compile "$LINENO"; then :
10308
Guido van Rossum627b2d71993-12-24 10:39:16 +000010309else
Skip Montanaro6dead952003-09-25 14:50:04 +000010310
Matthias Kloseb9621712010-04-24 17:59:49 +000010311$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010312
Martin v. Löwis11437992002-04-12 09:54:03 +000010313
Guido van Rossum627b2d71993-12-24 10:39:16 +000010314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010316
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010317fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010318done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010319
Michael W. Hudson54241132001-12-07 15:38:26 +000010320
Matthias Kloseb9621712010-04-24 17:59:49 +000010321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10322$as_echo_n "checking for major... " >&6; }
10323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010324/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010325
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010326#if defined(MAJOR_IN_MKDEV)
10327#include <sys/mkdev.h>
10328#elif defined(MAJOR_IN_SYSMACROS)
10329#include <sys/sysmacros.h>
10330#else
10331#include <sys/types.h>
10332#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010333
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010334int
10335main ()
10336{
10337
10338 makedev(major(0),minor(0));
10339
10340 ;
10341 return 0;
10342}
10343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010344if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010345
10346
Matthias Kloseb9621712010-04-24 17:59:49 +000010347$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010348
Matthias Kloseb9621712010-04-24 17:59:49 +000010349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10350$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010351
10352else
Skip Montanaro6dead952003-09-25 14:50:04 +000010353
Matthias Kloseb9621712010-04-24 17:59:49 +000010354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10355$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010356
10357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010358rm -f core conftest.err conftest.$ac_objext \
10359 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010360
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010361# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010362# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10364$as_echo_n "checking for getaddrinfo... " >&6; }
10365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010366/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010367
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010368#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010369#include <sys/socket.h>
10370#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010371#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010372
Martin v. Löwis11437992002-04-12 09:54:03 +000010373int
10374main ()
10375{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010376getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010377 ;
10378 return 0;
10379}
10380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010381if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010382 have_getaddrinfo=yes
10383else
Matthias Kloseb9621712010-04-24 17:59:49 +000010384 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010385fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010386rm -f core conftest.err conftest.$ac_objext \
10387 conftest$ac_exeext conftest.$ac_ext
10388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10389$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010390if test $have_getaddrinfo = yes
10391then
Matthias Kloseb9621712010-04-24 17:59:49 +000010392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10393$as_echo_n "checking getaddrinfo bug... " >&6; }
10394 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10395 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010396else
Matthias Kloseb9621712010-04-24 17:59:49 +000010397 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010398 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010399else
Matthias Kloseb9621712010-04-24 17:59:49 +000010400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010401/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010402
10403#include <sys/types.h>
10404#include <netdb.h>
10405#include <string.h>
10406#include <sys/socket.h>
10407#include <netinet/in.h>
10408
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010409int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010410{
10411 int passive, gaierr, inet4 = 0, inet6 = 0;
10412 struct addrinfo hints, *ai, *aitop;
10413 char straddr[INET6_ADDRSTRLEN], strport[16];
10414
10415 for (passive = 0; passive <= 1; passive++) {
10416 memset(&hints, 0, sizeof(hints));
10417 hints.ai_family = AF_UNSPEC;
10418 hints.ai_flags = passive ? AI_PASSIVE : 0;
10419 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010420 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010421 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10422 (void)gai_strerror(gaierr);
10423 goto bad;
10424 }
10425 for (ai = aitop; ai; ai = ai->ai_next) {
10426 if (ai->ai_addr == NULL ||
10427 ai->ai_addrlen == 0 ||
10428 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10429 straddr, sizeof(straddr), strport, sizeof(strport),
10430 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10431 goto bad;
10432 }
10433 switch (ai->ai_family) {
10434 case AF_INET:
10435 if (strcmp(strport, "54321") != 0) {
10436 goto bad;
10437 }
10438 if (passive) {
10439 if (strcmp(straddr, "0.0.0.0") != 0) {
10440 goto bad;
10441 }
10442 } else {
10443 if (strcmp(straddr, "127.0.0.1") != 0) {
10444 goto bad;
10445 }
10446 }
10447 inet4++;
10448 break;
10449 case AF_INET6:
10450 if (strcmp(strport, "54321") != 0) {
10451 goto bad;
10452 }
10453 if (passive) {
10454 if (strcmp(straddr, "::") != 0) {
10455 goto bad;
10456 }
10457 } else {
10458 if (strcmp(straddr, "::1") != 0) {
10459 goto bad;
10460 }
10461 }
10462 inet6++;
10463 break;
10464 case AF_UNSPEC:
10465 goto bad;
10466 break;
10467 default:
10468 /* another family support? */
10469 break;
10470 }
10471 }
10472 }
10473
10474 if (!(inet4 == 0 || inet4 == 2))
10475 goto bad;
10476 if (!(inet6 == 0 || inet6 == 2))
10477 goto bad;
10478
10479 if (aitop)
10480 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010481 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010482
10483 bad:
10484 if (aitop)
10485 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010486 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010487}
10488
Martin v. Löwis11437992002-04-12 09:54:03 +000010489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010490if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010491 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010492else
Matthias Kloseb9621712010-04-24 17:59:49 +000010493 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010494fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010495rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10496 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010497fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010498
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010499fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010500
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010502
Mark Dickinson2df5d282009-12-31 21:22:50 +000010503if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010504then
10505 if test $ipv6 = yes
10506 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010507 echo 'Fatal: You must get working getaddrinfo() function.'
10508 echo ' or you can specify "--disable-ipv6"'.
10509 exit 1
10510 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010511else
Martin v. Löwis11437992002-04-12 09:54:03 +000010512
Matthias Kloseb9621712010-04-24 17:59:49 +000010513$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010514
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010515fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010516for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010517do :
10518 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10519if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010520 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010521#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010522_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010523
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010524fi
10525done
10526
Michael W. Hudson54241132001-12-07 15:38:26 +000010527
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010528# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10530$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10531if test "${ac_cv_header_time+set}" = set; then :
10532 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010533else
Matthias Kloseb9621712010-04-24 17:59:49 +000010534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010535/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010536#include <sys/types.h>
10537#include <sys/time.h>
10538#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010539
Martin v. Löwis11437992002-04-12 09:54:03 +000010540int
10541main ()
10542{
10543if ((struct tm *) 0)
10544return 0;
10545 ;
10546 return 0;
10547}
10548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010549if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010550 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010551else
Matthias Kloseb9621712010-04-24 17:59:49 +000010552 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010555fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10557$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010558if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010559
Matthias Kloseb9621712010-04-24 17:59:49 +000010560$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010561
10562fi
10563
Matthias Kloseb9621712010-04-24 17:59:49 +000010564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10565$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10566if test "${ac_cv_struct_tm+set}" = set; then :
10567 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010568else
Matthias Kloseb9621712010-04-24 17:59:49 +000010569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010570/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010571#include <sys/types.h>
10572#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010573
Martin v. Löwis11437992002-04-12 09:54:03 +000010574int
10575main ()
10576{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010577struct tm tm;
10578 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010579 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010580 ;
10581 return 0;
10582}
10583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010584if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010585 ac_cv_struct_tm=time.h
10586else
Matthias Kloseb9621712010-04-24 17:59:49 +000010587 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010588fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010590fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10592$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010593if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010594
Matthias Kloseb9621712010-04-24 17:59:49 +000010595$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010596
10597fi
10598
Matthias Kloseb9621712010-04-24 17:59:49 +000010599ac_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 +000010600#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010601
Matthias Kloseb9621712010-04-24 17:59:49 +000010602"
10603if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010604
10605cat >>confdefs.h <<_ACEOF
10606#define HAVE_STRUCT_TM_TM_ZONE 1
10607_ACEOF
10608
10609
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010610fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010611
Martin v. Löwis11437992002-04-12 09:54:03 +000010612if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10613
Matthias Kloseb9621712010-04-24 17:59:49 +000010614$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010615
10616else
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10618"
10619if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10620 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010621else
Matthias Kloseb9621712010-04-24 17:59:49 +000010622 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010623fi
10624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010625cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010626#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010627_ACEOF
10628
Matthias Kloseb9621712010-04-24 17:59:49 +000010629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10630$as_echo_n "checking for tzname... " >&6; }
10631if test "${ac_cv_var_tzname+set}" = set; then :
10632 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633else
Matthias Kloseb9621712010-04-24 17:59:49 +000010634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010635/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010636#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010637#if !HAVE_DECL_TZNAME
10638extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010639#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010640
Martin v. Löwis11437992002-04-12 09:54:03 +000010641int
10642main ()
10643{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010644return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010645 ;
10646 return 0;
10647}
10648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010649if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010650 ac_cv_var_tzname=yes
10651else
Matthias Kloseb9621712010-04-24 17:59:49 +000010652 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010653fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010654rm -f core conftest.err conftest.$ac_objext \
10655 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10658$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010659 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010660
Matthias Kloseb9621712010-04-24 17:59:49 +000010661$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010662
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010663 fi
10664fi
10665
Matthias Kloseb9621712010-04-24 17:59:49 +000010666ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10667if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010668
10669cat >>confdefs.h <<_ACEOF
10670#define HAVE_STRUCT_STAT_ST_RDEV 1
10671_ACEOF
10672
10673
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010674fi
10675
Matthias Kloseb9621712010-04-24 17:59:49 +000010676ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10677if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010678
Martin v. Löwis11437992002-04-12 09:54:03 +000010679cat >>confdefs.h <<_ACEOF
10680#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10681_ACEOF
10682
10683
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010684fi
10685
Matthias Kloseb9621712010-04-24 17:59:49 +000010686ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10687if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010688
10689cat >>confdefs.h <<_ACEOF
10690#define HAVE_STRUCT_STAT_ST_FLAGS 1
10691_ACEOF
10692
10693
10694fi
10695
Matthias Kloseb9621712010-04-24 17:59:49 +000010696ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10697if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010698
10699cat >>confdefs.h <<_ACEOF
10700#define HAVE_STRUCT_STAT_ST_GEN 1
10701_ACEOF
10702
10703
10704fi
10705
Matthias Kloseb9621712010-04-24 17:59:49 +000010706ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10707if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010708
10709cat >>confdefs.h <<_ACEOF
10710#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10711_ACEOF
10712
10713
10714fi
10715
Matthias Kloseb9621712010-04-24 17:59:49 +000010716ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10717if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010718
Martin v. Löwis11437992002-04-12 09:54:03 +000010719cat >>confdefs.h <<_ACEOF
10720#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10721_ACEOF
10722
10723
Matthias Kloseb9621712010-04-24 17:59:49 +000010724$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010725
10726else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010727 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010728 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010729 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10730 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010731esac
10732
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010733fi
10734
Michael W. Hudson54241132001-12-07 15:38:26 +000010735
Martin v. Löwis11437992002-04-12 09:54:03 +000010736
Matthias Kloseb9621712010-04-24 17:59:49 +000010737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10738$as_echo_n "checking for time.h that defines altzone... " >&6; }
10739if test "${ac_cv_header_time_altzone+set}" = set; then :
10740 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010741else
Matthias Kloseb9621712010-04-24 17:59:49 +000010742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010743/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010744#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010745int
10746main ()
10747{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010748return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010749 ;
10750 return 0;
10751}
10752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010753if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010754 ac_cv_header_time_altzone=yes
10755else
Matthias Kloseb9621712010-04-24 17:59:49 +000010756 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010757fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10759fi
10760
Matthias Kloseb9621712010-04-24 17:59:49 +000010761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10762$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010763if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010764
Matthias Kloseb9621712010-04-24 17:59:49 +000010765$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010766
10767fi
10768
Guido van Rossumda88dad1995-01-26 00:46:29 +000010769was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10771$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010773/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010774
10775#include <sys/types.h>
10776#include <sys/select.h>
10777#include <sys/time.h>
10778
Martin v. Löwis11437992002-04-12 09:54:03 +000010779int
10780main ()
10781{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010782;
Martin v. Löwis11437992002-04-12 09:54:03 +000010783 ;
10784 return 0;
10785}
10786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010787if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010788
10789
Matthias Kloseb9621712010-04-24 17:59:49 +000010790$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010791
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010792 was_it_defined=yes
10793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10797$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010798
Matthias Kloseb9621712010-04-24 17:59:49 +000010799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10800$as_echo_n "checking for addrinfo... " >&6; }
10801if test "${ac_cv_struct_addrinfo+set}" = set; then :
10802 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010803else
Matthias Kloseb9621712010-04-24 17:59:49 +000010804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010805/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010806
10807# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010808int
10809main ()
10810{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010811struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010812 ;
10813 return 0;
10814}
10815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010816if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010817 ac_cv_struct_addrinfo=yes
10818else
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10822fi
10823
Matthias Kloseb9621712010-04-24 17:59:49 +000010824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10825$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010826if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010827
Matthias Kloseb9621712010-04-24 17:59:49 +000010828$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010829
10830fi
10831
Matthias Kloseb9621712010-04-24 17:59:49 +000010832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10833$as_echo_n "checking for sockaddr_storage... " >&6; }
10834if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
10835 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010836else
Matthias Kloseb9621712010-04-24 17:59:49 +000010837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010838/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010839
10840# include <sys/types.h>
10841# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010842int
10843main ()
10844{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010845struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010846 ;
10847 return 0;
10848}
10849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010850if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010851 ac_cv_struct_sockaddr_storage=yes
10852else
Matthias Kloseb9621712010-04-24 17:59:49 +000010853 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10856fi
10857
Matthias Kloseb9621712010-04-24 17:59:49 +000010858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10859$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010860if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010861
Matthias Kloseb9621712010-04-24 17:59:49 +000010862$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010863
10864fi
10865
Guido van Rossum627b2d71993-12-24 10:39:16 +000010866# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010867
Matthias Kloseb9621712010-04-24 17:59:49 +000010868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10869$as_echo_n "checking whether char is unsigned... " >&6; }
10870if test "${ac_cv_c_char_unsigned+set}" = set; then :
10871 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010872else
Matthias Kloseb9621712010-04-24 17:59:49 +000010873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010875$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010876int
10877main ()
10878{
10879static int test_array [1 - 2 * !(((char) -1) < 0)];
10880test_array [0] = 0
10881
10882 ;
10883 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010884}
Martin v. Löwis11437992002-04-12 09:54:03 +000010885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010886if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010887 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010888else
Matthias Kloseb9621712010-04-24 17:59:49 +000010889 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10894$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010895if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010896 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010897
10898fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010899
Matthias Kloseb9621712010-04-24 17:59:49 +000010900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10901$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10902if test "${ac_cv_c_const+set}" = set; then :
10903 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010904else
Matthias Kloseb9621712010-04-24 17:59:49 +000010905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010906/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010907
Martin v. Löwis11437992002-04-12 09:54:03 +000010908int
10909main ()
10910{
10911/* FIXME: Include the comments suggested by Paul. */
10912#ifndef __cplusplus
10913 /* Ultrix mips cc rejects this. */
10914 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010915 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000010916 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010917 char const *const *pcpcc;
10918 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010919 /* NEC SVR4.0.2 mips cc rejects this. */
10920 struct point {int x, y;};
10921 static struct point const zero = {0,0};
10922 /* AIX XL C 1.02.0.0 rejects this.
10923 It does not let you subtract one const X* pointer from another in
10924 an arm of an if-expression whose if-part is not a constant
10925 expression */
10926 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010927 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010928 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010929 ++pcpcc;
10930 ppc = (char**) pcpcc;
10931 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010932 { /* SCO 3.2v4 cc rejects this. */
10933 char *t;
10934 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010935
Martin v. Löwis11437992002-04-12 09:54:03 +000010936 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010937 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010938 }
10939 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
10940 int x[] = {25, 17};
10941 const int *foo = &x[0];
10942 ++foo;
10943 }
10944 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10945 typedef const int *iptr;
10946 iptr p = 0;
10947 ++p;
10948 }
10949 { /* AIX XL C 1.02.0.0 rejects this saying
10950 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10951 struct s { int j; const int *ap[3]; };
10952 struct s *b; b->j = 5;
10953 }
10954 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10955 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010956 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010957 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010958 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000010959#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000010960
Martin v. Löwis11437992002-04-12 09:54:03 +000010961 ;
10962 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000010963}
Martin v. Löwis11437992002-04-12 09:54:03 +000010964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010965if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010966 ac_cv_c_const=yes
10967else
Matthias Kloseb9621712010-04-24 17:59:49 +000010968 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
10973$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010974if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010975
Matthias Kloseb9621712010-04-24 17:59:49 +000010976$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010977
10978fi
10979
Michael W. Hudson54241132001-12-07 15:38:26 +000010980
Guido van Rossumda88dad1995-01-26 00:46:29 +000010981works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
10983$as_echo_n "checking for working volatile... " >&6; }
10984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010985/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010986
Martin v. Löwis11437992002-04-12 09:54:03 +000010987int
10988main ()
10989{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010990volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010991 ;
10992 return 0;
10993}
10994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010995if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000010996 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010997else
Skip Montanaro6dead952003-09-25 14:50:04 +000010998
Matthias Kloseb9621712010-04-24 17:59:49 +000010999$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011000
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011001
Guido van Rossum627b2d71993-12-24 10:39:16 +000011002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11005$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011006
Guido van Rossumda88dad1995-01-26 00:46:29 +000011007works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11009$as_echo_n "checking for working signed char... " >&6; }
11010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011011/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011012
Martin v. Löwis11437992002-04-12 09:54:03 +000011013int
11014main ()
11015{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011016signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011017 ;
11018 return 0;
11019}
11020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011021if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011022 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011023else
Skip Montanaro6dead952003-09-25 14:50:04 +000011024
Matthias Kloseb9621712010-04-24 17:59:49 +000011025$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011026
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011027
Guido van Rossum7f43da71994-08-01 12:15:30 +000011028fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11031$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011032
Guido van Rossumda88dad1995-01-26 00:46:29 +000011033have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11035$as_echo_n "checking for prototypes... " >&6; }
11036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011037/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011038int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011039int
11040main ()
11041{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011042return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011043 ;
11044 return 0;
11045}
11046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011047if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011048
11049
Matthias Kloseb9621712010-04-24 17:59:49 +000011050$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011051
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011052 have_prototypes=yes
11053
Guido van Rossum7f43da71994-08-01 12:15:30 +000011054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11057$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011058
Guido van Rossumda88dad1995-01-26 00:46:29 +000011059works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11061$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011063/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011064
11065#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011066int foo(int x, ...) {
11067 va_list va;
11068 va_start(va, x);
11069 va_arg(va, int);
11070 va_arg(va, char *);
11071 va_arg(va, double);
11072 return 0;
11073}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011074
Martin v. Löwis11437992002-04-12 09:54:03 +000011075int
11076main ()
11077{
Guido van Rossum90eea071996-08-30 20:58:57 +000011078return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011079 ;
11080 return 0;
11081}
11082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011083if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011084
11085
Matthias Kloseb9621712010-04-24 17:59:49 +000011086$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011087
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011088 works=yes
11089
Guido van Rossum627b2d71993-12-24 10:39:16 +000011090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11093$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011094
Martin v. Löwisd6320502004-08-12 13:45:08 +000011095# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11097$as_echo_n "checking for socketpair... " >&6; }
11098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011099/* end confdefs.h. */
11100
11101#include <sys/types.h>
11102#include <sys/socket.h>
11103
11104int
11105main ()
11106{
11107void *x=socketpair
11108 ;
11109 return 0;
11110}
11111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011112if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011113
Matthias Kloseb9621712010-04-24 17:59:49 +000011114$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011115
Matthias Kloseb9621712010-04-24 17:59:49 +000011116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11117$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011118else
Matthias Kloseb9621712010-04-24 17:59:49 +000011119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11120$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011121
11122fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011124
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011125# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11127$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011129/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011130#include <sys/types.h>
11131#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011132int
11133main ()
11134{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011135struct sockaddr x;
11136x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011137 ;
11138 return 0;
11139}
11140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011141if ac_fn_c_try_compile "$LINENO"; then :
11142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11143$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011144
Matthias Kloseb9621712010-04-24 17:59:49 +000011145$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011146
11147else
Matthias Kloseb9621712010-04-24 17:59:49 +000011148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11149$as_echo "no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011152
Guido van Rossumda88dad1995-01-26 00:46:29 +000011153va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11155$as_echo_n "checking whether va_list is an array... " >&6; }
11156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011157/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011158
11159#ifdef HAVE_STDARG_PROTOTYPES
11160#include <stdarg.h>
11161#else
11162#include <varargs.h>
11163#endif
11164
Martin v. Löwis11437992002-04-12 09:54:03 +000011165int
11166main ()
11167{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011168va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011169 ;
11170 return 0;
11171}
11172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011173if ac_fn_c_try_compile "$LINENO"; then :
11174
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011175else
Skip Montanaro6dead952003-09-25 14:50:04 +000011176
Martin v. Löwis11437992002-04-12 09:54:03 +000011177
Matthias Kloseb9621712010-04-24 17:59:49 +000011178$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011179
Guido van Rossumda88dad1995-01-26 00:46:29 +000011180 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011181
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11185$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011186
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011187# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011188
11189
Matthias Kloseb9621712010-04-24 17:59:49 +000011190ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11191if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011192
Matthias Kloseb9621712010-04-24 17:59:49 +000011193 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011194
Matthias Kloseb9621712010-04-24 17:59:49 +000011195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11196$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011197 OLD_CFLAGS=$CFLAGS
11198 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011200/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011201
11202# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011203
Martin v. Löwis11437992002-04-12 09:54:03 +000011204int
11205main ()
11206{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011207
11208 char *name;
11209 struct hostent *he, *res;
11210 char buffer[2048];
11211 int buflen = 2048;
11212 int h_errnop;
11213
11214 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011215
11216 ;
11217 return 0;
11218}
11219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011220if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011221
Matthias Kloseb9621712010-04-24 17:59:49 +000011222 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011223
Martin v. Löwis11437992002-04-12 09:54:03 +000011224
Matthias Kloseb9621712010-04-24 17:59:49 +000011225$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011226
Matthias Kloseb9621712010-04-24 17:59:49 +000011227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11228$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011229
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011230else
Skip Montanaro6dead952003-09-25 14:50:04 +000011231
Matthias Kloseb9621712010-04-24 17:59:49 +000011232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11233$as_echo "no" >&6; }
11234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11235$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011237/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011238
11239# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011240
Martin v. Löwis11437992002-04-12 09:54:03 +000011241int
11242main ()
11243{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011244
11245 char *name;
11246 struct hostent *he;
11247 char buffer[2048];
11248 int buflen = 2048;
11249 int h_errnop;
11250
11251 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011252
11253 ;
11254 return 0;
11255}
11256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011257if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011258
Matthias Kloseb9621712010-04-24 17:59:49 +000011259 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011260
Martin v. Löwis11437992002-04-12 09:54:03 +000011261
Matthias Kloseb9621712010-04-24 17:59:49 +000011262$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011263
Matthias Kloseb9621712010-04-24 17:59:49 +000011264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11265$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011266
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011267else
Skip Montanaro6dead952003-09-25 14:50:04 +000011268
Matthias Kloseb9621712010-04-24 17:59:49 +000011269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11270$as_echo "no" >&6; }
11271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11272$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011274/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011275
11276# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011277
Martin v. Löwis11437992002-04-12 09:54:03 +000011278int
11279main ()
11280{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011281
11282 char *name;
11283 struct hostent *he;
11284 struct hostent_data data;
11285
11286 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000011287
11288 ;
11289 return 0;
11290}
11291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011292if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011293
Matthias Kloseb9621712010-04-24 17:59:49 +000011294 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011295
Martin v. Löwis11437992002-04-12 09:54:03 +000011296
Matthias Kloseb9621712010-04-24 17:59:49 +000011297$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011298
Matthias Kloseb9621712010-04-24 17:59:49 +000011299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11300$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011301
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011302else
Skip Montanaro6dead952003-09-25 14:50:04 +000011303
Matthias Kloseb9621712010-04-24 17:59:49 +000011304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11305$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011306
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011309
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011312
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011315 CFLAGS=$OLD_CFLAGS
11316
11317else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011318
Matthias Kloseb9621712010-04-24 17:59:49 +000011319 for ac_func in gethostbyname
11320do :
11321 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11322if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011323 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011324#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011325_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011326
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011327fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011328done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011329
Michael W. Hudson54241132001-12-07 15:38:26 +000011330
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011331fi
11332
Michael W. Hudson54241132001-12-07 15:38:26 +000011333
11334
11335
11336
11337
11338
Guido van Rossum627b2d71993-12-24 10:39:16 +000011339# checks for system services
11340# (none yet)
11341
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011342# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011343ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11344if test "x$ac_cv_func___fpu_control" = x""yes; then :
11345
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011346else
Matthias Kloseb9621712010-04-24 17:59:49 +000011347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11348$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11349if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11350 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011351else
Martin v. Löwis11437992002-04-12 09:54:03 +000011352 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011353LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011355/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011356
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011357/* Override any GCC internal prototype to avoid an error.
11358 Use char because int might match the return type of a GCC
11359 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011360#ifdef __cplusplus
11361extern "C"
11362#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011363char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011364int
11365main ()
11366{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011367return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011368 ;
11369 return 0;
11370}
11371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011372if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011373 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011374else
Matthias Kloseb9621712010-04-24 17:59:49 +000011375 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011376fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011377rm -f core conftest.err conftest.$ac_objext \
11378 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011379LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011380fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11382$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11383if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011384 cat >>confdefs.h <<_ACEOF
11385#define HAVE_LIBIEEE 1
11386_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011387
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011388 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011389
Guido van Rossum627b2d71993-12-24 10:39:16 +000011390fi
11391
Michael W. Hudson54241132001-12-07 15:38:26 +000011392
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011393fi
11394
Michael W. Hudson54241132001-12-07 15:38:26 +000011395
Guido van Rossum7f253911997-05-09 02:42:48 +000011396# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11398$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011400# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011401if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011402 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011403if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011404then
11405
Matthias Kloseb9621712010-04-24 17:59:49 +000011406$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011407
Matthias Kloseb9621712010-04-24 17:59:49 +000011408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11409$as_echo "yes" >&6; }
11410else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11411$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011412fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011413else
Matthias Kloseb9621712010-04-24 17:59:49 +000011414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11415$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011416fi
11417
Guido van Rossum7f253911997-05-09 02:42:48 +000011418
Guido van Rossum7f43da71994-08-01 12:15:30 +000011419# check for --with-libm=...
11420
Guido van Rossum563e7081996-09-10 18:20:48 +000011421case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011422Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011423*) LIBM=-lm
11424esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11426$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011428# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011429if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011430 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011431if test "$withval" = no
11432then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11434$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011435elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011436then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11438$as_echo "set LIBM=\"$withval\"" >&6; }
11439else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011440fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011441else
Matthias Kloseb9621712010-04-24 17:59:49 +000011442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11443$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011444fi
11445
Guido van Rossum7f43da71994-08-01 12:15:30 +000011446
11447# check for --with-libc=...
11448
Matthias Kloseb9621712010-04-24 17:59:49 +000011449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11450$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011451
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011452# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011453if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011454 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011455if test "$withval" = no
11456then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11458$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011459elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011460then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11462$as_echo "set LIBC=\"$withval\"" >&6; }
11463else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011464fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011465else
Matthias Kloseb9621712010-04-24 17:59:49 +000011466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11467$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011468fi
11469
Guido van Rossum7f43da71994-08-01 12:15:30 +000011470
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011471# **************************************************
11472# * Check for various properties of floating point *
11473# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011474
Matthias Kloseb9621712010-04-24 17:59:49 +000011475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11476$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11477if test "${ac_cv_little_endian_double+set}" = set; then :
11478 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011479else
11480
Matthias Kloseb9621712010-04-24 17:59:49 +000011481if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011482 ac_cv_little_endian_double=no
11483else
Matthias Kloseb9621712010-04-24 17:59:49 +000011484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011485/* end confdefs.h. */
11486
11487#include <string.h>
11488int main() {
11489 double x = 9006104071832581.0;
11490 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11491 return 0;
11492 else
11493 return 1;
11494}
11495
11496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011497if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011498 ac_cv_little_endian_double=yes
11499else
Matthias Kloseb9621712010-04-24 17:59:49 +000011500 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011501fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011502rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11503 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011504fi
11505
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011506fi
11507
Matthias Kloseb9621712010-04-24 17:59:49 +000011508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11509$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011510if test "$ac_cv_little_endian_double" = yes
11511then
11512
Matthias Kloseb9621712010-04-24 17:59:49 +000011513$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011514
11515fi
11516
Matthias Kloseb9621712010-04-24 17:59:49 +000011517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11518$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11519if test "${ac_cv_big_endian_double+set}" = set; then :
11520 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011521else
11522
Matthias Kloseb9621712010-04-24 17:59:49 +000011523if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011524 ac_cv_big_endian_double=no
11525else
Matthias Kloseb9621712010-04-24 17:59:49 +000011526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011527/* end confdefs.h. */
11528
11529#include <string.h>
11530int main() {
11531 double x = 9006104071832581.0;
11532 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11533 return 0;
11534 else
11535 return 1;
11536}
11537
11538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011539if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011540 ac_cv_big_endian_double=yes
11541else
Matthias Kloseb9621712010-04-24 17:59:49 +000011542 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011543fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011544rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11545 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011546fi
11547
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011548fi
11549
Matthias Kloseb9621712010-04-24 17:59:49 +000011550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11551$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011552if test "$ac_cv_big_endian_double" = yes
11553then
11554
Matthias Kloseb9621712010-04-24 17:59:49 +000011555$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011556
11557fi
11558
11559# Some ARM platforms use a mixed-endian representation for doubles.
11560# While Python doesn't currently have full support for these platforms
11561# (see e.g., issue 1762561), we can at least make sure that float <-> string
11562# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11564$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11565if test "${ac_cv_mixed_endian_double+set}" = set; then :
11566 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011567else
11568
Matthias Kloseb9621712010-04-24 17:59:49 +000011569if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011570 ac_cv_mixed_endian_double=no
11571else
Matthias Kloseb9621712010-04-24 17:59:49 +000011572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011573/* end confdefs.h. */
11574
11575#include <string.h>
11576int main() {
11577 double x = 9006104071832581.0;
11578 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11579 return 0;
11580 else
11581 return 1;
11582}
11583
11584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011585if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011586 ac_cv_mixed_endian_double=yes
11587else
Matthias Kloseb9621712010-04-24 17:59:49 +000011588 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011589fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011590rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11591 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011592fi
11593
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011594fi
11595
Matthias Kloseb9621712010-04-24 17:59:49 +000011596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11597$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011598if test "$ac_cv_mixed_endian_double" = yes
11599then
11600
Matthias Kloseb9621712010-04-24 17:59:49 +000011601$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011602
11603fi
11604
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011605# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011606# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011607# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011608# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011609# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011610# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011611
11612# This inline assembler syntax may also work for suncc and icc,
11613# so we try it on all platforms.
11614
Matthias Kloseb9621712010-04-24 17:59:49 +000011615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11616$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011618/* end confdefs.h. */
11619
11620int
11621main ()
11622{
11623
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011624 unsigned short cw;
11625 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11626 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011627
11628 ;
11629 return 0;
11630}
11631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011632if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011633 have_gcc_asm_for_x87=yes
11634else
Matthias Kloseb9621712010-04-24 17:59:49 +000011635 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011636fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11639$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011640if test "$have_gcc_asm_for_x87" = yes
11641then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011642
Matthias Kloseb9621712010-04-24 17:59:49 +000011643$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011644
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011645fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011646
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011647# Detect whether system arithmetic is subject to x87-style double
11648# rounding issues. The result of this test has little meaning on non
11649# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11650# mode is round-to-nearest and double rounding issues are present, and
11651# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11653$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011654# $BASECFLAGS may affect the result
11655ac_save_cc="$CC"
11656CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011657if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011658 ac_cv_x87_double_rounding=no
11659else
Matthias Kloseb9621712010-04-24 17:59:49 +000011660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011661/* end confdefs.h. */
11662
11663#include <stdlib.h>
11664#include <math.h>
11665int main() {
11666 volatile double x, y, z;
11667 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11668 x = 0.99999999999999989; /* 1-2**-53 */
11669 y = 1./x;
11670 if (y != 1.)
11671 exit(0);
11672 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11673 x = 1e16;
11674 y = 2.99999;
11675 z = x + y;
11676 if (z != 1e16+4.)
11677 exit(0);
11678 /* both tests show evidence of double rounding */
11679 exit(1);
11680}
11681
11682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011683if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011684 ac_cv_x87_double_rounding=no
11685else
Matthias Kloseb9621712010-04-24 17:59:49 +000011686 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011687fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011688rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11689 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011690fi
11691
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011692CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11694$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011695if test "$ac_cv_x87_double_rounding" = yes
11696then
11697
Matthias Kloseb9621712010-04-24 17:59:49 +000011698$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011699
11700fi
11701
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011702# ************************************
11703# * Check for mathematical functions *
11704# ************************************
11705
11706LIBS_SAVE=$LIBS
11707LIBS="$LIBS $LIBM"
11708
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011709# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11710# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11712$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
11713if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
11714 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011715else
11716
Matthias Kloseb9621712010-04-24 17:59:49 +000011717if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011718 ac_cv_tanh_preserves_zero_sign=no
11719else
Matthias Kloseb9621712010-04-24 17:59:49 +000011720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011721/* end confdefs.h. */
11722
11723#include <math.h>
11724#include <stdlib.h>
11725int main() {
11726 /* return 0 if either negative zeros don't exist
11727 on this platform or if negative zeros exist
11728 and tanh(-0.) == -0. */
11729 if (atan2(0., -1.) == atan2(-0., -1.) ||
11730 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11731 else exit(1);
11732}
11733
11734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011735if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011736 ac_cv_tanh_preserves_zero_sign=yes
11737else
Matthias Kloseb9621712010-04-24 17:59:49 +000011738 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011739fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11741 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011742fi
11743
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011744fi
11745
Matthias Kloseb9621712010-04-24 17:59:49 +000011746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11747$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011748if test "$ac_cv_tanh_preserves_zero_sign" = yes
11749then
11750
Matthias Kloseb9621712010-04-24 17:59:49 +000011751$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011752
11753fi
11754
Mark Dickinson9c113362009-09-05 10:36:23 +000011755for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011756do :
11757 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11758ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11759eval as_val=\$$as_ac_var
11760 if test "x$as_val" = x""yes; then :
Mark Dickinson9c113362009-09-05 10:36:23 +000011761 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011762#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000011763_ACEOF
11764
11765fi
11766done
11767
Mark Dickinson9c113362009-09-05 10:36:23 +000011768for ac_func in hypot lgamma log1p round tgamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011769do :
11770 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11771ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11772eval as_val=\$$as_ac_var
11773 if test "x$as_val" = x""yes; then :
Christian Heimes99170a52007-12-19 02:07:34 +000011774 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011775#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000011776_ACEOF
11777
11778fi
11779done
11780
Matthias Kloseb9621712010-04-24 17:59:49 +000011781ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11782"
11783if test "x$ac_cv_have_decl_isinf" = x""yes; then :
11784 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011785else
Matthias Kloseb9621712010-04-24 17:59:49 +000011786 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011787fi
11788
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011789cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011790#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011792ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11793"
11794if test "x$ac_cv_have_decl_isnan" = x""yes; then :
11795 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011796else
Matthias Kloseb9621712010-04-24 17:59:49 +000011797 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011798fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011799
11800cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011801#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011803ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11804"
11805if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
11806 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011807else
Matthias Kloseb9621712010-04-24 17:59:49 +000011808 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011809fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011810
11811cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011812#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011813_ACEOF
11814
11815
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011816LIBS=$LIBS_SAVE
11817
Mark Dickinsona614f042009-11-28 12:48:43 +000011818# For multiprocessing module, check that sem_open
11819# actually works. For FreeBSD versions <= 7.2,
11820# the kernel module that provides POSIX semaphores
11821# isn't loaded by default, so an attempt to call
11822# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11824$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
11825if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
11826 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011827else
Matthias Kloseb9621712010-04-24 17:59:49 +000011828 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011829 ac_cv_posix_semaphores_enabled=yes
11830else
Matthias Kloseb9621712010-04-24 17:59:49 +000011831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011832/* end confdefs.h. */
11833
11834#include <unistd.h>
11835#include <fcntl.h>
11836#include <stdio.h>
11837#include <semaphore.h>
11838#include <sys/stat.h>
11839
11840int main(void) {
11841 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11842 if (a == SEM_FAILED) {
11843 perror("sem_open");
11844 return 1;
11845 }
11846 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011847 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011848 return 0;
11849}
11850
11851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011852if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011853 ac_cv_posix_semaphores_enabled=yes
11854else
Matthias Kloseb9621712010-04-24 17:59:49 +000011855 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011856fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011857rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11858 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011859fi
11860
11861
Mark Dickinsona614f042009-11-28 12:48:43 +000011862fi
11863
Matthias Kloseb9621712010-04-24 17:59:49 +000011864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11865$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011866if test $ac_cv_posix_semaphores_enabled = no
11867then
11868
Matthias Kloseb9621712010-04-24 17:59:49 +000011869$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000011870
11871fi
11872
Mark Dickinson10683072009-04-18 21:18:19 +000011873# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000011874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
11875$as_echo_n "checking for broken sem_getvalue... " >&6; }
11876if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
11877 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011878else
Matthias Kloseb9621712010-04-24 17:59:49 +000011879 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011880 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000011881else
Matthias Kloseb9621712010-04-24 17:59:49 +000011882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000011883/* end confdefs.h. */
11884
11885#include <unistd.h>
11886#include <fcntl.h>
11887#include <stdio.h>
11888#include <semaphore.h>
11889#include <sys/stat.h>
11890
11891int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000011892 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000011893 int count;
11894 int res;
11895 if(a==SEM_FAILED){
11896 perror("sem_open");
11897 return 1;
11898
11899 }
11900 res = sem_getvalue(a, &count);
11901 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011902 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000011903 return res==-1 ? 1 : 0;
11904}
11905
Mark Dickinson10683072009-04-18 21:18:19 +000011906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011907if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011908 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000011909else
Matthias Kloseb9621712010-04-24 17:59:49 +000011910 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011911fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011912rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11913 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011914fi
11915
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011916
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011917fi
11918
Matthias Kloseb9621712010-04-24 17:59:49 +000011919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
11920$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011921if test $ac_cv_broken_sem_getvalue = yes
11922then
11923
Matthias Kloseb9621712010-04-24 17:59:49 +000011924$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011925
11926fi
11927
Mark Dickinsonbd792642009-03-18 20:06:12 +000011928# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000011929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
11930$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011931# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011932if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000011933 enableval=$enable_big_digits; case $enable_big_digits in
11934yes)
11935 enable_big_digits=30 ;;
11936no)
11937 enable_big_digits=15 ;;
1193815|30)
11939 ;;
11940*)
Matthias Kloseb9621712010-04-24 17:59:49 +000011941 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 +000011942esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
11944$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011945
11946cat >>confdefs.h <<_ACEOF
11947#define PYLONG_BITS_IN_DIGIT $enable_big_digits
11948_ACEOF
11949
11950
11951else
Matthias Kloseb9621712010-04-24 17:59:49 +000011952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
11953$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011954fi
11955
11956
Guido van Rossumef2255b2000-03-10 22:30:29 +000011957# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011958ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
11959if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011960
11961
Matthias Kloseb9621712010-04-24 17:59:49 +000011962$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011963
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011964 wchar_h="yes"
11965
Guido van Rossumef2255b2000-03-10 22:30:29 +000011966else
Martin v. Löwis11437992002-04-12 09:54:03 +000011967 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000011968
11969fi
11970
Michael W. Hudson54241132001-12-07 15:38:26 +000011971
Martin v. Löwis11437992002-04-12 09:54:03 +000011972
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000011973# determine wchar_t size
11974if test "$wchar_h" = yes
11975then
Matthias Kloseb9621712010-04-24 17:59:49 +000011976 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011977# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11978# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11979# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000011980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
11981$as_echo_n "checking size of wchar_t... " >&6; }
11982if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
11983 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011984else
Matthias Kloseb9621712010-04-24 17:59:49 +000011985 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
11986"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011987
Martin v. Löwis11437992002-04-12 09:54:03 +000011988else
Matthias Kloseb9621712010-04-24 17:59:49 +000011989 if test "$ac_cv_type_wchar_t" = yes; then
11990 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11991$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11992{ as_fn_set_status 77
11993as_fn_error "cannot compute sizeof (wchar_t)
11994See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011995 else
11996 ac_cv_sizeof_wchar_t=0
11997 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011999
Martin v. Löwis11437992002-04-12 09:54:03 +000012000fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12002$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012003
12004
12005
Martin v. Löwis11437992002-04-12 09:54:03 +000012006cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012007#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012008_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012009
Michael W. Hudson54241132001-12-07 15:38:26 +000012010
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012011fi
12012
Matthias Kloseb9621712010-04-24 17:59:49 +000012013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12014$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012015have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012017/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012018
12019#include <tcl.h>
12020#if TCL_UTF_MAX != 6
12021# error "NOT UCS4_TCL"
12022#endif
12023int
12024main ()
12025{
12026
12027 ;
12028 return 0;
12029}
12030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012031if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012032
12033
Matthias Kloseb9621712010-04-24 17:59:49 +000012034$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012035
12036 have_ucs4_tcl=yes
12037
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12041$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012042
Skip Montanaro6dead952003-09-25 14:50:04 +000012043# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012044if test "$wchar_h" = yes
12045then
12046 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12048$as_echo_n "checking whether wchar_t is signed... " >&6; }
12049 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12050 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012051else
12052
Matthias Kloseb9621712010-04-24 17:59:49 +000012053 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012054 ac_cv_wchar_t_signed=yes
12055else
Matthias Kloseb9621712010-04-24 17:59:49 +000012056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012057/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012058
12059 #include <wchar.h>
12060 int main()
12061 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012062 /* Success: exit code 0 */
12063 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012064 }
12065
12066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012067if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012068 ac_cv_wchar_t_signed=yes
12069else
Matthias Kloseb9621712010-04-24 17:59:49 +000012070 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012072rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12073 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012074fi
12075
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012076fi
12077
Matthias Kloseb9621712010-04-24 17:59:49 +000012078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12079$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012080fi
12081
Matthias Kloseb9621712010-04-24 17:59:49 +000012082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12083$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012084
12085# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012086if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012087 withval=$with_wide_unicode;
12088if test "$withval" != no
12089then unicode_size="4"
12090else unicode_size="2"
12091fi
12092
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012093else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012094
Georg Brandl52d168a2008-01-07 18:10:24 +000012095case "$have_ucs4_tcl" in
12096 yes) unicode_size="4" ;;
12097 *) unicode_size="2" ;;
12098esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012099
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012100fi
12101
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012102
12103
Georg Brandl52d168a2008-01-07 18:10:24 +000012104case "$unicode_size" in
Matthias Kloseb9621712010-04-24 17:59:49 +000012105 4) $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012106 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012107 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012108 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012109esac
12110
Michael W. Hudson54241132001-12-07 15:38:26 +000012111
Martin v. Löwis11437992002-04-12 09:54:03 +000012112
Georg Brandl52d168a2008-01-07 18:10:24 +000012113# wchar_t is only usable if it maps to an unsigned type
12114if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012115 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012116then
12117 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012118
Matthias Kloseb9621712010-04-24 17:59:49 +000012119$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012120
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012122
Georg Brandl52d168a2008-01-07 18:10:24 +000012123elif test "$ac_cv_sizeof_short" = "$unicode_size"
12124then
12125 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012126 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012127
Georg Brandl52d168a2008-01-07 18:10:24 +000012128elif test "$ac_cv_sizeof_long" = "$unicode_size"
12129then
12130 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012131 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012132
Georg Brandl52d168a2008-01-07 18:10:24 +000012133else
12134 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12137$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012138
12139# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12141$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12142if test "${ac_cv_c_bigendian+set}" = set; then :
12143 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012144else
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 ac_cv_c_bigendian=unknown
12146 # See if we're dealing with a universal compiler.
12147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12148/* end confdefs.h. */
12149#ifndef __APPLE_CC__
12150 not a universal capable compiler
12151 #endif
12152 typedef int dummy;
12153
Skip Montanaro6dead952003-09-25 14:50:04 +000012154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012155if ac_fn_c_try_compile "$LINENO"; then :
12156
12157 # Check for potential -arch flags. It is not universal unless
12158 # there are at least two -arch flags with different values.
12159 ac_arch=
12160 ac_prev=
12161 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12162 if test -n "$ac_prev"; then
12163 case $ac_word in
12164 i?86 | x86_64 | ppc | ppc64)
12165 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12166 ac_arch=$ac_word
12167 else
12168 ac_cv_c_bigendian=universal
12169 break
12170 fi
12171 ;;
12172 esac
12173 ac_prev=
12174 elif test "x$ac_word" = "x-arch"; then
12175 ac_prev=arch
12176 fi
12177 done
12178fi
12179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12180 if test $ac_cv_c_bigendian = unknown; then
12181 # See if sys/param.h defines the BYTE_ORDER macro.
12182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012183/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012184#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012185 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012186
Martin v. Löwis11437992002-04-12 09:54:03 +000012187int
12188main ()
12189{
Matthias Kloseb9621712010-04-24 17:59:49 +000012190#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12191 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12192 && LITTLE_ENDIAN)
12193 bogus endian macros
12194 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012195
12196 ;
12197 return 0;
12198}
12199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012200if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012201 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012203/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012204#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012205 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012206
Martin v. Löwis11437992002-04-12 09:54:03 +000012207int
12208main ()
12209{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012210#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012211 not big endian
12212 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012213
12214 ;
12215 return 0;
12216}
12217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012218if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012219 ac_cv_c_bigendian=yes
12220else
Matthias Kloseb9621712010-04-24 17:59:49 +000012221 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012224fi
12225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12226 fi
12227 if test $ac_cv_c_bigendian = unknown; then
12228 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012230/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012231#include <limits.h>
12232
Martin v. Löwis11437992002-04-12 09:54:03 +000012233int
12234main ()
12235{
Matthias Kloseb9621712010-04-24 17:59:49 +000012236#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12237 bogus endian macros
12238 #endif
12239
Martin v. Löwis11437992002-04-12 09:54:03 +000012240 ;
12241 return 0;
12242}
12243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012244if ac_fn_c_try_compile "$LINENO"; then :
12245 # It does; now see whether it defined to _BIG_ENDIAN or not.
12246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12247/* end confdefs.h. */
12248#include <limits.h>
12249
12250int
12251main ()
12252{
12253#ifndef _BIG_ENDIAN
12254 not big endian
12255 #endif
12256
12257 ;
12258 return 0;
12259}
12260_ACEOF
12261if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012262 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012263else
Matthias Kloseb9621712010-04-24 17:59:49 +000012264 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012265fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12267fi
12268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12269 fi
12270 if test $ac_cv_c_bigendian = unknown; then
12271 # Compile a test program.
12272 if test "$cross_compiling" = yes; then :
12273 # Try to guess by grepping values from an object file.
12274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12275/* end confdefs.h. */
12276short int ascii_mm[] =
12277 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12278 short int ascii_ii[] =
12279 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12280 int use_ascii (int i) {
12281 return ascii_mm[i] + ascii_ii[i];
12282 }
12283 short int ebcdic_ii[] =
12284 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12285 short int ebcdic_mm[] =
12286 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12287 int use_ebcdic (int i) {
12288 return ebcdic_mm[i] + ebcdic_ii[i];
12289 }
12290 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012291
Matthias Kloseb9621712010-04-24 17:59:49 +000012292int
12293main ()
12294{
12295return use_ascii (foo) == use_ebcdic (foo);
12296 ;
12297 return 0;
12298}
12299_ACEOF
12300if ac_fn_c_try_compile "$LINENO"; then :
12301 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12302 ac_cv_c_bigendian=yes
12303 fi
12304 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12305 if test "$ac_cv_c_bigendian" = unknown; then
12306 ac_cv_c_bigendian=no
12307 else
12308 # finding both strings is unlikely to happen, but who knows?
12309 ac_cv_c_bigendian=unknown
12310 fi
12311 fi
12312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012314else
Matthias Kloseb9621712010-04-24 17:59:49 +000012315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012316/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012317$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012318int
12319main ()
12320{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012321
Matthias Kloseb9621712010-04-24 17:59:49 +000012322 /* Are we little or big endian? From Harbison&Steele. */
12323 union
12324 {
12325 long int l;
12326 char c[sizeof (long int)];
12327 } u;
12328 u.l = 1;
12329 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012330
12331 ;
12332 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012333}
Martin v. Löwis11437992002-04-12 09:54:03 +000012334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012335if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012336 ac_cv_c_bigendian=no
12337else
Matthias Kloseb9621712010-04-24 17:59:49 +000012338 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012339fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012340rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12341 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012343
Matthias Kloseb9621712010-04-24 17:59:49 +000012344 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012345fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12347$as_echo "$ac_cv_c_bigendian" >&6; }
12348 case $ac_cv_c_bigendian in #(
12349 yes)
12350 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12351;; #(
12352 no)
12353 ;; #(
12354 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012355
Matthias Kloseb9621712010-04-24 17:59:49 +000012356$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012357
Matthias Kloseb9621712010-04-24 17:59:49 +000012358 ;; #(
12359 *)
12360 as_fn_error "unknown endianness
12361 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12362 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012363
Michael W. Hudson54241132001-12-07 15:38:26 +000012364
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012365# Check whether right shifting a negative integer extends the sign bit
12366# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12368$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12369if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12370 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012371else
Martin v. Löwis11437992002-04-12 09:54:03 +000012372
Matthias Kloseb9621712010-04-24 17:59:49 +000012373if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012374 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012375else
Matthias Kloseb9621712010-04-24 17:59:49 +000012376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012377/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012378
12379int main()
12380{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012381 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012382}
12383
Martin v. Löwis11437992002-04-12 09:54:03 +000012384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012385if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012386 ac_cv_rshift_extends_sign=yes
12387else
Matthias Kloseb9621712010-04-24 17:59:49 +000012388 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012390rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12391 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012392fi
12393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012394fi
12395
Matthias Kloseb9621712010-04-24 17:59:49 +000012396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12397$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012398if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012399then
Martin v. Löwis11437992002-04-12 09:54:03 +000012400
Matthias Kloseb9621712010-04-24 17:59:49 +000012401$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012402
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012403fi
12404
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012405# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12407$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12408if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12409 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012410else
Martin v. Löwis11437992002-04-12 09:54:03 +000012411
Matthias Kloseb9621712010-04-24 17:59:49 +000012412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012413/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012414#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012415int
12416main ()
12417{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012418
12419 FILE *f = fopen("/dev/null", "r");
12420 flockfile(f);
12421 getc_unlocked(f);
12422 funlockfile(f);
12423
Martin v. Löwis11437992002-04-12 09:54:03 +000012424 ;
12425 return 0;
12426}
12427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012428if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012429 ac_cv_have_getc_unlocked=yes
12430else
Matthias Kloseb9621712010-04-24 17:59:49 +000012431 ac_cv_have_getc_unlocked=no
12432fi
12433rm -f core conftest.err conftest.$ac_objext \
12434 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012436
Matthias Kloseb9621712010-04-24 17:59:49 +000012437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12438$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012439if test "$ac_cv_have_getc_unlocked" = yes
12440then
Martin v. Löwis11437992002-04-12 09:54:03 +000012441
Matthias Kloseb9621712010-04-24 17:59:49 +000012442$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012443
12444fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012445
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012446# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012447# save the value of LIBS so we don't actually link Python with readline
12448LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012449
Gregory P. Smith18820942008-09-07 06:24:49 +000012450# On some systems we need to link readline to a termcap compatible
12451# library. NOTE: Keep the precedence of listed libraries synchronised
12452# with setup.py.
12453py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12455$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012456for py_libtermcap in "" ncursesw ncurses curses termcap; do
12457 if test -z "$py_libtermcap"; then
12458 READLINE_LIBS="-lreadline"
12459 else
12460 READLINE_LIBS="-lreadline -l$py_libtermcap"
12461 fi
12462 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012464/* end confdefs.h. */
12465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012466/* Override any GCC internal prototype to avoid an error.
12467 Use char because int might match the return type of a GCC
12468 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012469#ifdef __cplusplus
12470extern "C"
12471#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012472char readline ();
12473int
12474main ()
12475{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012476return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012477 ;
12478 return 0;
12479}
12480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012481if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012482 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012483fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012484rm -f core conftest.err conftest.$ac_objext \
12485 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012486 if test $py_cv_lib_readline = yes; then
12487 break
12488 fi
12489done
12490# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12491#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012492if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12494$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012495else
Matthias Kloseb9621712010-04-24 17:59:49 +000012496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12497$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012498
Matthias Kloseb9621712010-04-24 17:59:49 +000012499$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012500
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012501fi
12502
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012503# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12505$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12506if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12507 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012508else
12509 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012510LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012512/* end confdefs.h. */
12513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012514/* Override any GCC internal prototype to avoid an error.
12515 Use char because int might match the return type of a GCC
12516 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012517#ifdef __cplusplus
12518extern "C"
12519#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012520char rl_callback_handler_install ();
12521int
12522main ()
12523{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012524return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012525 ;
12526 return 0;
12527}
12528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012529if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012530 ac_cv_lib_readline_rl_callback_handler_install=yes
12531else
Matthias Kloseb9621712010-04-24 17:59:49 +000012532 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012533fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012534rm -f core conftest.err conftest.$ac_objext \
12535 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012536LIBS=$ac_check_lib_save_LIBS
12537fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12539$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12540if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012541
Matthias Kloseb9621712010-04-24 17:59:49 +000012542$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012543
12544fi
12545
12546
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012547# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012549/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012550#include <readline/readline.h>
12551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012552if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012553 have_readline=yes
12554else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012555 have_readline=no
12556fi
12557rm -f conftest.err conftest.$ac_ext
12558if test $have_readline = yes
12559then
Matthias Kloseb9621712010-04-24 17:59:49 +000012560 cat 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
12564_ACEOF
12565if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012566 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012567
Matthias Kloseb9621712010-04-24 17:59:49 +000012568$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012569
12570fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012571rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012572
Matthias Kloseb9621712010-04-24 17:59:49 +000012573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012574/* end confdefs.h. */
12575#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_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012580
Matthias Kloseb9621712010-04-24 17:59:49 +000012581$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012582
12583fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012584rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012585
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012586fi
12587
Martin v. Löwis0daad592001-09-30 21:09:59 +000012588# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12590$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12591if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12592 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012593else
Martin v. Löwis11437992002-04-12 09:54:03 +000012594 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012595LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012597/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012599/* Override any GCC internal prototype to avoid an error.
12600 Use char because int might match the return type of a GCC
12601 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012602#ifdef __cplusplus
12603extern "C"
12604#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012605char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012606int
12607main ()
12608{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012609return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012610 ;
12611 return 0;
12612}
12613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012614if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012615 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012616else
Matthias Kloseb9621712010-04-24 17:59:49 +000012617 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012618fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012619rm -f core conftest.err conftest.$ac_objext \
12620 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012621LIBS=$ac_check_lib_save_LIBS
12622fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12624$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12625if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012626
Matthias Kloseb9621712010-04-24 17:59:49 +000012627$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012628
Martin v. Löwis0daad592001-09-30 21:09:59 +000012629fi
12630
Michael W. Hudson54241132001-12-07 15:38:26 +000012631
Thomas Wouters89d996e2007-09-08 17:39:28 +000012632# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12634$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12635if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12636 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012637else
12638 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012639LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012641/* end confdefs.h. */
12642
12643/* Override any GCC internal prototype to avoid an error.
12644 Use char because int might match the return type of a GCC
12645 builtin and then its argument prototype would still apply. */
12646#ifdef __cplusplus
12647extern "C"
12648#endif
12649char rl_completion_display_matches_hook ();
12650int
12651main ()
12652{
12653return rl_completion_display_matches_hook ();
12654 ;
12655 return 0;
12656}
12657_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012658if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012659 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12660else
Matthias Kloseb9621712010-04-24 17:59:49 +000012661 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012662fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012663rm -f core conftest.err conftest.$ac_objext \
12664 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012665LIBS=$ac_check_lib_save_LIBS
12666fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12668$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12669if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012670
Matthias Kloseb9621712010-04-24 17:59:49 +000012671$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012672
12673fi
12674
12675
Martin v. Löwis0daad592001-09-30 21:09:59 +000012676# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12678$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12679if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12680 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012681else
Martin v. Löwis11437992002-04-12 09:54:03 +000012682 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012683LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012685/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012687/* Override any GCC internal prototype to avoid an error.
12688 Use char because int might match the return type of a GCC
12689 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012690#ifdef __cplusplus
12691extern "C"
12692#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012693char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012694int
12695main ()
12696{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012697return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012698 ;
12699 return 0;
12700}
12701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012702if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012703 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012704else
Matthias Kloseb9621712010-04-24 17:59:49 +000012705 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012707rm -f core conftest.err conftest.$ac_objext \
12708 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012709LIBS=$ac_check_lib_save_LIBS
12710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12712$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
12713if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012714
Matthias Kloseb9621712010-04-24 17:59:49 +000012715$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012716
Guido van Rossum353ae582001-07-10 16:45:32 +000012717fi
12718
Jack Jansendd19cf82001-12-06 22:36:17 +000012719
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012720# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012722/* end confdefs.h. */
12723#include <readline/readline.h>
12724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012725if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012726 have_readline=yes
12727else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012728 have_readline=no
12729fi
12730rm -f conftest.err conftest.$ac_ext
12731if test $have_readline = yes
12732then
Matthias Kloseb9621712010-04-24 17:59:49 +000012733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012734/* end confdefs.h. */
12735#include <readline/readline.h>
12736
12737_ACEOF
12738if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012739 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012740
Matthias Kloseb9621712010-04-24 17:59:49 +000012741$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012742
12743fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012744rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012745
12746fi
12747
Martin v. Löwis82bca632006-02-10 20:49:30 +000012748# End of readline checks: restore LIBS
12749LIBS=$LIBS_no_readline
12750
Matthias Kloseb9621712010-04-24 17:59:49 +000012751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12752$as_echo_n "checking for broken nice()... " >&6; }
12753if test "${ac_cv_broken_nice+set}" = set; then :
12754 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012755else
Martin v. Löwis11437992002-04-12 09:54:03 +000012756
Matthias Kloseb9621712010-04-24 17:59:49 +000012757if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012758 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012759else
Matthias Kloseb9621712010-04-24 17:59:49 +000012760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012761/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012762
12763int main()
12764{
12765 int val1 = nice(1);
12766 if (val1 != -1 && val1 == nice(2))
12767 exit(0);
12768 exit(1);
12769}
12770
Martin v. Löwis11437992002-04-12 09:54:03 +000012771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012772if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012773 ac_cv_broken_nice=yes
12774else
Matthias Kloseb9621712010-04-24 17:59:49 +000012775 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012776fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12778 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012779fi
12780
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012781fi
12782
Matthias Kloseb9621712010-04-24 17:59:49 +000012783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12784$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012785if test "$ac_cv_broken_nice" = yes
12786then
Martin v. Löwis11437992002-04-12 09:54:03 +000012787
Matthias Kloseb9621712010-04-24 17:59:49 +000012788$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012789
12790fi
12791
Matthias Kloseb9621712010-04-24 17:59:49 +000012792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12793$as_echo_n "checking for broken poll()... " >&6; }
12794if test "${ac_cv_broken_poll+set}" = set; then :
12795 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012796else
Matthias Kloseb9621712010-04-24 17:59:49 +000012797 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012798 ac_cv_broken_poll=no
12799else
Matthias Kloseb9621712010-04-24 17:59:49 +000012800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012801/* end confdefs.h. */
12802
12803#include <poll.h>
12804
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012805int main()
12806{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012807 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012808 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012809
12810 close (42);
12811
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012812 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012813 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012814 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012815 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012816 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012817 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012818 return 1;
12819}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012820
12821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012822if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012823 ac_cv_broken_poll=yes
12824else
Matthias Kloseb9621712010-04-24 17:59:49 +000012825 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012826fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12828 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012829fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012830
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012831fi
12832
Matthias Kloseb9621712010-04-24 17:59:49 +000012833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
12834$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012835if test "$ac_cv_broken_poll" = yes
12836then
12837
Matthias Kloseb9621712010-04-24 17:59:49 +000012838$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012839
12840fi
12841
Brett Cannon43802422005-02-10 20:48:03 +000012842# 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 +000012843# (which is not required by ISO C or UNIX spec) and/or if we support
12844# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000012845ac_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 +000012846#include <$ac_cv_struct_tm>
12847
Matthias Kloseb9621712010-04-24 17:59:49 +000012848"
12849if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000012850
12851cat >>confdefs.h <<_ACEOF
12852#define HAVE_STRUCT_TM_TM_ZONE 1
12853_ACEOF
12854
12855
12856fi
12857
12858if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12859
Matthias Kloseb9621712010-04-24 17:59:49 +000012860$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012861
12862else
Matthias Kloseb9621712010-04-24 17:59:49 +000012863 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12864"
12865if test "x$ac_cv_have_decl_tzname" = x""yes; then :
12866 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012867else
Matthias Kloseb9621712010-04-24 17:59:49 +000012868 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012869fi
12870
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012871cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012872#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012873_ACEOF
12874
Matthias Kloseb9621712010-04-24 17:59:49 +000012875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12876$as_echo_n "checking for tzname... " >&6; }
12877if test "${ac_cv_var_tzname+set}" = set; then :
12878 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012879else
Matthias Kloseb9621712010-04-24 17:59:49 +000012880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012881/* end confdefs.h. */
12882#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012883#if !HAVE_DECL_TZNAME
12884extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000012885#endif
12886
12887int
12888main ()
12889{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012890return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000012891 ;
12892 return 0;
12893}
12894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012895if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000012896 ac_cv_var_tzname=yes
12897else
Matthias Kloseb9621712010-04-24 17:59:49 +000012898 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000012899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012900rm -f core conftest.err conftest.$ac_objext \
12901 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012902fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12904$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000012905 if test $ac_cv_var_tzname = yes; then
12906
Matthias Kloseb9621712010-04-24 17:59:49 +000012907$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012908
12909 fi
12910fi
12911
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012912
Martin v. Löwis1d459062005-03-14 21:23:33 +000012913# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000012914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
12915$as_echo_n "checking for working tzset()... " >&6; }
12916if test "${ac_cv_working_tzset+set}" = set; then :
12917 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012918else
12919
Matthias Kloseb9621712010-04-24 17:59:49 +000012920if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012921 ac_cv_working_tzset=no
12922else
Matthias Kloseb9621712010-04-24 17:59:49 +000012923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012924/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012925
12926#include <stdlib.h>
12927#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000012928#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000012929
12930#if HAVE_TZNAME
12931extern char *tzname[];
12932#endif
12933
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012934int main()
12935{
Brett Cannon18367812003-09-19 00:59:16 +000012936 /* Note that we need to ensure that not only does tzset(3)
12937 do 'something' with localtime, but it works as documented
12938 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000012939 This includes making sure that tzname is set properly if
12940 tm->tm_zone does not exist since it is the alternative way
12941 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000012942
12943 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000012944 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000012945 */
12946
Martin v. Löwis1d459062005-03-14 21:23:33 +000012947 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000012948 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
12949
Neal Norwitz7f2588c2003-04-11 15:35:53 +000012950 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012951 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000012952 if (localtime(&groundhogday)->tm_hour != 0)
12953 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000012954#if HAVE_TZNAME
12955 /* For UTC, tzname[1] is sometimes "", sometimes " " */
12956 if (strcmp(tzname[0], "UTC") ||
12957 (tzname[1][0] != 0 && tzname[1][0] != ' '))
12958 exit(1);
12959#endif
Brett Cannon18367812003-09-19 00:59:16 +000012960
Neal Norwitz7f2588c2003-04-11 15:35:53 +000012961 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012962 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000012963 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012964 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000012965#if HAVE_TZNAME
12966 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
12967 exit(1);
12968#endif
Brett Cannon18367812003-09-19 00:59:16 +000012969
12970 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
12971 tzset();
12972 if (localtime(&groundhogday)->tm_hour != 11)
12973 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000012974#if HAVE_TZNAME
12975 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
12976 exit(1);
12977#endif
12978
12979#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000012980 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
12981 exit(1);
12982 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
12983 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000012984#endif
Brett Cannon18367812003-09-19 00:59:16 +000012985
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012986 exit(0);
12987}
12988
12989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012990if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012991 ac_cv_working_tzset=yes
12992else
Matthias Kloseb9621712010-04-24 17:59:49 +000012993 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012994fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12996 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012997fi
12998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012999fi
13000
Matthias Kloseb9621712010-04-24 17:59:49 +000013001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13002$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013003if test "$ac_cv_working_tzset" = yes
13004then
13005
Matthias Kloseb9621712010-04-24 17:59:49 +000013006$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013007
13008fi
13009
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013010# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13012$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13013if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13014 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013015else
Matthias Kloseb9621712010-04-24 17:59:49 +000013016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013017/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013018#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013019int
13020main ()
13021{
13022
13023struct stat st;
13024st.st_mtim.tv_nsec = 1;
13025
13026 ;
13027 return 0;
13028}
13029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013030if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013031 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013032else
Matthias Kloseb9621712010-04-24 17:59:49 +000013033 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013034fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13036fi
13037
Matthias Kloseb9621712010-04-24 17:59:49 +000013038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13039$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013040if test "$ac_cv_stat_tv_nsec" = yes
13041then
13042
Matthias Kloseb9621712010-04-24 17:59:49 +000013043$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013044
13045fi
13046
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013047# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13049$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13050if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13051 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013052else
Matthias Kloseb9621712010-04-24 17:59:49 +000013053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013054/* end confdefs.h. */
13055#include <sys/stat.h>
13056int
13057main ()
13058{
13059
13060struct stat st;
13061st.st_mtimespec.tv_nsec = 1;
13062
13063 ;
13064 return 0;
13065}
13066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013067if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013068 ac_cv_stat_tv_nsec2=yes
13069else
Matthias Kloseb9621712010-04-24 17:59:49 +000013070 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013071fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13073fi
13074
Matthias Kloseb9621712010-04-24 17:59:49 +000013075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13076$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013077if test "$ac_cv_stat_tv_nsec2" = yes
13078then
13079
Matthias Kloseb9621712010-04-24 17:59:49 +000013080$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013081
13082fi
13083
Jack Jansen666b1e72001-10-31 12:11:48 +000013084# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13086$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13087if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13088 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013089else
Matthias Kloseb9621712010-04-24 17:59:49 +000013090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013091/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013092#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013093int
13094main ()
13095{
Jack Jansen666b1e72001-10-31 12:11:48 +000013096
13097 int rtn;
13098 rtn = mvwdelch(0,0,0);
13099
Martin v. Löwis11437992002-04-12 09:54:03 +000013100 ;
13101 return 0;
13102}
13103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013104if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013105 ac_cv_mvwdelch_is_expression=yes
13106else
Matthias Kloseb9621712010-04-24 17:59:49 +000013107 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13110fi
13111
Matthias Kloseb9621712010-04-24 17:59:49 +000013112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13113$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013114
13115if test "$ac_cv_mvwdelch_is_expression" = yes
13116then
Martin v. Löwis11437992002-04-12 09:54:03 +000013117
Matthias Kloseb9621712010-04-24 17:59:49 +000013118$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013119
13120fi
13121
Matthias Kloseb9621712010-04-24 17:59:49 +000013122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13123$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13124if test "${ac_cv_window_has_flags+set}" = set; then :
13125 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013126else
Matthias Kloseb9621712010-04-24 17:59:49 +000013127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013128/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013129#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013130int
13131main ()
13132{
Jack Jansen666b1e72001-10-31 12:11:48 +000013133
13134 WINDOW *w;
13135 w->_flags = 0;
13136
Martin v. Löwis11437992002-04-12 09:54:03 +000013137 ;
13138 return 0;
13139}
13140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013141if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013142 ac_cv_window_has_flags=yes
13143else
Matthias Kloseb9621712010-04-24 17:59:49 +000013144 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13147fi
13148
Matthias Kloseb9621712010-04-24 17:59:49 +000013149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13150$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013151
Jack Jansen666b1e72001-10-31 12:11:48 +000013152
13153if test "$ac_cv_window_has_flags" = yes
13154then
Martin v. Löwis11437992002-04-12 09:54:03 +000013155
Matthias Kloseb9621712010-04-24 17:59:49 +000013156$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013157
13158fi
13159
Matthias Kloseb9621712010-04-24 17:59:49 +000013160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13161$as_echo_n "checking for is_term_resized... " >&6; }
13162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013163/* end confdefs.h. */
13164#include <curses.h>
13165int
13166main ()
13167{
13168void *x=is_term_resized
13169 ;
13170 return 0;
13171}
13172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013173if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013174
Matthias Kloseb9621712010-04-24 17:59:49 +000013175$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013176
Matthias Kloseb9621712010-04-24 17:59:49 +000013177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13178$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013179else
Matthias Kloseb9621712010-04-24 17:59:49 +000013180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13181$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013182
13183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13185
Matthias Kloseb9621712010-04-24 17:59:49 +000013186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13187$as_echo_n "checking for resize_term... " >&6; }
13188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013189/* end confdefs.h. */
13190#include <curses.h>
13191int
13192main ()
13193{
13194void *x=resize_term
13195 ;
13196 return 0;
13197}
13198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013199if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013200
Matthias Kloseb9621712010-04-24 17:59:49 +000013201$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013202
Matthias Kloseb9621712010-04-24 17:59:49 +000013203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13204$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013205else
Matthias Kloseb9621712010-04-24 17:59:49 +000013206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13207$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013208
13209fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13211
Matthias Kloseb9621712010-04-24 17:59:49 +000013212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13213$as_echo_n "checking for resizeterm... " >&6; }
13214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013215/* end confdefs.h. */
13216#include <curses.h>
13217int
13218main ()
13219{
13220void *x=resizeterm
13221 ;
13222 return 0;
13223}
13224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013225if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013226
Matthias Kloseb9621712010-04-24 17:59:49 +000013227$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013228
Matthias Kloseb9621712010-04-24 17:59:49 +000013229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13230$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013231else
Matthias Kloseb9621712010-04-24 17:59:49 +000013232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13233$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013234
13235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13237
Matthias Kloseb9621712010-04-24 17:59:49 +000013238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13239$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013240
13241if test -r /dev/ptmx
13242then
Matthias Kloseb9621712010-04-24 17:59:49 +000013243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13244$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013245
Matthias Kloseb9621712010-04-24 17:59:49 +000013246$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013247
Thomas Wouters89f507f2006-12-13 04:49:30 +000013248else
Matthias Kloseb9621712010-04-24 17:59:49 +000013249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13250$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013251fi
13252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13254$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013255
13256if test -r /dev/ptc
13257then
Matthias Kloseb9621712010-04-24 17:59:49 +000013258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13259$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013260
Matthias Kloseb9621712010-04-24 17:59:49 +000013261$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013262
Thomas Wouters89f507f2006-12-13 04:49:30 +000013263else
Matthias Kloseb9621712010-04-24 17:59:49 +000013264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13265$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013266fi
13267
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013268if test "$have_long_long" = yes
13269then
Matthias Kloseb9621712010-04-24 17:59:49 +000013270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13271$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13272 if test "${ac_cv_have_long_long_format+set}" = set; then :
13273 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013274else
Matthias Kloseb9621712010-04-24 17:59:49 +000013275 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013276 ac_cv_have_long_long_format=no
13277else
Matthias Kloseb9621712010-04-24 17:59:49 +000013278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013279/* end confdefs.h. */
13280
13281 #include <stdio.h>
13282 #include <stddef.h>
13283 #include <string.h>
13284
13285 #ifdef HAVE_SYS_TYPES_H
13286 #include <sys/types.h>
13287 #endif
13288
13289 int main()
13290 {
13291 char buffer[256];
13292
13293 if (sprintf(buffer, "%lld", (long long)123) < 0)
13294 return 1;
13295 if (strcmp(buffer, "123"))
13296 return 1;
13297
13298 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13299 return 1;
13300 if (strcmp(buffer, "-123"))
13301 return 1;
13302
13303 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13304 return 1;
13305 if (strcmp(buffer, "123"))
13306 return 1;
13307
13308 return 0;
13309 }
13310
13311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013312if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013313 ac_cv_have_long_long_format=yes
13314else
Matthias Kloseb9621712010-04-24 17:59:49 +000013315 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013316fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013317rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13318 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013319fi
13320
13321
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013322fi
13323
Matthias Kloseb9621712010-04-24 17:59:49 +000013324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13325$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013326fi
13327
Mark Dickinson89d7d412009-12-31 20:50:59 +000013328if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013329then
13330
Matthias Kloseb9621712010-04-24 17:59:49 +000013331$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013332
13333fi
13334
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013335if test $ac_sys_system = Darwin
13336then
13337 LIBS="$LIBS -framework CoreFoundation"
13338fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013339
Matthias Kloseb9621712010-04-24 17:59:49 +000013340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13341$as_echo_n "checking for %zd printf() format support... " >&6; }
13342if test "${ac_cv_have_size_t_format+set}" = set; then :
13343 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013344else
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013346 ac_cv_have_size_t_format="cross -- assuming yes"
13347
Thomas Wouters477c8d52006-05-27 19:21:47 +000013348else
Matthias Kloseb9621712010-04-24 17:59:49 +000013349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013350/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013351
Thomas Wouters477c8d52006-05-27 19:21:47 +000013352#include <stdio.h>
13353#include <stddef.h>
13354#include <string.h>
13355
Christian Heimes2c181612007-12-17 20:04:13 +000013356#ifdef HAVE_SYS_TYPES_H
13357#include <sys/types.h>
13358#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013359
13360#ifdef HAVE_SSIZE_T
13361typedef ssize_t Py_ssize_t;
13362#elif SIZEOF_VOID_P == SIZEOF_LONG
13363typedef long Py_ssize_t;
13364#else
13365typedef int Py_ssize_t;
13366#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013367
Christian Heimes2c181612007-12-17 20:04:13 +000013368int main()
13369{
13370 char buffer[256];
13371
Thomas Wouters477c8d52006-05-27 19:21:47 +000013372 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13373 return 1;
13374
Thomas Wouters89f507f2006-12-13 04:49:30 +000013375 if (strcmp(buffer, "123"))
13376 return 1;
13377
13378 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13379 return 1;
13380
13381 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013382 return 1;
13383
13384 return 0;
13385}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013386
Thomas Wouters477c8d52006-05-27 19:21:47 +000013387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013388if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013389 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013390else
Matthias Kloseb9621712010-04-24 17:59:49 +000013391 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013392fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013393rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13394 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013395fi
13396
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13399$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013400if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013401
Matthias Kloseb9621712010-04-24 17:59:49 +000013402$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013403
13404fi
13405
Matthias Kloseb9621712010-04-24 17:59:49 +000013406ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013407#ifdef HAVE_SYS_TYPES_H
13408#include <sys/types.h>
13409#endif
13410#ifdef HAVE_SYS_SOCKET_H
13411#include <sys/socket.h>
13412#endif
13413
Matthias Kloseb9621712010-04-24 17:59:49 +000013414"
13415if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013416
Martin v. Löwis11437992002-04-12 09:54:03 +000013417else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013418
Matthias Kloseb9621712010-04-24 17:59:49 +000013419$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013420
13421fi
13422
Michael W. Hudson54241132001-12-07 15:38:26 +000013423
Matthias Kloseb9621712010-04-24 17:59:49 +000013424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13425$as_echo_n "checking for broken mbstowcs... " >&6; }
13426if test "${ac_cv_broken_mbstowcs+set}" = set; then :
13427 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013428else
Matthias Kloseb9621712010-04-24 17:59:49 +000013429 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013430 ac_cv_broken_mbstowcs=no
13431else
Matthias Kloseb9621712010-04-24 17:59:49 +000013432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013433/* end confdefs.h. */
13434
13435#include<stdlib.h>
13436int main() {
13437 size_t len = -1;
13438 const char *str = "text";
13439 len = mbstowcs(NULL, str, 0);
13440 return (len != 4);
13441}
13442
13443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013444if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013445 ac_cv_broken_mbstowcs=no
13446else
Matthias Kloseb9621712010-04-24 17:59:49 +000013447 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013448fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013449rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13450 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013451fi
13452
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013453fi
13454
Matthias Kloseb9621712010-04-24 17:59:49 +000013455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13456$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013457if test "$ac_cv_broken_mbstowcs" = yes
13458then
13459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013461
13462fi
13463
Antoine Pitroub52ec782009-01-25 16:34:23 +000013464# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13466$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013467
13468# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013469if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013470 withval=$with_computed_gotos;
13471if test "$withval" != no
13472then
13473
Matthias Kloseb9621712010-04-24 17:59:49 +000013474$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013475
Matthias Kloseb9621712010-04-24 17:59:49 +000013476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13477$as_echo "yes" >&6; }
13478else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13479$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013480fi
13481else
Matthias Kloseb9621712010-04-24 17:59:49 +000013482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13483$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013484fi
13485
13486
13487
Michael W. Hudson54241132001-12-07 15:38:26 +000013488
13489
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013490for h in `(cd $srcdir;echo Python/thread_*.h)`
13491do
13492 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13493done
13494
Michael W. Hudson54241132001-12-07 15:38:26 +000013495
Neal Norwitzd24499d2005-12-18 21:36:39 +000013496SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13498$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013499for dir in $SRCDIRS; do
13500 if test ! -d $dir; then
13501 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013502 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013503done
Matthias Kloseb9621712010-04-24 17:59:49 +000013504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13505$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013506
Guido van Rossum627b2d71993-12-24 10:39:16 +000013507# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013508ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013509
Martin v. Löwis11437992002-04-12 09:54:03 +000013510cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013511# This file is a shell script that caches the results of configure
13512# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013513# scripts and configure runs, see configure's option --config-cache.
13514# It is not useful on other systems. If it contains results you don't
13515# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013516#
Martin v. Löwis11437992002-04-12 09:54:03 +000013517# config.status only pays attention to the cache file if you give it
13518# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013519#
Skip Montanaro6dead952003-09-25 14:50:04 +000013520# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013521# loading this file, other *unset* `ac_cv_foo' will be assigned the
13522# following values.
13523
13524_ACEOF
13525
Guido van Rossumf78abae1997-01-21 22:02:36 +000013526# The following way of writing the cache mishandles newlines in values,
13527# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013528# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013529# Ultrix sh set writes to stderr and can't be redirected directly,
13530# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013531(
13532 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13533 eval ac_val=\$$ac_var
13534 case $ac_val in #(
13535 *${as_nl}*)
13536 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013537 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13538$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013539 esac
13540 case $ac_var in #(
13541 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013542 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13543 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013544 esac ;;
13545 esac
13546 done
13547
Martin v. Löwis11437992002-04-12 09:54:03 +000013548 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013549 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13550 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013551 # `set' does not quote correctly, so add quotes: double-quote
13552 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013553 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013554 "s/'/'\\\\''/g;
13555 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013556 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013557 *)
13558 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013559 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013560 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013561 esac |
13562 sort
13563) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013564 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013565 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013566 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013567 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013568 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13569 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013570 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13571 :end' >>confcache
13572if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13573 if test -w "$cache_file"; then
13574 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013575 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13576$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013577 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013578 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013579 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13580$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013581 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013582fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013583rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013584
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013585test "x$prefix" = xNONE && prefix=$ac_default_prefix
13586# Let make expand exec_prefix.
13587test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013588
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013589DEFS=-DHAVE_CONFIG_H
13590
Skip Montanaro6dead952003-09-25 14:50:04 +000013591ac_libobjs=
13592ac_ltlibobjs=
13593for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13594 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013595 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013596 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013597 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13598 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013599 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13600 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013601done
13602LIBOBJS=$ac_libobjs
13603
13604LTLIBOBJS=$ac_ltlibobjs
13605
13606
Martin v. Löwis11437992002-04-12 09:54:03 +000013607
Matthias Kloseb9621712010-04-24 17:59:49 +000013608
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013609: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013610ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013611ac_clean_files_save=$ac_clean_files
13612ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013613{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13614$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13615as_write_fail=0
13616cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013617#! $SHELL
13618# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013619# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013620# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013621# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013622
Martin v. Löwis11437992002-04-12 09:54:03 +000013623debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013624ac_cs_recheck=false
13625ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013626
Matthias Kloseb9621712010-04-24 17:59:49 +000013627SHELL=\${CONFIG_SHELL-$SHELL}
13628export SHELL
13629_ASEOF
13630cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13631## -------------------- ##
13632## M4sh Initialization. ##
13633## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013634
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013635# Be more Bourne compatible
13636DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013637if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013638 emulate sh
13639 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013640 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013641 # is contrary to our usage. Disable this feature.
13642 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013643 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013644else
Matthias Kloseb9621712010-04-24 17:59:49 +000013645 case `(set -o) 2>/dev/null` in #(
13646 *posix*) :
13647 set -o posix ;; #(
13648 *) :
13649 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013650esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013651fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013652
13653
Matthias Kloseb9621712010-04-24 17:59:49 +000013654as_nl='
13655'
13656export as_nl
13657# Printing a long string crashes Solaris 7 /usr/bin/printf.
13658as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13659as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13660as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13661# Prefer a ksh shell builtin over an external printf program on Solaris,
13662# but without wasting forks for bash or zsh.
13663if test -z "$BASH_VERSION$ZSH_VERSION" \
13664 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13665 as_echo='print -r --'
13666 as_echo_n='print -rn --'
13667elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13668 as_echo='printf %s\n'
13669 as_echo_n='printf %s'
13670else
13671 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13672 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13673 as_echo_n='/usr/ucb/echo -n'
13674 else
13675 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13676 as_echo_n_body='eval
13677 arg=$1;
13678 case $arg in #(
13679 *"$as_nl"*)
13680 expr "X$arg" : "X\\(.*\\)$as_nl";
13681 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13682 esac;
13683 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13684 '
13685 export as_echo_n_body
13686 as_echo_n='sh -c $as_echo_n_body as_echo'
13687 fi
13688 export as_echo_body
13689 as_echo='sh -c $as_echo_body as_echo'
13690fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013691
13692# The user is always right.
13693if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013694 PATH_SEPARATOR=:
13695 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13696 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13697 PATH_SEPARATOR=';'
13698 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013699fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013700
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013701
13702# IFS
13703# We need space, tab and new line, in precisely that order. Quoting is
13704# there to prevent editors from complaining about space-tab.
13705# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13706# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013707IFS=" "" $as_nl"
13708
13709# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013710case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013711 *[\\/]* ) as_myself=$0 ;;
13712 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013713for as_dir in $PATH
13714do
13715 IFS=$as_save_IFS
13716 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013717 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13718 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013719IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013720
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013721 ;;
13722esac
13723# We did not find ourselves, most probably we were run as `sh COMMAND'
13724# in which case we are not to be found in the path.
13725if test "x$as_myself" = x; then
13726 as_myself=$0
13727fi
13728if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013729 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13730 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013731fi
13732
Matthias Kloseb9621712010-04-24 17:59:49 +000013733# Unset variables that we do not need and which cause bugs (e.g. in
13734# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13735# suppresses any "Segmentation fault" message there. '((' could
13736# trigger a bug in pdksh 5.2.14.
13737for as_var in BASH_ENV ENV MAIL MAILPATH
13738do eval test x\${$as_var+set} = xset \
13739 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013740done
13741PS1='$ '
13742PS2='> '
13743PS4='+ '
13744
13745# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000013746LC_ALL=C
13747export LC_ALL
13748LANGUAGE=C
13749export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013750
Matthias Kloseb9621712010-04-24 17:59:49 +000013751# CDPATH.
13752(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13753
13754
13755# as_fn_error ERROR [LINENO LOG_FD]
13756# ---------------------------------
13757# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13758# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
13759# script with status $?, using 1 if that was 0.
13760as_fn_error ()
13761{
13762 as_status=$?; test $as_status -eq 0 && as_status=1
13763 if test "$3"; then
13764 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13765 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
13766 fi
13767 $as_echo "$as_me: error: $1" >&2
13768 as_fn_exit $as_status
13769} # as_fn_error
13770
13771
13772# as_fn_set_status STATUS
13773# -----------------------
13774# Set $? to STATUS, without forking.
13775as_fn_set_status ()
13776{
13777 return $1
13778} # as_fn_set_status
13779
13780# as_fn_exit STATUS
13781# -----------------
13782# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13783as_fn_exit ()
13784{
13785 set +e
13786 as_fn_set_status $1
13787 exit $1
13788} # as_fn_exit
13789
13790# as_fn_unset VAR
13791# ---------------
13792# Portably unset VAR.
13793as_fn_unset ()
13794{
13795 { eval $1=; unset $1;}
13796}
13797as_unset=as_fn_unset
13798# as_fn_append VAR VALUE
13799# ----------------------
13800# Append the text in VALUE to the end of the definition contained in VAR. Take
13801# advantage of any shell optimizations that allow amortized linear growth over
13802# repeated appends, instead of the typical quadratic growth present in naive
13803# implementations.
13804if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13805 eval 'as_fn_append ()
13806 {
13807 eval $1+=\$2
13808 }'
13809else
13810 as_fn_append ()
13811 {
13812 eval $1=\$$1\$2
13813 }
13814fi # as_fn_append
13815
13816# as_fn_arith ARG...
13817# ------------------
13818# Perform arithmetic evaluation on the ARGs, and store the result in the
13819# global $as_val. Take advantage of shells that can avoid forks. The arguments
13820# must be portable across $(()) and expr.
13821if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13822 eval 'as_fn_arith ()
13823 {
13824 as_val=$(( $* ))
13825 }'
13826else
13827 as_fn_arith ()
13828 {
13829 as_val=`expr "$@" || test $? -eq 1`
13830 }
13831fi # as_fn_arith
13832
13833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013834if expr a : '\(a\)' >/dev/null 2>&1 &&
13835 test "X`expr 00001 : '.*\(...\)'`" = X001; then
13836 as_expr=expr
13837else
13838 as_expr=false
13839fi
13840
13841if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
13842 as_basename=basename
13843else
13844 as_basename=false
13845fi
13846
Matthias Kloseb9621712010-04-24 17:59:49 +000013847if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13848 as_dirname=dirname
13849else
13850 as_dirname=false
13851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013853as_me=`$as_basename -- "$0" ||
13854$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13855 X"$0" : 'X\(//\)$' \| \
13856 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000013857$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013858 sed '/^.*\/\([^/][^/]*\)\/*$/{
13859 s//\1/
13860 q
13861 }
13862 /^X\/\(\/\/\)$/{
13863 s//\1/
13864 q
13865 }
13866 /^X\/\(\/\).*/{
13867 s//\1/
13868 q
13869 }
13870 s/.*/./; q'`
13871
Matthias Kloseb9621712010-04-24 17:59:49 +000013872# Avoid depending upon Character Ranges.
13873as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13874as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13875as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13876as_cr_digits='0123456789'
13877as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013878
13879ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000013880case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013881-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000013882 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013883 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000013884 xy) ECHO_C='\c';;
13885 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
13886 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013887 esac;;
13888*)
13889 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000013890esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013891
Martin v. Löwis11437992002-04-12 09:54:03 +000013892rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013893if test -d conf$$.dir; then
13894 rm -f conf$$.dir/conf$$.file
13895else
13896 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000013897 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013898fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013899if (echo >conf$$.file) 2>/dev/null; then
13900 if ln -s conf$$.file conf$$ 2>/dev/null; then
13901 as_ln_s='ln -s'
13902 # ... but there are two gotchas:
13903 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13904 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13905 # In both cases, we have to default to `cp -p'.
13906 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13907 as_ln_s='cp -p'
13908 elif ln conf$$.file conf$$ 2>/dev/null; then
13909 as_ln_s=ln
13910 else
Martin v. Löwis11437992002-04-12 09:54:03 +000013911 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000013912 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013913else
13914 as_ln_s='cp -p'
13915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013916rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13917rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000013918
Matthias Kloseb9621712010-04-24 17:59:49 +000013919
13920# as_fn_mkdir_p
13921# -------------
13922# Create "$as_dir" as a directory, including parents if necessary.
13923as_fn_mkdir_p ()
13924{
13925
13926 case $as_dir in #(
13927 -*) as_dir=./$as_dir;;
13928 esac
13929 test -d "$as_dir" || eval $as_mkdir_p || {
13930 as_dirs=
13931 while :; do
13932 case $as_dir in #(
13933 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
13934 *) as_qdir=$as_dir;;
13935 esac
13936 as_dirs="'$as_qdir' $as_dirs"
13937 as_dir=`$as_dirname -- "$as_dir" ||
13938$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13939 X"$as_dir" : 'X\(//\)[^/]' \| \
13940 X"$as_dir" : 'X\(//\)$' \| \
13941 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
13942$as_echo X"$as_dir" |
13943 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13944 s//\1/
13945 q
13946 }
13947 /^X\(\/\/\)[^/].*/{
13948 s//\1/
13949 q
13950 }
13951 /^X\(\/\/\)$/{
13952 s//\1/
13953 q
13954 }
13955 /^X\(\/\).*/{
13956 s//\1/
13957 q
13958 }
13959 s/.*/./; q'`
13960 test -d "$as_dir" && break
13961 done
13962 test -z "$as_dirs" || eval "mkdir $as_dirs"
13963 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
13964
13965
13966} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000013967if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013968 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000013969else
Skip Montanarof0d5f792004-08-15 14:08:23 +000013970 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000013971 as_mkdir_p=false
13972fi
13973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013974if test -x / >/dev/null 2>&1; then
13975 as_test_x='test -x'
13976else
13977 if ls -dL / >/dev/null 2>&1; then
13978 as_ls_L_option=L
13979 else
13980 as_ls_L_option=
13981 fi
13982 as_test_x='
13983 eval sh -c '\''
13984 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013985 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013986 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013987 case $1 in #(
13988 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013989 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000013990 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013991 ???[sx]*):;;*)false;;esac;fi
13992 '\'' sh
13993 '
13994fi
13995as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000013996
13997# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000013998as_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 +000013999
14000# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014001as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014002
14003
Martin v. Löwis11437992002-04-12 09:54:03 +000014004exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014005## ----------------------------------- ##
14006## Main body of $CONFIG_STATUS script. ##
14007## ----------------------------------- ##
14008_ASEOF
14009test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014010
Matthias Kloseb9621712010-04-24 17:59:49 +000014011cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14012# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014013# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014014# values after options handling.
14015ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014016This file was extended by python $as_me 3.2, which was
Matthias Kloseb9621712010-04-24 17:59:49 +000014017generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014018
14019 CONFIG_FILES = $CONFIG_FILES
14020 CONFIG_HEADERS = $CONFIG_HEADERS
14021 CONFIG_LINKS = $CONFIG_LINKS
14022 CONFIG_COMMANDS = $CONFIG_COMMANDS
14023 $ $0 $@
14024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014025on `(hostname || uname -n) 2>/dev/null | sed 1q`
14026"
14027
Martin v. Löwis11437992002-04-12 09:54:03 +000014028_ACEOF
14029
Matthias Kloseb9621712010-04-24 17:59:49 +000014030case $ac_config_files in *"
14031"*) set x $ac_config_files; shift; ac_config_files=$*;;
14032esac
14033
14034case $ac_config_headers in *"
14035"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14036esac
14037
14038
14039cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014040# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000014041config_files="$ac_config_files"
14042config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014044_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014045
Matthias Kloseb9621712010-04-24 17:59:49 +000014046cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014047ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014048\`$as_me' instantiates files and other configuration actions
14049from templates according to the current configuration. Unless the files
14050and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014051
Matthias Kloseb9621712010-04-24 17:59:49 +000014052Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014053
14054 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014055 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014056 --config print configuration, then exit
14057 -q, --quiet, --silent
14058 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014059 -d, --debug don't remove temporary files
14060 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014061 --file=FILE[:TEMPLATE]
14062 instantiate the configuration file FILE
14063 --header=FILE[:TEMPLATE]
14064 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014065
14066Configuration files:
14067$config_files
14068
14069Configuration headers:
14070$config_headers
14071
Matthias Kloseb9621712010-04-24 17:59:49 +000014072Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014073
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014075cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14076ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014077ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014078python config.status 3.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014079configured by $0, generated by GNU Autoconf 2.65,
14080 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014081
Matthias Kloseb9621712010-04-24 17:59:49 +000014082Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014083This config.status script is free software; the Free Software Foundation
14084gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014085
14086ac_pwd='$ac_pwd'
14087srcdir='$srcdir'
14088INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014089test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014090_ACEOF
14091
Matthias Kloseb9621712010-04-24 17:59:49 +000014092cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14093# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014094ac_need_defaults=:
14095while test $# != 0
14096do
14097 case $1 in
14098 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014099 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14100 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014101 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014102 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014103 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014104 ac_option=$1
14105 ac_optarg=$2
14106 ac_shift=shift
14107 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014108 esac
14109
Skip Montanaro6dead952003-09-25 14:50:04 +000014110 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014111 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014112 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14113 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014114 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014115 $as_echo "$ac_cs_version"; exit ;;
14116 --config | --confi | --conf | --con | --co | --c )
14117 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014118 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014119 debug=: ;;
14120 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014121 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014122 case $ac_optarg in
14123 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14124 esac
14125 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014126 ac_need_defaults=false;;
14127 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014128 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014129 case $ac_optarg in
14130 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14131 esac
14132 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014133 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014134 --he | --h)
14135 # Conflict between --help and --header
Matthias Kloseb9621712010-04-24 17:59:49 +000014136 as_fn_error "ambiguous option: \`$1'
14137Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014138 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014139 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014140 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14141 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14142 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014143
14144 # This is an error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014145 -*) as_fn_error "unrecognized option: \`$1'
14146Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014147
Matthias Kloseb9621712010-04-24 17:59:49 +000014148 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014149 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014150
14151 esac
14152 shift
14153done
14154
Skip Montanaro6dead952003-09-25 14:50:04 +000014155ac_configure_extra_args=
14156
14157if $ac_cs_silent; then
14158 exec 6>/dev/null
14159 ac_configure_extra_args="$ac_configure_extra_args --silent"
14160fi
14161
14162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014163cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014164if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014165 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14166 shift
14167 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14168 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014169 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014170 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014171fi
14172
Martin v. Löwis11437992002-04-12 09:54:03 +000014173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014174cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014175exec 5>>config.log
14176{
14177 echo
14178 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14179## Running $as_me. ##
14180_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014181 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014182} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014185cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014186_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014187
Matthias Kloseb9621712010-04-24 17:59:49 +000014188cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014189
14190# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014191for ac_config_target in $ac_config_targets
14192do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014193 case $ac_config_target in
14194 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14195 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14196 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014197 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14198 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014199 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14200 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014201 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014202
Matthias Kloseb9621712010-04-24 17:59:49 +000014203 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014204 esac
14205done
14206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014207
Martin v. Löwis11437992002-04-12 09:54:03 +000014208# If the user did not use the arguments to specify the items to instantiate,
14209# then the envvar interface is used. Set only those that are not.
14210# We use the long form for the default assignment because of an extremely
14211# bizarre bug on SunOS 4.1.3.
14212if $ac_need_defaults; then
14213 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14214 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14215fi
14216
Skip Montanaro6dead952003-09-25 14:50:04 +000014217# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014218# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014219# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014220# Hook for its removal unless debugging.
14221# Note that there is a small window in which the directory will not be cleaned:
14222# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014223$debug ||
14224{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014225 tmp=
14226 trap 'exit_status=$?
14227 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14228' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014229 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014230}
Martin v. Löwis11437992002-04-12 09:54:03 +000014231# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014232
Martin v. Löwis11437992002-04-12 09:54:03 +000014233{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014234 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014235 test -n "$tmp" && test -d "$tmp"
14236} ||
14237{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014238 tmp=./conf$$-$RANDOM
14239 (umask 077 && mkdir "$tmp")
Matthias Kloseb9621712010-04-24 17:59:49 +000014240} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014241
Matthias Kloseb9621712010-04-24 17:59:49 +000014242# Set up the scripts for CONFIG_FILES section.
14243# No need to generate them if there are no CONFIG_FILES.
14244# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014245if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014246
Matthias Kloseb9621712010-04-24 17:59:49 +000014247
14248ac_cr=`echo X | tr X '\015'`
14249# On cygwin, bash can eat \r inside `` if the user requested igncr.
14250# But we know of no other shell where ac_cr would be empty at this
14251# point, so we can use a bashism as a fallback.
14252if test "x$ac_cr" = x; then
14253 eval ac_cr=\$\'\\r\'
14254fi
14255ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14256if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14257 ac_cs_awk_cr='\r'
14258else
14259 ac_cs_awk_cr=$ac_cr
14260fi
14261
14262echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014263_ACEOF
14264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014265
Matthias Kloseb9621712010-04-24 17:59:49 +000014266{
14267 echo "cat >conf$$subs.awk <<_ACEOF" &&
14268 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14269 echo "_ACEOF"
14270} >conf$$subs.sh ||
14271 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14272ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014273ac_delim='%!_!# '
14274for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014275 . ./conf$$subs.sh ||
14276 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014277
Matthias Kloseb9621712010-04-24 17:59:49 +000014278 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14279 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014280 break
14281 elif $ac_last_try; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014282 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014283 else
14284 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014285 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014286done
Matthias Kloseb9621712010-04-24 17:59:49 +000014287rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014288
Matthias Kloseb9621712010-04-24 17:59:49 +000014289cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14290cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014292sed -n '
14293h
14294s/^/S["/; s/!.*/"]=/
14295p
14296g
14297s/^[^!]*!//
14298:repl
14299t repl
14300s/'"$ac_delim"'$//
14301t delim
14302:nl
14303h
14304s/\(.\{148\}\)..*/\1/
14305t more1
14306s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14307p
14308n
14309b repl
14310:more1
14311s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14312p
14313g
14314s/.\{148\}//
14315t nl
14316:delim
14317h
14318s/\(.\{148\}\)..*/\1/
14319t more2
14320s/["\\]/\\&/g; s/^/"/; s/$/"/
14321p
14322b
14323:more2
14324s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14325p
14326g
14327s/.\{148\}//
14328t delim
14329' <conf$$subs.awk | sed '
14330/^[^""]/{
14331 N
14332 s/\n//
14333}
14334' >>$CONFIG_STATUS || ac_write_fail=1
14335rm -f conf$$subs.awk
14336cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14337_ACAWK
14338cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14339 for (key in S) S_is_set[key] = 1
14340 FS = ""
14341
14342}
14343{
14344 line = $ 0
14345 nfields = split(line, field, "@")
14346 substed = 0
14347 len = length(field[1])
14348 for (i = 2; i < nfields; i++) {
14349 key = field[i]
14350 keylen = length(key)
14351 if (S_is_set[key]) {
14352 value = S[key]
14353 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14354 len += length(value) + length(field[++i])
14355 substed = 1
14356 } else
14357 len += 1 + keylen
14358 }
14359
14360 print line
14361}
14362
14363_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014365cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14366if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14367 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14368else
14369 cat
14370fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14371 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014372_ACEOF
14373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014374# VPATH may cause trouble with some makes, so we remove $(srcdir),
14375# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14376# trailing colons and then remove the whole line if VPATH becomes empty
14377# (actually we leave an empty line to preserve line numbers).
14378if test "x$srcdir" = x.; then
14379 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14380s/:*\$(srcdir):*/:/
14381s/:*\${srcdir}:*/:/
14382s/:*@srcdir@:*/:/
14383s/^\([^=]*=[ ]*\):*/\1/
14384s/:*$//
14385s/^[^=]*=[ ]*$//
14386}'
14387fi
14388
Matthias Kloseb9621712010-04-24 17:59:49 +000014389cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014390fi # test -n "$CONFIG_FILES"
14391
Matthias Kloseb9621712010-04-24 17:59:49 +000014392# Set up the scripts for CONFIG_HEADERS section.
14393# No need to generate them if there are no CONFIG_HEADERS.
14394# This happens for instance with `./config.status Makefile'.
14395if test -n "$CONFIG_HEADERS"; then
14396cat >"$tmp/defines.awk" <<\_ACAWK ||
14397BEGIN {
14398_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014399
Matthias Kloseb9621712010-04-24 17:59:49 +000014400# Transform confdefs.h into an awk script `defines.awk', embedded as
14401# here-document in config.status, that substitutes the proper values into
14402# config.h.in to produce config.h.
14403
14404# Create a delimiter string that does not exist in confdefs.h, to ease
14405# handling of long lines.
14406ac_delim='%!_!# '
14407for ac_last_try in false false :; do
14408 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14409 if test -z "$ac_t"; then
14410 break
14411 elif $ac_last_try; then
14412 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
14413 else
14414 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14415 fi
14416done
14417
14418# For the awk script, D is an array of macro values keyed by name,
14419# likewise P contains macro parameters if any. Preserve backslash
14420# newline sequences.
14421
14422ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14423sed -n '
14424s/.\{148\}/&'"$ac_delim"'/g
14425t rset
14426:rset
14427s/^[ ]*#[ ]*define[ ][ ]*/ /
14428t def
14429d
14430:def
14431s/\\$//
14432t bsnl
14433s/["\\]/\\&/g
14434s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14435D["\1"]=" \3"/p
14436s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14437d
14438:bsnl
14439s/["\\]/\\&/g
14440s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14441D["\1"]=" \3\\\\\\n"\\/p
14442t cont
14443s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14444t cont
14445d
14446:cont
14447n
14448s/.\{148\}/&'"$ac_delim"'/g
14449t clear
14450:clear
14451s/\\$//
14452t bsnlc
14453s/["\\]/\\&/g; s/^/"/; s/$/"/p
14454d
14455:bsnlc
14456s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14457b cont
14458' <confdefs.h | sed '
14459s/'"$ac_delim"'/"\\\
14460"/g' >>$CONFIG_STATUS || ac_write_fail=1
14461
14462cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14463 for (key in D) D_is_set[key] = 1
14464 FS = ""
14465}
14466/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14467 line = \$ 0
14468 split(line, arg, " ")
14469 if (arg[1] == "#") {
14470 defundef = arg[2]
14471 mac1 = arg[3]
14472 } else {
14473 defundef = substr(arg[1], 2)
14474 mac1 = arg[2]
14475 }
14476 split(mac1, mac2, "(") #)
14477 macro = mac2[1]
14478 prefix = substr(line, 1, index(line, defundef) - 1)
14479 if (D_is_set[macro]) {
14480 # Preserve the white space surrounding the "#".
14481 print prefix "define", macro P[macro] D[macro]
14482 next
14483 } else {
14484 # Replace #undef with comments. This is necessary, for example,
14485 # in the case of _POSIX_SOURCE, which is predefined and required
14486 # on some systems where configure will not decide to define it.
14487 if (defundef == "undef") {
14488 print "/*", prefix defundef, macro, "*/"
14489 next
14490 }
14491 }
14492}
14493{ print }
14494_ACAWK
14495_ACEOF
14496cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14497 as_fn_error "could not setup config headers machinery" "$LINENO" 5
14498fi # test -n "$CONFIG_HEADERS"
14499
14500
14501eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14502shift
14503for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014504do
14505 case $ac_tag in
14506 :[FHLC]) ac_mode=$ac_tag; continue;;
14507 esac
14508 case $ac_mode$ac_tag in
14509 :[FHL]*:*);;
Matthias Kloseb9621712010-04-24 17:59:49 +000014510 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014511 :[FH]-) ac_tag=-:-;;
14512 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14513 esac
14514 ac_save_IFS=$IFS
14515 IFS=:
14516 set x $ac_tag
14517 IFS=$ac_save_IFS
14518 shift
14519 ac_file=$1
14520 shift
14521
14522 case $ac_mode in
14523 :L) ac_source=$1;;
14524 :[FH])
14525 ac_file_inputs=
14526 for ac_f
14527 do
14528 case $ac_f in
14529 -) ac_f="$tmp/stdin";;
14530 *) # Look for the file first in the build tree, then in the source tree
14531 # (if the path is not absolute). The absolute path cannot be DOS-style,
14532 # because $ac_f cannot contain `:'.
14533 test -f "$ac_f" ||
14534 case $ac_f in
14535 [\\/$]*) false;;
14536 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14537 esac ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014538 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014539 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014540 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14541 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014542 done
14543
14544 # Let's still pretend it is `configure' which instantiates (i.e., don't
14545 # use $as_me), people would be surprised to read:
14546 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014547 configure_input='Generated from '`
14548 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14549 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014550 if test x"$ac_file" != x-; then
14551 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014552 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14553$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014554 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014555 # Neutralize special characters interpreted by sed in replacement strings.
14556 case $configure_input in #(
14557 *\&* | *\|* | *\\* )
14558 ac_sed_conf_input=`$as_echo "$configure_input" |
14559 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14560 *) ac_sed_conf_input=$configure_input;;
14561 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014562
14563 case $ac_tag in
Matthias Kloseb9621712010-04-24 17:59:49 +000014564 *:-:* | *:-) cat >"$tmp/stdin" \
14565 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014566 esac
14567 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014568 esac
14569
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014570 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014571$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014572 X"$ac_file" : 'X\(//\)[^/]' \| \
14573 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014574 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014575$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014576 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14577 s//\1/
14578 q
14579 }
14580 /^X\(\/\/\)[^/].*/{
14581 s//\1/
14582 q
14583 }
14584 /^X\(\/\/\)$/{
14585 s//\1/
14586 q
14587 }
14588 /^X\(\/\).*/{
14589 s//\1/
14590 q
14591 }
14592 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014593 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014594 ac_builddir=.
14595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014596case "$ac_dir" in
14597.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14598*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014599 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014600 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014601 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014602 case $ac_top_builddir_sub in
14603 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14604 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14605 esac ;;
14606esac
14607ac_abs_top_builddir=$ac_pwd
14608ac_abs_builddir=$ac_pwd$ac_dir_suffix
14609# for backward compatibility:
14610ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014611
14612case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014613 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014614 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014615 ac_top_srcdir=$ac_top_builddir_sub
14616 ac_abs_top_srcdir=$ac_pwd ;;
14617 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014618 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014619 ac_top_srcdir=$srcdir
14620 ac_abs_top_srcdir=$srcdir ;;
14621 *) # Relative name.
14622 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14623 ac_top_srcdir=$ac_top_build_prefix$srcdir
14624 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014625esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014626ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014627
Martin v. Löwis11437992002-04-12 09:54:03 +000014628
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014629 case $ac_mode in
14630 :F)
14631 #
14632 # CONFIG_FILE
14633 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014634
14635 case $INSTALL in
14636 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014637 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014638 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014639_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014640
Matthias Kloseb9621712010-04-24 17:59:49 +000014641cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014642# If the template does not know about datarootdir, expand it.
14643# FIXME: This hack should be removed a few years after 2.60.
14644ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014645ac_sed_dataroot='
14646/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014647 p
14648 q
14649}
14650/@datadir@/p
14651/@docdir@/p
14652/@infodir@/p
14653/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014654/@mandir@/p'
14655case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014656*datarootdir*) ac_datarootdir_seen=yes;;
14657*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14659$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014661cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014662 ac_datarootdir_hack='
14663 s&@datadir@&$datadir&g
14664 s&@docdir@&$docdir&g
14665 s&@infodir@&$infodir&g
14666 s&@localedir@&$localedir&g
14667 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014668 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014669esac
14670_ACEOF
14671
14672# Neutralize VPATH when `$srcdir' = `.'.
14673# Shell code in configure.ac might set extrasub.
14674# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014675cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14676ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014677$extrasub
14678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014679cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014680:t
14681/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014682s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014683s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014684s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014685s&@srcdir@&$ac_srcdir&;t t
14686s&@abs_srcdir@&$ac_abs_srcdir&;t t
14687s&@top_srcdir@&$ac_top_srcdir&;t t
14688s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14689s&@builddir@&$ac_builddir&;t t
14690s&@abs_builddir@&$ac_abs_builddir&;t t
14691s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14692s&@INSTALL@&$ac_INSTALL&;t t
14693$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014694"
14695eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
14696 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014697
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014698test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14699 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14700 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014701 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014702which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014703$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014704which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014705
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014706 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014707 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +000014708 -) cat "$tmp/out" && rm -f "$tmp/out";;
14709 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14710 esac \
14711 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014712 ;;
14713 :H)
14714 #
14715 # CONFIG_HEADER
14716 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014717 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014718 {
14719 $as_echo "/* $configure_input */" \
14720 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14721 } >"$tmp/config.h" \
14722 || as_fn_error "could not create $ac_file" "$LINENO" 5
14723 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14724 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14725$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014726 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014727 rm -f "$ac_file"
14728 mv "$tmp/config.h" "$ac_file" \
14729 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014730 fi
14731 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014732 $as_echo "/* $configure_input */" \
14733 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
14734 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014735 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014736 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014737
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014738
14739 esac
14740
14741done # for ac_tag
14742
Guido van Rossum627b2d71993-12-24 10:39:16 +000014743
Matthias Kloseb9621712010-04-24 17:59:49 +000014744as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000014745_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014746ac_clean_files=$ac_clean_files_save
14747
Matthias Kloseb9621712010-04-24 17:59:49 +000014748test $ac_write_fail = 0 ||
14749 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
14750
Martin v. Löwis11437992002-04-12 09:54:03 +000014751
14752# configure is writing to config.log, and then calls config.status.
14753# config.status does its own redirection, appending to config.log.
14754# Unfortunately, on DOS this fails, as config.log is still kept open
14755# by configure, so config.status won't be able to write to it; its
14756# output is simply discarded. So we exec the FD to /dev/null,
14757# effectively closing config.log, so it can be properly (re)opened and
14758# appended to by config.status. When coming back to configure, we
14759# need to make the FD available again.
14760if test "$no_create" != yes; then
14761 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000014762 ac_config_status_args=
14763 test "$silent" = yes &&
14764 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000014765 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000014766 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000014767 exec 5>>config.log
14768 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14769 # would make configure fail if this is the last instruction.
Matthias Kloseb9621712010-04-24 17:59:49 +000014770 $ac_cs_success || as_fn_exit $?
14771fi
14772if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14773 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14774$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014775fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014776
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014777
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014778echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014779if test ! -f Modules/Setup
14780then
14781 cp $srcdir/Modules/Setup.dist Modules/Setup
14782fi
14783
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014784echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014785if test ! -f Modules/Setup.local
14786then
14787 echo "# Edit this file for local setup changes" >Modules/Setup.local
14788fi
14789
14790echo "creating Makefile"
14791$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
14792 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000014793 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014794mv config.c Modules